/* Minimal, elegant bilingual second-hand catalog */
:root {
  --bg: #faf9f7;
  --card: #ffffff;
  --text: #1c1c1c;
  --muted: #8a8a8a;
  --accent: #c0392b;
  --available: #2e7d4f;
  --sold: #9a9a9a;
  --border: #eceae6;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

header {
  padding: 48px 24px 28px;
  text-align: center;
}

header h1 {
  margin: 0 0 6px;
  font-size: 1.9rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.07);
}

.thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f1f0ee;
  cursor: zoom-in;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

.badge.available { background: var(--available); }
.badge.sold { background: var(--sold); }

.info {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.name-en {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.3;
}

.name-cn {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.3;
}

.desc {
  font-size: 0.84rem;
  color: #5b5b5b;
  margin-top: 4px;
  line-height: 1.4;
}

.price-row {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
}

.price-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

footer {
  text-align: center;
  padding: 28px 16px 48px;
  color: var(--muted);
  font-size: 0.8rem;
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 94vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  font-size: 22px;
  line-height: 40px;
  cursor: pointer;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 0;
}

@media (max-width: 480px) {
  header { padding: 34px 16px 20px; }
  header h1 { font-size: 1.5rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .info { padding: 10px 12px 12px; }
}
