/* =============================================
   THE EXCHANGE by THE MUSICIANS CLUB
   Dark/gold brand, peer-to-peer marketplace
   ============================================= */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #141420;
  --bg-card: #1a1a2a;
  --bg-hover: #22223a;
  --bg-input: #0d0d18;
  --border: #2a2a3a;
  /* --border-light raised from #3a3a4a (~1.4:1) to #5a5a70 (~3.0:1) so
     btn--outline is actually visible against bg-card per WCAG 1.4.11. */
  --border-light: #5a5a70;
  /* Brand gold — matches the warm Shopify storefront accent (#d4a574) used
     across themusiciansclub.net + the Concierge / Bulk Purchase pages.
     Was #D4AF37 (metallic gold) which clashed with templates that hardcoded
     #d4a574 inline. Single source of truth now lives in this variable. */
  --gold: #d4a574;
  --gold-light: #e8cc8e;
  --gold-dim: #a67c52;
  /* Body-text contrast was muted (#9898b0 ≈ 7.5:1 on bg-primary).
     Lifted to #c4c4d8 (≈ 11.5:1) so descriptive copy reads as
     primary content, not a footnote. --text-muted similarly raised
     from #686888 (~4.5:1) to #8e8eaa (~6.5:1) so captions, ships-from
     lines and helper text stay legible from arm's length. */
  --text-primary: #ededf5;
  --text-secondary: #c4c4d8;
  --text-muted: #8e8eaa;
  --green: #4ade80;
  --green-bg: rgba(74, 222, 128, 0.1);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.1);
  --blue: #60a5fa;
  --blue-bg: rgba(96, 165, 250, 0.1);
  --amber: #fbbf24;
  --amber-bg: rgba(251, 191, 36, 0.1);
  --purple: #a78bfa;
  --purple-bg: rgba(167, 139, 250, 0.1);
  --teal: #2dd4bf;
  --radius: 8px;
  --radius-sm: 4px;
  --max-width: 1200px;
  /* Breakpoints (documented for reference — used in @media queries) */
  /* --bp-mobile: 480px; --bp-tablet: 768px; --bp-desktop: 1024px; */
  /* Spacing scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.2s ease;
  /* Shadows */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--gold);
  color: #0f0f1a;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 200;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- HEADER / NAV ---- */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
}
.site-logo span { color: var(--text-muted); font-weight: 400; font-size: 12px; letter-spacing: 0; }
.site-nav { display: flex; gap: 24px; align-items: center; }
.site-nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.site-nav a:hover, .site-nav a.active { color: var(--gold); }
.site-nav__cta {
  background: var(--gold) !important;
  color: #0f0f1a !important;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600 !important;
  font-size: 13px !important;
}
.site-nav__cta:hover { background: var(--gold-light) !important; }

