@font-face {
  font-family: 'BDO Grotesk';
  src: url('/assets/BDOGrotesk-VF.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #6b6b6b;
  --faint: #a0a0a0;
  --line: #eaeaea;
  --card-bg: #f7f7f7;
  --accent: #0a0a0a;
  --accent-light: #f4f4f4;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'Fragment Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --brand: 'BDO Grotesk', var(--sans);
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Nav ─────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.nav__logo {
  font-family: var(--brand);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.nav__badge {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav__links a {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 20px;
  transition: all 0.15s;
}
.nav__links a:hover { color: var(--fg); background: var(--accent-light); }
.nav__links a.active { color: var(--bg); background: var(--fg); }
.nav__auth {
  margin-left: 8px;
  border: 1px solid var(--line) !important;
}
.nav__auth:hover { border-color: var(--muted) !important; }

/* ─── Shop Layout ─────────────────────────────────── */

.shop {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.shop__header {
  padding: 40px 0 28px;
  text-align: center;
}
.shop__header h1 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: lowercase;
  margin-bottom: 6px;
}
.shop__sub {
  font-size: 15px;
  color: var(--fg);
  font-weight: 500;
  margin-bottom: 20px;
}
.shop__controls {
  max-width: 320px;
  margin: 0 auto;
}
.shop__controls input {
  width: 100%;
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  outline: none;
  background: var(--bg);
  color: var(--fg);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.shop__controls input:focus {
  border-color: var(--fg);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.04);
}
.shop__controls input::placeholder { color: var(--faint); }

/* ─── Categories ──────────────────────────────────── */

.shop__categories {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  padding-bottom: 24px;
  margin-bottom: 8px;
}
.cat-chip {
  font-family: var(--mono);
  font-size: 10px;
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}
.cat-chip:hover { border-color: var(--fg); color: var(--fg); }
.cat-chip.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ─── Featured ────────────────────────────────────── */

.shop__featured {
  margin-bottom: 32px;
}
.section-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--faint);
  margin-bottom: 16px;
  text-align: center;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 16px;
}

/* ─── Product Grid — Gallery Layout ───────────────── */

.shop__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-bottom: 48px;
}

/* ─── Product Card — Gallery Style ────────────────── */

.product-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.product-card .pc-img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: var(--card-bg);
  border-radius: var(--radius);
}

.product-card .pc-body {
  padding: 12px 4px 8px;
}
.product-card .pc-cat {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--faint);
  margin-bottom: 3px;
}
.product-card .pc-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .pc-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 4px;
}
.product-card .pc-price {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}
.product-card .pc-original {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  text-decoration: line-through;
  margin-left: 4px;
}
.product-card .pc-source {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Featured card — wider, horizontal */
.product-card.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.product-card.featured .pc-img {
  aspect-ratio: auto;
  height: 100%;
  min-height: 260px;
  border-radius: 8px 0 0 8px;
}
.product-card.featured .pc-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
}
.product-card.featured .pc-title {
  font-size: 16px;
  -webkit-line-clamp: 3;
}
.product-card.featured .pc-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
  font-style: italic;
}

/* ─── Empty State ─────────────────────────────────── */

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--faint);
}
.empty-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.25;
}
.empty-state p {
  font-family: var(--mono);
  font-size: 12px;
}

/* ─── Footer ──────────────────────────────────────── */

.shop__footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 32px;
  text-align: center;
}
.shop__footer p {
  font-size: 12px;
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto 6px;
  line-height: 1.6;
}
.shop__footer .disclosure {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--faint);
  letter-spacing: 0.02em;
}
.shop__footer .copy {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--faint);
  margin-top: 4px;
}

/* ─── Modal ───────────────────────────────────────── */

.modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-bg.open { display: flex; }

.modal-card {
  background: var(--bg);
  border-radius: 12px;
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  box-shadow: 0 16px 64px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 10;
  font-size: 22px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border: none;
  cursor: pointer;
  color: var(--muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--accent-light); color: var(--fg); }

.modal-img-wrap {
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-body {
  padding: 28px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.modal-cat {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--faint);
  margin-bottom: 8px;
}
.modal-body h2 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}
.modal-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.modal-note {
  background: var(--accent-light);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.note-label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--faint);
  display: block;
  margin-bottom: 4px;
}
.modal-note p {
  font-size: 12px;
  color: var(--fg);
  line-height: 1.6;
  font-style: italic;
}

.modal-pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.modal-price {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
}
.modal-original {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
  text-decoration: line-through;
}
.modal-source {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.btn-buy {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  padding: 11px 20px;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
  letter-spacing: 0.02em;
}
.btn-buy:hover { opacity: 0.85; }
.btn-share {
  font-family: var(--mono);
  font-size: 11px;
  padding: 11px 18px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.btn-share:hover { border-color: var(--fg); }

.modal-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* ─── Responsive ──────────────────────────────────── */

@media (max-width: 900px) {
  .shop__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .product-card.featured {
    grid-template-columns: 1fr;
  }
  .product-card.featured .pc-img {
    min-height: 200px;
    border-radius: 8px 8px 0 0;
  }
}

@media (max-width: 640px) {
  .nav { padding: 12px 16px; }
  .nav__links a { padding: 5px 8px; font-size: 10px; }
  .nav__logo { font-size: 14px; }

  .shop { padding: 0 16px; }
  .shop__header { padding: 28px 0 20px; }
  .shop__header h1 { font-size: 12px; }
  .shop__sub { font-size: 14px; }
  .shop__controls { max-width: 100%; }

  .shop__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-card .pc-img {
    aspect-ratio: 3 / 4;
  }
  .product-card .pc-body { padding: 8px 2px 6px; }
  .product-card .pc-title { font-size: 12px; }
  .product-card .pc-price { font-size: 12px; }
  .product-card .pc-cat { font-size: 8px; }
  .product-card .pc-source { font-size: 8px; }

  .modal-card {
    grid-template-columns: 1fr;
    max-height: 95vh;
  }
  .modal-img-wrap { max-height: 40vh; }
  .modal-body { padding: 18px 16px; }
  .modal-body h2 { font-size: 16px; }
  .modal-price { font-size: 18px; }

  .shop__footer { padding: 20px 0 24px; }
}

@media (max-width: 380px) {
  .nav__links a:not(.active):not(.nav__auth) {
    display: none;
  }
  .shop__grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}