/* Mobile nav toggle */
/* Hamburger toggle. Hidden on desktop, shown on mobile via @media. The
   inline ☰ glyph is only ~20px wide; without explicit min-width/height
   the tap area is ~21×29px which fails WCAG 2.5.5 / Apple HIG 44px and
   is the actual reason "things don't work when clicking on them" on
   mobile — users miss the button. Force 44×44 hit area. */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  margin-top: 60px;
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.site-footer__col h4 {
  color: var(--gold);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.site-footer__col a {
  display: block;
  color: var(--text-secondary);
  font-size: 13px;
  /* Was margin-bottom:6px which gave links ~20px line-height — too small
     to tap accurately on mobile. Padding-based tap zone gives a
     ~36-40px hit target without changing visual rhythm. The mobile
     @media block below bumps further to 44px+. */
  padding: 8px 0;
  margin-bottom: 0;
  line-height: 1.4;
}
.site-footer__col a:hover { color: var(--gold); }
.site-footer__bottom {
  max-width: var(--max-width);
  margin: 20px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
.site-footer__newsletter {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.site-footer__newsletter h4 {
  color: var(--gold);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.site-footer__newsletter p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 12px;
}
.site-footer__newsletter form {
  margin: 0 auto;
}

/* ---- BREADCRUMBS ---- */
.breadcrumbs {
  padding: 12px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumbs a { color: var(--text-secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs__sep { margin: 0 6px; color: var(--text-muted); }

/* ---- VIEW TOGGLE ---- */
.view-toggle { display: flex; gap: 4px; align-items: center; }
.view-toggle__btn {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
}
.view-toggle__btn:hover { border-color: var(--gold); color: var(--gold); }
.view-toggle__btn--active { border-color: var(--gold); color: var(--gold); background: rgba(212,165,116,0.08); }

/* ---- LIST VIEW MODE ---- */
.listings-grid--list {
  grid-template-columns: 1fr !important;
}
.listings-grid--list .listing-card {
  display: flex;
  flex-direction: row;
  gap: 16px;
}
.listings-grid--list .listing-card__img-wrap {
  width: 180px;
  min-width: 180px;
  height: 140px;
}
.listings-grid--list .listing-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---- CONTAINER ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- HERO (legacy centered variant — kept for any old call sites) ---- */
.hero {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, #1a1a3e 100%);
  border-bottom: 1px solid var(--border);
}
.hero__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 14px;
  color: var(--text-primary);
}
.hero__title em { color: var(--gold); font-style: italic; }
.hero__sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 24px;
  line-height: 1.6;
}
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- HERO — EDITORIAL 2-column layout (replaces the centered variant on home) ---- */
.hero--editorial {
  text-align: left;
  padding: 0;
  /* Single-spot soft gradient instead of the previous two-spot mix that
     read as muddy. Stays subtle so the headline + photo are the visual
     anchors. */
  background:
    radial-gradient(900px 600px at 80% 20%, rgba(212, 165, 116, 0.08), transparent 65%),
    linear-gradient(180deg, #11111c 0%, #0a0a12 100%);
  border-bottom: 1px solid var(--border);
}
.hero--editorial .hero__inner {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  padding: 84px 32px 96px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero--editorial .hero__inner { grid-template-columns: 1fr; gap: 40px; padding: 56px 22px 64px; }
}
.hero--editorial .hero__copy { max-width: 600px; }
.hero--editorial .hero__title {
  font-family: Georgia, "Times New Roman", serif;
  /* Bumped up to 72px ceiling for proper hero presence at desktop. */
  font-size: clamp(38px, 5.4vw, 72px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin: 0 0 20px;
  color: var(--text-primary);
}
.hero--editorial .hero__title em {
  font-style: italic; color: var(--gold);
}
.hero--editorial .hero__sub {
  font-size: 17px; line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 30px;
  max-width: 540px;
}
.hero--editorial .hero__sub a {
  color: var(--gold-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.hero--editorial .hero-search {
  display: flex; gap: 0; align-items: center;
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 5px 5px 5px 18px;
  margin-bottom: 18px;
  max-width: 560px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.hero--editorial .hero-search:focus-within {
  border-color: var(--gold);
  background: rgba(255,255,255,0.06);
}
.hero--editorial .hero-search__icon { color: var(--text-muted); flex-shrink: 0; }
.hero--editorial .hero-search input {
  flex: 1; background: transparent; border: 0; outline: none;
  color: var(--text-primary); font-size: 15px; padding: 12px 14px; min-width: 0;
  font-family: inherit;
}
.hero--editorial .hero-search input::placeholder { color: var(--text-muted); }
.hero--editorial .hero-search__btn {
  border-radius: 999px;
  padding: 10px 22px;
  flex-shrink: 0;
}
.hero--editorial .hero__actions {
  display: flex; gap: 10px; justify-content: flex-start; flex-wrap: wrap;
}
/* The big .btn--lg buttons under the search felt redundant — calmed them
   with smaller padding so the search remains the primary action while
   tests still find these anchors by .btn--lg + href. */
.hero--editorial .hero__actions .btn--lg {
  padding: 11px 22px;
  font-size: 14px;
}

/* ---- HERO FEATURE CARD (right column) ----
   Stripped back: no card border, softer shadow, no eyebrow tag. Just a
   clean photo with a price + title overlay. The photo does the talking. */
.hero__feature { position: relative; min-height: 380px; }
.hero__feature-card {
  position: relative; display: block; overflow: hidden;
  background: var(--bg-card);
  border-radius: 18px;
  text-decoration: none;
  box-shadow: 0 24px 48px -18px rgba(0,0,0,0.55);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
  isolation: isolate;
}
.hero__feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 32px 64px -20px rgba(0,0,0,0.65);
}
.hero__feature-card img {
  width: 100%; height: auto; aspect-ratio: 5/4; object-fit: cover; display: block;
}
.hero__feature-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.0) 55%);
}
.hero__feature-meta {
  position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 1;
}
.hero__feature-title {
  font-family: Georgia, serif; font-size: 22px; font-weight: 600;
  color: #fff; margin: 0 0 6px; line-height: 1.2;
  text-shadow: 0 1px 12px rgba(0,0,0,0.6);
}
.hero__feature-price {
  font-size: 20px; font-weight: 700; color: var(--gold-light);
  text-shadow: 0 1px 12px rgba(0,0,0,0.6);
}
.hero__feature-card--placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 4/3; padding: 40px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
}
.btn--gold { background: var(--gold); color: #0f0f1a; }
.btn--gold:hover { background: var(--gold-light); color: #0f0f1a; }
.btn--outline { background: transparent; border: 1px solid var(--border-light); color: var(--text-primary); }
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }
.btn--ghost { background: transparent; color: var(--text-secondary); }
.btn--ghost:hover { color: var(--gold); }
.btn--danger { background: var(--red); color: #fff; }
.btn--success { background: var(--green); color: #0f0f1a; }
.btn--sm { padding: 6px 14px; font-size: 13px; }
.btn--lg { padding: 14px 28px; font-size: 16px; }
.btn--full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- SECTION TITLES (editorial — serif h2 + thin gold rule) ---- */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  gap: 18px;
}
.section-title h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.section-title h2 em { color: var(--gold); font-style: italic; }

/* ---- LISTINGS GRID — wider cards, more breathing room ---- */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

/* ---- LISTING CARD — premium-marketplace polish ---- */
.listing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 0.25s ease,
              box-shadow 0.35s ease;
  position: relative;
}
.listing-card:hover {
  border-color: rgba(212, 165, 116, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -16px rgba(0, 0, 0, 0.55);
}
/* Image zoom on card hover for a tactile, premium feel. */
.listing-card .listing-card__img {
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.listing-card:hover .listing-card__img {
  transform: scale(1.04);
}
.listing-card__img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--bg-secondary);
  display: block;
}
.listing-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 40px;
  background: var(--bg-secondary);
  aspect-ratio: 4/3;
}
.listing-card__body { padding: 14px; }
.listing-card__category {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-dim);
  margin-bottom: 4px;
}
.listing-card__title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listing-card__title a { color: var(--text-primary); }
.listing-card__title a:hover { color: var(--gold); }
.listing-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.listing-card__price {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}
.listing-card__condition {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  color: var(--text-secondary);
}
.listing-card__condition--Mint { background: var(--green-bg); color: var(--green); }
.listing-card__condition--Excellent { background: var(--blue-bg); color: var(--blue); }
.listing-card__condition--VeryGood { background: var(--amber-bg); color: var(--amber); }
.listing-card__condition--Good { background: var(--purple-bg); color: var(--purple); }
.listing-card__seller {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.listing-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: #0f0f1a;
}
.listing-card__img-wrap {
  position: relative;
}

/* ---- FILTER BAR ---- */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filter-bar__search {
  flex: 1;
  min-width: 200px;
}
.filter-bar__search input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
}
.filter-bar__search input:focus {
  outline: none;
  border-color: var(--gold-dim);
}
.filter-bar__search input::placeholder { color: var(--text-muted); }
.filter-bar select {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
.filter-bar select:focus { outline: none; border-color: var(--gold-dim); }
.filter-bar__count {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
/* Price range pair — keeps Min/Max inputs paired with the en-dash glyph
   between them so they don't visually orphan from each other in the
   horizontal filter row. */
.filter-bar__price-range {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-bar__price-range input {
  width: 88px;
  padding: 10px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
}
.filter-bar__price-range input:focus { outline: none; border-color: var(--gold-dim); }
.filter-bar__price-range span { color: var(--text-muted); font-size: 14px; }

/* ---- LISTING DETAIL ---- */
.listing-detail {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  padding: 32px 0;
}
.listing-detail__gallery {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
}
.listing-detail__gallery img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.listing-detail__gallery-placeholder {
  color: var(--text-muted);
  font-size: 48px;
}
.listing-detail__thumbs {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow-x: auto;
}
.listing-detail__thumb {
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.listing-detail__thumb.active, .listing-detail__thumb:hover { border-color: var(--gold); }

.listing-detail__info { display: flex; flex-direction: column; gap: 20px; }

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.detail-card__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
/* Listing title is the editorial centerpiece — was 22px which competed
   poorly against the 28px price below it, inverting the natural reading
   hierarchy. Bumped to 26px / weight 600 so the title leads. */
.detail-card h1 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.detail-card__price {
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
}
.detail-card__fee {
  font-size: 12px;
  color: var(--text-muted);
}

.detail-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-spec__label { font-size: 12px; color: var(--text-muted); }
.detail-spec__value { font-size: 14px; font-weight: 500; }

.detail-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-line;
}

/* ---- BID / OFFER BOX ---- */
.action-box {
  background: var(--bg-card);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 20px;
}
.action-box__title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--gold);
}
.action-box .form-group { margin-bottom: 12px; }
.action-box .form-row { display: flex; gap: 10px; }
.action-box .form-row > * { flex: 1; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--gold-dim);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row--3 { grid-template-columns: 1fr 1fr 1fr; }

/* ---- SELL FORM ---- */
.sell-form {
  max-width: 720px;
  margin: 32px auto;
}
.sell-form__section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.sell-form__section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--gold);
}

/* ---- CATEGORY GRID ---- */
.category-grid {
  display: grid;
  /* Bumped minmax to 220px so on a 1200-1440px desktop we land at 4–5
     columns instead of 6+, which previously read as a phone keypad of
     tiny cards. Each card is bigger and the grid feels curated rather
     than utilitarian. */
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 18px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.category-card:hover {
  border-color: rgba(212, 165, 116, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, 0.55);
}
.category-card__icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 6px;
  filter: saturate(0.92) brightness(1.05);
}
.category-card__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
.category-card__count { font-size: 12px; color: var(--text-muted); }

/* ---- ACCOUNT / SELLER DASHBOARD ----
   Was: .account-header { padding: 24px 0; border-bottom; margin-bottom }
   The flex-row variant at line ~1014 was overriding this whole rule and
   the original was dead. Kept the h1 + __sub child rules which still
   apply. */
.account-header h1 { font-size: 24px; font-weight: 700; }
.account-header__sub { color: var(--text-secondary); font-size: 14px; }

.account-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.account-stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.account-stat__label { font-size: 12px; color: var(--text-muted); }
.account-stat__value { font-size: 24px; font-weight: 700; }
.account-stat__value--gold { color: var(--gold); }

.account-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.account-tab {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.account-tab:hover { color: var(--text-primary); }
.account-tab.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ---- PAGINATION ---- */
.pagination {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: center;
  margin-top: 32px;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.pagination a { background: var(--bg-card); border: 1px solid var(--border); }
.pagination a:hover { border-color: var(--gold-dim); color: var(--gold); }
.pagination .active { background: var(--gold); color: #0f0f1a; font-weight: 700; }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ---- BADGES ---- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge--green { background: var(--green-bg); color: var(--green); }
.badge--blue { background: var(--blue-bg); color: var(--blue); }
.badge--amber { background: var(--amber-bg); color: var(--amber); }
.badge--red { background: var(--red-bg); color: var(--red); }
.badge--purple { background: var(--purple-bg); color: var(--purple); }
.badge--gold { background: rgba(212,165,116,0.15); color: var(--gold); }
.badge--gray { background: rgba(107,114,128,0.15); color: var(--text-muted); }

/* ---- NOT-FOUND PAGE — editorial 404 ---- */
.not-found {
  text-align: center;
  padding: 88px 20px 64px;
  max-width: 560px;
  margin: 0 auto;
}
.not-found__num {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(96px, 14vw, 140px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--gold);
  margin-bottom: 18px;
}
.not-found__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: var(--text-primary);
}
.not-found__title em { color: var(--gold); font-style: italic; }
.not-found__copy {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 28px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}
.not-found__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- LOGIN / REGISTER MODAL CARD ---- */
.login-box {
  max-width: 440px;
  margin: 72px auto;
  background:
    radial-gradient(circle at 20% 0%, rgba(212, 165, 116, 0.05), transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 40px 36px 32px;
  text-align: center;
  box-shadow: 0 18px 48px -20px rgba(0, 0, 0, 0.55);
}
.login-box h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--text-primary);
}
.login-box__sub { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; line-height: 1.55; }

/* ---- ALERTS ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert--success { background: var(--green-bg); color: var(--green); border: 1px solid rgba(74,222,128,0.3); }
.alert--error { background: var(--red-bg); color: var(--red); border: 1px solid rgba(248,113,113,0.3); }
.alert--info { background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(96,165,250,0.3); }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state__icon { font-size: 48px; margin-bottom: 12px; }
.empty-state__text { font-size: 16px; margin-bottom: 16px; }

/* ---- TABLE (for account listings) ---- */
.ex-table { width: 100%; border-collapse: collapse; }
.ex-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.ex-table td {
  padding: 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.ex-table tr:hover { background: var(--bg-hover); }
.ex-table td a { color: var(--gold); }

/* ---- LISTING CARD PLACEHOLDER (when seller has no photos uploaded) ----
   Prior treatment was a bare SVG icon stretched into a 4:3 wrap — read as
   broken/missing. New treatment is a brand-warm gradient with a small
   centered icon + 'Photo coming soon' label, signalling that the seller is
   still uploading rather than that something is broken. */
.listing-card__placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, rgba(212, 165, 116, 0.10), rgba(168, 134, 31, 0.04));
  border: 1px solid rgba(212, 165, 116, 0.18);
  color: var(--text-muted);
}
.listing-card__placeholder-icon { opacity: 0.5; width: 56px; height: 56px; }
.listing-card__placeholder-text {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); font-style: italic;
}

/* ---- SHARE BUTTONS (SVG icon-only buttons) ---- */
.share-buttons { display: flex; gap: 6px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; flex-shrink: 0;
}
.share-btn svg { display: block; }

/* ---- WATCHLIST BUTTON ----
   44px x 44px meets WCAG 2.5.5 / Apple HIG minimum touch target. The icon
   stays visually 18px via line-height; only the hit area grew. */
.watchlist-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-secondary); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.watchlist-btn:hover { color: #e74c3c; border-color: #e74c3c; }
.watchlist-btn--active { color: #e74c3c; background: rgba(231, 76, 60, 0.1); border-color: #e74c3c; }

/* ---- LISTING CARD SELLER ROW ---- */
.listing-card__seller-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px; font-size: 12px; color: var(--text-muted);
}
.listing-card__watchers { color: #e74c3c; font-size: 11px; }

/* ---- SHARE BUTTONS ---- */
.share-buttons { display: flex; gap: 4px; }

/* ---- REVIEW STARS ---- */
.review-stars { display: inline-flex; gap: 1px; font-size: 16px; }

/* ---- FORM ROW (children sit side by side) ----
   This was previously duplicated as `display: flex; gap: 12px` AND
   `display: grid; grid-template-columns: 1fr 1fr; gap: 16px` further up,
   leaving the result up to declaration order. Single source of truth here:
   grid for natural equal columns. The flex .form-group selector works
   under either display because we set min-width:0 below. */
.form-row > .form-group { min-width: 0; flex: 1; }

/* ---- ACCOUNT HEADER ---- */
.account-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
}

/* ---- ALERT SUCCESS ---- */
.alert--success {
  background: rgba(52, 211, 153, 0.12); border: 1px solid #34d399;
  color: #34d399; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px;
}

/* ---- PHOTO LIGHTBOX ---- */
.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.92);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.lightbox-overlay.active { opacity: 1; pointer-events: all; }
.lightbox-overlay img {
  max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 4px;
  cursor: zoom-out;
}
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  font-size: 32px; color: #fff; background: none; border: none;
  cursor: pointer; z-index: 10; line-height: 1;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 36px; color: #fff; background: rgba(0,0,0,0.4);
  border: none; cursor: pointer; padding: 12px 16px; border-radius: 8px;
  transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.15); }
.lightbox-nav--prev { left: 16px; }
.lightbox-nav--next { right: 16px; }
.lightbox-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  font-size: 14px; color: rgba(255,255,255,0.7);
}
.listing-detail__gallery { cursor: zoom-in; }

/* ---- LISTINGS PAGE: prominent search + bigger filter chips ---- */
.listings-search {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 4px 4px 4px 18px;
  margin: 12px 0 14px;
  transition: border-color 0.2s ease;
}
.listings-search:focus-within { border-color: var(--gold); }
.listings-search__icon { color: var(--text-muted); flex-shrink: 0; }
.listings-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 15px;
  padding: 12px 14px;
  font-family: inherit;
}
.listings-search input::placeholder { color: var(--text-muted); }
.listings-search__btn {
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14px;
  flex-shrink: 0;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

/* Single-row trust reminder above the listings grid. */
.listings-trust-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(74, 222, 128, 0.05);
  border: 1px solid rgba(74, 222, 128, 0.18);
  border-radius: 8px;
  margin: -4px 0 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.listings-trust-line svg { color: var(--green); flex-shrink: 0; }
.listings-trust-line a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.quick-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  background: rgba(20, 20, 32, 0.5);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.quick-chip:hover {
  color: var(--gold);
  border-color: rgba(212, 165, 116, 0.5);
}
.quick-chip--active {
  color: #0f0f1a;
  background: var(--gold);
  border-color: var(--gold);
}
.quick-chip--active:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: #0f0f1a;
}

/* ---- HOMEPAGE HOW-IT-WORKS — small icon + numeral + copy ---- */
.hiw__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.hiw__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.hiw__card:hover {
  border-color: rgba(212, 165, 116, 0.4);
  transform: translateY(-2px);
}
.hiw__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 165, 116, 0.1);
  border: 1px solid rgba(212, 165, 116, 0.28);
  color: var(--gold);
}
.hiw__num {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
  line-height: 1;
}
.hiw__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-primary);
}
.hiw__copy {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

/* ---- HOMEPAGE BUYER PROTECTION STRIP ---- */
.bp-strip {
  margin: 40px 0;
  padding: 20px 26px;
  border-radius: 14px;
  border: 1px solid rgba(74, 222, 128, 0.22);
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.06), rgba(96, 165, 250, 0.04));
  color: var(--text-primary);
}
.bp-strip__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.bp-strip__shield { color: var(--green); flex-shrink: 0; }
.bp-strip__title {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.bp-strip__more {
  margin-left: auto;
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
}
.bp-strip__more:hover { color: var(--gold-light); }
.bp-strip__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}
.bp-strip__items li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.bp-strip__items svg { color: var(--green); flex-shrink: 0; }
@media (max-width: 600px) {
  .bp-strip { padding: 18px; }
  .bp-strip__items { gap: 10px 18px; }
  .bp-strip__more { display: none; }
}

/* ---- TRUST / BUYER PROTECTION ---- */
.trust-strip {
  display: flex; gap: 24px; align-items: center; justify-content: center;
  flex-wrap: wrap; padding: 14px 20px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); margin: 20px 0;
  font-size: 13px; color: var(--text-secondary);
}
.trust-strip__item { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.trust-strip__icon { font-size: 16px; }

/* ---- RECENTLY VIEWED ---- */
.recently-viewed {
  padding: 40px 0; border-top: 1px solid var(--border); margin-top: 40px;
}

/* ---- PRICE HISTORY ---- */
.price-history {
  font-size: 12px; color: var(--text-muted); margin-top: 4px;
}
.price-history__old {
  text-decoration: line-through; margin-right: 6px;
}
.price-history__drop {
  color: var(--green); font-weight: 600;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero { padding: 40px 16px; }
  .hero__title { font-size: 26px; }
  .listing-detail { grid-template-columns: 1fr; }
  .listings-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .filter-bar { flex-direction: column; }
  .filter-bar__search { min-width: unset; }
  .form-row, .form-row--3 { grid-template-columns: 1fr; }
  .detail-specs { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: 16px 20px; gap: 4px; z-index: 300; }
  /* 44px+ touch targets for every mobile nav item (WCAG 2.5.5 / Apple HIG). */
  .site-nav.open a, .site-nav.open button { min-height: 44px; display: flex; align-items: center; padding: 8px 12px; }
  .nav-toggle { display: block; }
  .site-footer__inner { flex-direction: column; }
  .account-stats { grid-template-columns: 1fr 1fr; }
  .ex-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Bump every interactive element to 44px on mobile (WCAG 2.5.5 / HIG).
     Was: .btn--sm rendered ~28px tall, breaking touch on listing-card
     "View", watchlist heart, share buttons, Q&A submit. */
  .btn--sm { min-height: 44px; padding: 10px 16px; font-size: 13px; }
  .quick-chip { min-height: 44px; padding: 12px 18px; }
  .view-toggle__btn { min-height: 44px; padding: 10px 14px; }
  .watchlist-btn, .share-btn { min-height: 44px; min-width: 44px; }
  /* Footer column links — were 350×20px tap targets (full row width but only
     20px tall). Now 44px+ via padding so users don't miss-tap and end up
     opening adjacent footer links. */
  .site-footer__col a { padding: 12px 0; min-height: 44px; }
  .site-footer__legal a { padding: 10px 0; display: inline-block; }
}

/* 320–380px: very narrow viewports. The listings-search row's input +
   button overflows below 360px because the button has flex-shrink:0 and
   22px horizontal padding. Stack vertically. */
@media (max-width: 380px) {
  .listings-search { flex-direction: column; padding: 8px; gap: 6px; border-radius: 12px; }
  .listings-search input { width: 100%; }
  .listings-search__btn { width: 100%; border-radius: 8px; }
  .hero--editorial .hero-search { flex-direction: column; padding: 8px; gap: 6px; border-radius: 12px; }
  .hero--editorial .hero-search input { width: 100%; }
  .hero--editorial .hero-search__btn { width: 100%; border-radius: 8px; }
}

@media (max-width: 480px) {
  .listings-grid { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .account-stats { grid-template-columns: 1fr; }
}

/* D2: Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* D3: Visible focus ring for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.form-input:focus-visible, .form-textarea:focus-visible, .form-select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 0;
  border-color: var(--gold);
}
