/* ─── The Card Shop — Global Styles ─────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ── Brand accent ────────────────────────────────────────────────── */
  --brand:            #7c6cf8;
  --brand-light:      #9b8fff;
  --brand-dark:       #6b5ce7;
  --brand-glow:       rgba(124,108,248,0.25);
  --brand-tint-xs:    rgba(124,108,248,0.04);
  --brand-tint-sm:    rgba(124,108,248,0.08);
  --brand-tint-md:    rgba(124,108,248,0.14);

  /* ── Backgrounds ─────────────────────────────────────────────────── */
  --bg:           #0B0B0D;
  --surface-1:    #111214;
  --surface-2:    #17171b;
  --surface-3:    #222228;
  --navbar-bg:    #0c0d18;
  --sidebar-bg:   #0f0f12;
  --hero-bg:      #0a0a1a;

  /* ── Borders ─────────────────────────────────────────────────────── */
  --border:       #1e1e24;
  --border-muted: rgba(255,255,255,0.04);
  --border-brand: rgba(124,108,248,0.35);

  /* ── Text ────────────────────────────────────────────────────────── */
  --text:           #FFFFFF;
  --text-secondary: #D1D1D6;
  --text-muted:     #A1A1AA;
  --text-subtle:    #555560;

  /* ── Status colours ──────────────────────────────────────────────── */
  --green:      #22c55e;
  --green-tint: rgba(34,197,94,0.10);
  --red:        #ef4444;
  --red-tint:   rgba(239,68,68,0.10);
  --amber:      #f59e0b;
  --amber-tint: rgba(245,158,11,0.10);
  --blue:       #3b82f6;
  --blue-tint:  rgba(59,130,246,0.10);

  /* ── Layout tokens ───────────────────────────────────────────────── */
  --header-height:          72px;
  --sidebar-width:          220px;
  --sidebar-width-collapsed: 64px;
  --bottom-nav-height:      64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top:    env(safe-area-inset-top, 0px);
  --full-height: 100vh;

  /* ── Border radii ────────────────────────────────────────────────── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* ── Shadows ─────────────────────────────────────────────────────── */
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.3);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.45);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.6);
  --shadow-brand: 0 0 24px rgba(124,108,248,0.18);

  /* ── Transitions ─────────────────────────────────────────────────── */
  --ease-fast:   0.12s ease;
  --ease-normal: 0.20s ease;

  /* ── Legacy aliases (keeps old code working) ─────────────────────── */
  --gold:          var(--brand);
  --gold-light:    var(--brand-light);
  --brand-primary: var(--brand);
  --brand-secondary: var(--brand-dark);
  --brand-cta1:    var(--brand);
  --brand-cta2:    var(--brand-light);
  --dark-bg:       var(--bg);
  --card-bg:       var(--surface-1);
  --card:          var(--surface-1);
  --hero-accent:   var(--hero-bg);
  --glow-gold:     var(--brand-glow);
  --glow-red:      var(--brand-glow);
}

/* ── Content Zone Tokens (light surface inside dark chrome) ───────────────────
   Scoped to .tcs-main, .mp-filter-bar, .mp-card, and browse-grid elements.
   Overridden via the branding system (branding.js injects :root overrides).
   ──────────────────────────────────────────────────────────────────────────── */
:root {
  --content-bg:           #F2F3F7;
  --content-card:         #FFFFFF;
  --content-text:         #111827;
  --content-text-muted:   #6B7280;
  --content-text-subtle:  #9CA3AF;
  --content-border:       #E5E7EB;
  --content-shadow:       0 1px 3px rgba(0,0,0,0.07), 0 4px 12px rgba(0,0,0,0.05);
  --content-shadow-hover: 0 4px 16px rgba(0,0,0,0.10), 0 12px 32px rgba(0,0,0,0.08);
}

/* dvh support — iOS Safari address bar fix */
@supports (height: 100dvh) {
  :root { --full-height: 100dvh; }
}

* { box-sizing: border-box; }

body {
  background: var(--dark-bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

/* ─── Navbar (legacy) ────────────────────────────────────────────────────── */
.tcs-navbar {
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tcs-navbar .logo img {
  height: 40px;
  width: auto;
}

.tcs-navbar .nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
  transition: color 0.2s;
}

.tcs-navbar .nav-links a:hover { color: var(--gold); }

/* ─── Site Header ─────────────────────────────────────────────────────────── */
.tcs-hdr {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.tcs-hdr-inner {
  display: flex;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  gap: 24px;
}

/* Logo */
.tcs-hdr-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.tcs-hdr-logo img {
  height: 56px;
  width: auto;
}

/* Nav */
.tcs-hdr-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.tcs-hdr-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 7px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.tcs-hdr-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.07);
}

.tcs-hdr-link.active {
  color: var(--gold);
  background: rgba(124,108,248,0.1);
  font-weight: 600;
}

/* Right section */
.tcs-hdr-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Search */
.tcs-hdr-search {
  position: relative;
  display: flex;
  align-items: center;
}

.tcs-hdr-search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

#headerSearchInput {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 7px 12px 7px 32px;
  width: 210px;
  transition: border-color 0.2s, width 0.25s, box-shadow 0.2s;
  outline: none;
}

#headerSearchInput::placeholder { color: var(--text-muted); }
#headerSearchInput:focus {
  border-color: var(--gold);
  width: 270px;
  box-shadow: 0 0 0 3px rgba(124,108,248,0.08);
}

/* Account / auth */
.tcs-hdr-account {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 7px;
  transition: color 0.15s;
  white-space: nowrap;
}

.tcs-hdr-account:hover { color: var(--text); }

.tcs-hdr-signout {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.tcs-hdr-signout:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.tcs-hdr-signin {
  background: var(--gold);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  padding: 7px 18px;
  border-radius: 8px;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.tcs-hdr-signin:hover { background: var(--gold-light); }
.tcs-hdr-signin:active { transform: scale(0.97); }

/* Ghost "Sign In" link — sits beside the gold Sign Up button */
.tcs-hdr-signin-ghost {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.tcs-hdr-signin-ghost:hover {
  border-color: #555;
  color: var(--text);
}

/* ─── Panel / Card ───────────────────────────────────────────────────────── */
.tcs-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
}

/* ─── Listing Cards (browse grid) ────────────────────────────────────────── */
.listing-card {
  background: var(--content-card);
  border: 1px solid var(--content-border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.listing-card:hover {
  border-color: var(--content-border);
  transform: translateY(-3px);
  box-shadow: var(--content-shadow-hover);
}

.listing-card .photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #0d0d10;
  display: block;
}

.listing-card .photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: #F9FAFB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: #2a2a35;
}

.listing-card .info { padding: 14px 16px 16px; }

.listing-card .info .title {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.listing-card .info .meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.listing-card .info .price {
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.listing-card .info .price.hidden {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Condition badge on cards */
.card-condition-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.07);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn-gold {
  background: var(--gold);
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 9px;
  padding: 12px 28px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  width: 100%;
  letter-spacing: 0.01em;
}

.btn-gold:hover  {
  background: var(--gold-light);
  box-shadow: 0 0 20px rgba(124,108,248,0.25);
}
.btn-gold:active  { transform: scale(0.98); }
.btn-gold:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn-red {
  background: var(--brand-cta1);
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 9px;
  padding: 12px 28px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  width: 100%;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-red:hover  {
  background: #ff1a0f;
  box-shadow: 0 0 20px rgba(225,6,0,0.3);
}
.btn-red:active  { transform: scale(0.98); }
.btn-red:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn-outline {
  background: transparent;
  color: var(--gold);
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--gold);
  border-radius: 9px;
  padding: 10px 24px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  text-decoration: none;
  display: inline-block;
}

.btn-outline:hover {
  background: rgba(124,108,248,0.08);
  box-shadow: 0 0 14px rgba(124,108,248,0.12);
  color: var(--gold);
}

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.tcs-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  padding: 12px 16px;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tcs-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(124,108,248,0.08);
}

.tcs-input::placeholder { color: var(--text-muted); }

.tcs-input:-webkit-autofill,
.tcs-input:-webkit-autofill:hover,
.tcs-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #17171b inset;
  box-shadow: 0 0 0 1000px #17171b inset;
  -webkit-text-fill-color: var(--text, #fff);
  caret-color: var(--text, #fff);
}

select.tcs-input option { background: #111214; }

label.tcs-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
  border-radius: 9px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}

.alert.show { display: block; }
.alert-success { background: rgba(40,167,69,0.12); border: 1px solid #28a745; color: #5cb85c; }
.alert-danger  { background: rgba(225,6,0,0.1);    border: 1px solid #E10600; color: #ff6b6b; }
.alert-warning { background: rgba(234,179,8,0.1);  border: 1px solid #eab308; color: #eab308; }
.alert-info    { background: rgba(124,108,248,0.07); border: 1px solid var(--gold); color: var(--gold); }

/* ─── Badges ─────────────────────────────────────────────────────────────── */
.badge-gold    { background: rgba(124,108,248,0.12);  color: var(--gold);       border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.badge-red     { background: rgba(225,6,0,0.12);    color: #ff6b6b;           border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.badge-success { background: rgba(40,167,69,0.12);  color: #5cb85c;           border-radius: 20px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.badge-muted   { background: rgba(255,255,255,0.05); color: var(--text-muted); border-radius: 20px; padding: 3px 10px; font-size: 12px; }

/* ─── Spinner ────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,0.25);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.tcs-sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  min-height: calc(var(--full-height) - var(--header-height));
  padding: 12px 0 24px;
  width: var(--sidebar-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--header-height);
  max-height: calc(var(--full-height) - var(--header-height));
  overflow-y: auto;
  scrollbar-width: none;
}
.tcs-sidebar::-webkit-scrollbar { display: none; }

/* Legacy sidebar links (pages not yet using sidebar-link class) */
.tcs-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color var(--ease-fast), background var(--ease-fast);
  margin: 1px 8px;
  border-radius: var(--radius-sm);
}

.tcs-sidebar a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.tcs-sidebar a.active {
  color: var(--brand);
  background: var(--brand-tint-sm);
  font-weight: 600;
}

/* New sidebar-link class used by updated sidebar.js */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color var(--ease-fast), background var(--ease-fast);
  margin: 1px 8px;
  border-radius: var(--radius-sm);
  position: relative;
}
.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.sidebar-link.active {
  color: var(--brand);
  background: var(--brand-tint-sm);
  font-weight: 600;
}
.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--brand);
  border-radius: 0 3px 3px 0;
}
.sidebar-icon {
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity var(--ease-fast);
}
.sidebar-link:hover .sidebar-icon,
.sidebar-link.active .sidebar-icon { opacity: 1; }

.sidebar-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  padding: 16px 20px 6px;
}

/* ── Tablet: icon-only sidebar (768–1024px) ──────────────────────────────── */
@media (max-width: 1024px) {
  .tcs-sidebar { width: var(--sidebar-width-collapsed); padding: 12px 0; }
  .sidebar-link span, .tcs-sidebar a span,
  .sidebar-group-label, .tcs-sidebar-divider { display: none; }
  .sidebar-link, .tcs-sidebar a {
    justify-content: center;
    padding: 10px 0;
    margin: 1px 4px;
    gap: 0;
  }
  .sidebar-icon { width: 20px; height: 20px; }
  .tcs-main { min-width: 0; }
  .sidebar-link { position: relative; }
  .sidebar-link::after {
    content: attr(data-label);
    position: absolute;
    left: calc(var(--sidebar-width-collapsed) + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--ease-fast);
    z-index: 200;
    box-shadow: var(--shadow-md);
  }
  .sidebar-link:hover::after { opacity: 1; }
}

/* ── Mobile: hide sidebar (bottom nav takes over) ────────────────────────── */
@media (max-width: 768px) {
  .tcs-sidebar { display: none; }
}

.tcs-layout {
  display: flex;
}

.tcs-main {
  flex: 1;
  padding: 32px;
  min-width: 0;
  background: var(--content-bg);
  min-height: calc(var(--full-height) - var(--header-height));
  color: var(--content-text);
}

/* Signin / Signup pages live in the content zone (no sidebar layout) */
.signin-center,
.signup-center {
  background: var(--content-bg);
  color: var(--content-text);
}

/* Light surface overrides for cards/panels inside content zone */
.tcs-main .tcs-card,
.signin-center .tcs-card,
.signup-center .tcs-card {
  background: var(--content-card);
  border-color: var(--content-border);
  box-shadow: var(--content-shadow);
}
.tcs-main .tcs-card:hover,
.signin-center .tcs-card:hover,
.signup-center .tcs-card:hover {
  box-shadow: var(--content-shadow-hover);
}

/* Page header dark text on light background */
.tcs-main .page-hdr {
  border-bottom-color: var(--content-border);
}
.tcs-main .page-hdr h1 {
  color: var(--content-text);
}
.tcs-main .page-hdr p {
  color: var(--content-text-muted);
}

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination button {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
}
.pagination button:hover,
.pagination button.active { border-color: var(--gold); color: var(--gold); }
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }

/* ─── Empty state ────────────────────────────────────────────────────────── */
.empty { text-align: center; padding: 80px 0; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   MARKETPLACE PAGE  (.mp-*)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Hero (shared by Browse, Stores — matches CardShares/Breaks pattern) ─── */
.mp-hero {
  background: linear-gradient(135deg, #0f0f0f 0%, var(--hero-accent) 50%, #0f0f0f 100%);
  border-bottom: 1px solid #2a2a2a;
  padding: 52px 24px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.mp-hero::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 250px;
  background: radial-gradient(ellipse, rgba(124,108,248,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.mp-hero-inner { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; }
.mp-hero-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.1;
}
.mp-hero-title span { color: #7c6cf8; }
.mp-hero-sub { font-size: 16px; color: #aaa; margin: 0; font-weight: 400; }

/* ─── Page Header (app pages with sidebar layout) ────────────────────────── */
.page-hdr {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.page-hdr h1 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.page-hdr p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ─── Sticky Filter Bar ──────────────────────────────────────────────────── */
.mp-filter-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 900;
  background: rgba(13,13,16,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.mp-filter-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
  overflow: hidden;
}

/* Type tabs */
.mp-type-tabs {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding-right: 16px;
  height: 100%;
  align-items: center;
}
.mp-type-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  position: relative;
}
.mp-type-tab:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.mp-type-tab.active { color: var(--brand); background: var(--brand-tint-sm); }
.mp-type-tab.active::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px 2px 0 0;
}

/* Category chips */
.mp-cat-scroll {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
  height: 100%;
  display: flex;
  align-items: center;
}
.mp-cat-scroll::-webkit-scrollbar { display: none; }
.mp-cats { display: flex; gap: 6px; padding: 0 4px; align-items: center; }
.mp-cat {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.mp-cat:hover { border-color: rgba(255,255,255,0.25); color: var(--text); }
.mp-cat.active { border-color: var(--brand); color: var(--brand); background: rgba(124,108,248,0.08); font-weight: 600; }

/* Right controls */
.mp-filter-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mp-search-wrap { position: relative; display: flex; align-items: center; }
.mp-search-icon { position: absolute; left: 10px; color: var(--text-muted); pointer-events: none; width: 14px; height: 14px; }
.mp-search {
  background: var(--content-card);
  border: 1px solid var(--content-border);
  border-radius: 8px;
  color: var(--content-text);
  font-size: 13px;
  font-family: inherit;
  padding: 7px 12px 7px 30px;
  width: 200px;
  transition: border-color 0.2s, width 0.25s, box-shadow 0.2s;
  outline: none;
}
.mp-search::placeholder { color: var(--content-text-subtle); }
.mp-search:focus { border-color: var(--brand); width: 240px; box-shadow: 0 0 0 3px rgba(124,108,248,0.08); }
.mp-select {
  background: var(--content-card);
  border: 1px solid var(--content-border);
  border-radius: 8px;
  color: var(--content-text);
  font-size: 13px;
  font-family: inherit;
  padding: 7px 28px 7px 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 110px;
  transition: border-color 0.2s;
}
.mp-select:focus { border-color: var(--brand); }
.mp-select option { background: #fff; color: #111827; }

/* ─── Content Area ───────────────────────────────────────────────────────── */
.mp-page-body { background: var(--content-bg); color: var(--content-text); min-height: 100vh; }

/* Store directory cards inside content zone */
.mp-page-body .sd-card {
  background: var(--content-card);
  border-color: var(--content-border);
  box-shadow: var(--content-shadow);
}
.mp-page-body .sd-card:hover { box-shadow: var(--content-shadow-hover); border-color: var(--brand); }
.mp-page-body .sd-card-name    { color: var(--content-text); }
.mp-page-body .sd-card-tagline { color: var(--content-text-muted); }
.mp-page-body .sd-card-count   { color: var(--content-text-muted); }
.mp-content { max-width: 1400px; margin: 0 auto; padding: 32px 24px 64px; }
.mp-meta-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; min-height: 22px; }
.mp-result-count { font-size: 13px; color: var(--content-text-muted); font-weight: 500; }

/* ─── Card Grid ──────────────────────────────────────────────────────────── */
.mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
@media (max-width: 600px) { .mp-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.mp-card {
  background: var(--content-card);
  border: 1px solid var(--content-border);
  border-radius: var(--radius-md);
  box-shadow: var(--content-shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  cursor: pointer;
}
.mp-card:hover {
  border-color: var(--content-border);
  transform: translateY(-3px);
  box-shadow: var(--content-shadow-hover);
  color: inherit;
}
.mp-card-img-wrap { position: relative; width: 100%; aspect-ratio: 3 / 4; background: #F9FAFB; overflow: hidden; }
.mp-card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s ease; }
.mp-card:hover .mp-card-img { transform: scale(1.04); }
.mp-card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 52px; color: #D1D5DB; }

.mp-card-type-badge {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px; z-index: 2;
}
.mp-card-type-badge.vault  { background: rgba(124,108,248,0.18); color: var(--gold); border: 1px solid rgba(255,215,0,0.3); }
.mp-card-type-badge.direct { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.15); }

.mp-card-views {
  position: absolute; bottom: 10px; right: 10px;
  font-size: 11px; color: rgba(255,255,255,0.55);
  display: flex; align-items: center; gap: 4px; z-index: 2;
}

.mp-card-info { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; background: var(--content-card); }
.mp-card-title {
  font-weight: 600; font-size: 13px; line-height: 1.35; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  letter-spacing: -0.01em; color: var(--content-text);
}
.mp-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mp-card-condition {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 7px; border-radius: 4px; background: #F3F4F6; color: #374151;
}
.mp-card-year-cat { font-size: 11px; color: var(--content-text-muted); }
.mp-card-price-row { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; gap: 6px; }
.mp-card-price { font-size: 20px; font-weight: 800; color: var(--brand); letter-spacing: -0.03em; line-height: 1; }
.mp-card-currency { font-size: 11px; font-weight: 500; color: var(--content-text-muted); }
.mp-card-price-hidden { font-size: 12px; color: var(--content-text-muted); font-style: italic; margin-top: auto; padding-top: 8px; }

/* ─── Skeleton Loader ────────────────────────────────────────────────────── */
.mp-skeleton { background: var(--content-card); border: 1px solid var(--content-border); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--content-shadow); }
.mp-skeleton-img {
  width: 100%; aspect-ratio: 3 / 4;
  background: linear-gradient(90deg, #F3F4F6 0%, #E5E7EB 50%, #F3F4F6 100%);
  background-size: 200% 100%;
  animation: mp-shimmer 1.4s ease-in-out infinite;
}
.mp-skeleton-info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--content-card); }
.mp-skeleton-line {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, #F3F4F6 0%, #E5E7EB 50%, #F3F4F6 100%);
  background-size: 200% 100%;
  animation: mp-shimmer 1.4s ease-in-out infinite;
}
.mp-skeleton-line.short { width: 55%; }
.mp-skeleton-line.price { width: 40%; height: 18px; margin-top: 6px; }
@keyframes mp-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── Pagination ─────────────────────────────────────────────────────────── */
.mp-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.mp-page-btn {
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-muted); padding: 8px 14px; min-width: 40px; cursor: pointer;
  font-size: 14px; font-family: inherit; font-weight: 500; transition: border-color 0.15s, color 0.15s, background 0.15s; text-align: center;
}
.mp-page-btn:hover { border-color: rgba(255,215,0,0.4); color: var(--text); }
.mp-page-btn.active { border-color: var(--gold); color: var(--gold); background: rgba(124,108,248,0.08); font-weight: 700; cursor: default; }
.mp-page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.mp-page-btn.ellipsis { border-color: transparent; background: transparent; cursor: default; color: var(--text-muted); }

/* ─── Empty State ────────────────────────────────────────────────────────── */
.mp-empty { text-align: center; padding: 100px 24px; color: var(--text-muted); }
.mp-empty-icon { font-size: 56px; margin-bottom: 20px; opacity: 0.5; }
.mp-empty-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 8px; }
.mp-empty-sub { font-size: 14px; margin: 0 0 24px; color: var(--text-muted); }

/* ─── Responsive: hide right controls on small screens ──────────────────── */
@media (max-width: 768px) {
  .mp-filter-controls { display: none; }
  .mp-type-tabs { border-right: none; padding-right: 0; }
}
.empty .icon { font-size: 48px; margin-bottom: 16px; }

/* ─── Sidebar divider ────────────────────────────────────────────────────── */
.tcs-sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 16px;
}

/* ─── Sign-in Account Type Selector ─────────────────────────────────────── */
.acct-type-row { margin-bottom: 20px; }

.acct-type-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.acct-type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.acct-type-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.03);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: left;
  font-family: inherit;
  color: var(--text);
}

.acct-type-btn:hover {
  border-color: rgba(255,215,0,0.4);
  background: rgba(255,215,0,0.04);
}

.acct-type-btn.active {
  border-color: var(--gold);
  background: rgba(124,108,248,0.07);
}

.acct-type-icon { font-size: 24px; }

.acct-type-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.acct-type-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── Business Onboarding Wizard ─────────────────────────────────────────── */
.biz-onboard-wrap {
  max-width: 540px;
  margin: 48px auto;
  padding: 0 20px 80px;
}

.biz-onboard-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.biz-onboard-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.biz-progress {
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  margin-bottom: 32px;
  overflow: hidden;
}

.biz-progress-bar {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.biz-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
}

.biz-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.biz-step.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(124,108,248,0.08);
}

.biz-step.done {
  border-color: #28a745;
  background: rgba(40,167,69,0.1);
  color: #5cb85c;
}

.biz-step-line {
  flex: 1;
  max-width: 80px;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
}

.biz-panel { display: none; }
.biz-panel.active { display: block; }

.biz-nav {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 28px;
}

.biz-skip {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  text-decoration: underline;
}

.handle-preview {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.handle-preview span {
  color: var(--gold);
  font-weight: 600;
}

.upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-area:hover {
  border-color: rgba(255,215,0,0.4);
  background: rgba(255,215,0,0.03);
}

.upload-area.has-file {
  border-color: var(--gold);
  border-style: solid;
}

.upload-preview-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  display: block;
}

.upload-preview-banner {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════
   STOREFRONT  (/stores/:handle)
   ═══════════════════════════════════════════════════════════ */

.sf-banner {
  height: 160px;
  background: linear-gradient(135deg, #111217 0%, #1a1a24 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}

.sf-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11,11,13,0.2) 0%,
    rgba(11,11,13,0.7) 100%
  );
}

.sf-profile-row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  position: relative;
  margin-top: -56px;
  padding-bottom: 24px;
}

.sf-logo-wrap {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.sf-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  object-fit: cover;
  background: var(--card-bg);
  display: block;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.sf-logo-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: #1a1a24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.sf-info {
  flex: 1;
  padding-bottom: 4px;
}

.sf-name {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 4px;
}

.sf-handle-country {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.sf-handle { color: var(--gold); font-weight: 600; }
.sf-dot    { color: var(--border); }

.sf-tagline {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
}

.sf-actions {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 4px;
}

.sf-stats-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px 0;
  display: flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--border);
}

.sf-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 32px;
  gap: 4px;
}

.sf-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.03em;
  line-height: 1;
}

.sf-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.sf-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.sf-tab-bar {
  border-bottom: 1px solid var(--content-border);
  position: sticky;
  top: var(--header-height);
  z-index: 800;
  background: var(--content-bg);
}

.sf-tab-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  gap: 2px;
}

.sf-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  padding: 14px 18px;
  cursor: pointer;
  transition: color 0.15s;
  position: relative;
}

.sf-tab:hover { color: var(--text); }

.sf-tab.active { color: var(--gold); }

.sf-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px 2px 0 0;
}

.sf-content {
  background: var(--content-bg);
  color: var(--content-text);
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 32px 64px;
}

.sf-filter-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  align-items: center;
}

.sf-about-wrap { max-width: 680px; }

.sf-social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  margin-right: 16px;
  margin-bottom: 8px;
  transition: color 0.15s;
}

.sf-social-link:hover { color: var(--gold); }

@media (max-width: 600px) {
  .sf-banner { height: 110px; }
  .sf-profile-row { padding: 0 16px; margin-top: -40px; flex-wrap: wrap; }
  .sf-logo, .sf-logo-placeholder { width: 72px; height: 72px; font-size: 20px; }
  .sf-name { font-size: 20px; }
  .sf-stats-bar { flex-wrap: wrap; padding: 8px 16px; }
  .sf-stat { padding: 10px 16px; }
  .sf-stat-divider { display: none; }
  .sf-content { padding: 20px 16px 48px; }
}

/* ─── Store Directory Cards ──────────────────────────────────────────────── */
.sd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.sd-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.sd-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 0 24px rgba(255,215,0,0.1), 0 12px 40px rgba(0,0,0,0.5);
  color: var(--text);
}

.sd-card-banner {
  height: 90px;
  background: linear-gradient(135deg, #111217 0%, #1c1c28 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}

.sd-card-logo-wrap {
  position: absolute;
  bottom: -22px;
  left: 16px;
}

.sd-card-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  object-fit: cover;
  background: var(--card-bg);
}

.sd-card-logo-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: #1a1a24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
}

.sd-card-body { padding: 30px 16px 16px; }

.sd-card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.sd-card-handle {
  font-size: 12px;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 6px;
}

.sd-card-tagline {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sd-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.sd-card-count {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sd-card-country { font-size: 14px; }

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE — Global touch & typography
   ═══════════════════════════════════════════════════════════════════════════ */

button, a, [role="button"], input[type="submit"], input[type="button"] {
  touch-action: manipulation;
}

/* Only block callout on nav elements — allow on card images so users can save/share */
a.tcs-hdr-link, .bnav-tab, .mobile-drawer-link { -webkit-touch-callout: none; }
img.mp-card-img, .listing-photo-wrap img, img.cert-photo { -webkit-touch-callout: default; }

@media (max-width: 768px) {
  h1 { font-size: clamp(20px, 5vw, 28px); }
  h2 { font-size: clamp(16px, 4vw, 22px); }

  .tcs-main { padding: 16px; }
  .tcs-card { padding: 20px 16px; }

  /* Sidebar hidden on mobile */
  .tcs-sidebar { display: none !important; }
  .tcs-layout  { display: block; }

  /* Push main content above bottom nav */
  .tcs-main {
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 16px);
  }

  /* iOS auto-zoom prevention */
  input, select, textarea { font-size: 16px !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */

.bnav { display: none; }

@media (max-width: 768px) {
  .bnav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: rgba(13, 13, 16, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding-bottom: var(--safe-bottom);
    height: calc(var(--bottom-nav-height) + var(--safe-bottom));
    align-items: stretch;
  }

  .bnav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-muted);
    padding: 8px 4px;
    transition: color 0.15s;
    position: relative;
    min-width: 44px;
  }

  .bnav-tab:hover, .bnav-tab:active { color: var(--text); }
  .bnav-tab.active { color: var(--gold); }

  .bnav-tab.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--gold);
    border-radius: 0 0 2px 2px;
  }

  .bnav-tab:nth-child(3) .bnav-icon {
    background: var(--gold);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 12px rgba(255,215,0,0.3);
  }

  .bnav-icon  { font-size: 20px; line-height: 1; }
  .bnav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.02em; line-height: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE HEADER
   ═══════════════════════════════════════════════════════════════════════════ */

.tcs-hdr-search-toggle { display: none; }
.tcs-hdr-title         { display: none; }

@media (max-width: 768px) {
  .tcs-hdr-inner {
    height: 52px;
    padding: 0 16px;
    gap: 12px;
  }

  .tcs-hdr-nav { display: none; }

  .tcs-hdr-logo img { height: 28px; }

  .tcs-hdr-title {
    display: block;
    flex: 1;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
  }

  .tcs-hdr-right { gap: 4px; }
  .tcs-hdr-account { display: none; }

  #headerSearchInput {
    width: 0;
    padding: 0;
    border-color: transparent;
    opacity: 0;
    pointer-events: none;
    transition: width 0.25s, opacity 0.2s, padding 0.25s;
  }

  .tcs-hdr.search-open #headerSearchInput {
    width: 160px;
    padding: 7px 12px 7px 30px;
    opacity: 1;
    pointer-events: auto;
    border-color: var(--gold);
  }

  .tcs-hdr-search-toggle {
    display: flex;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
  }

  .tcs-hdr-search-toggle:active { background: rgba(255,255,255,0.07); }

  .tcs-hdr-signin { font-size: 12px; padding: 6px 14px; }
  .tcs-hdr-signin-ghost { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE — Hero, Pagination, Skeletons
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Compact hero sections on mobile */
  .mp-hero, .cs-hero, .brk-hero {
    padding: 24px 16px 20px;
  }

  @media (max-width: 480px) {
    .mp-hero-sub { display: none; }
  }

  /* Larger tap targets for pagination */
  .mp-pagination { gap: 6px; flex-wrap: wrap; justify-content: center; }
  .mp-page-btn   { min-height: 44px; min-width: 44px; padding: 10px 16px; font-size: 15px; }
  .mp-page-btn.ellipsis { min-width: 32px; padding: 10px 8px; }
}

/* ─── Global Skeleton Loader ─────────────────────────────────────────────── */
.skeleton-block {
  background: linear-gradient(90deg, #1a1a1f 25%, #222228 50%, #1a1a1f 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes skeleton-wave {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text         { height: 14px; margin-bottom: 8px; }
.skeleton-text.short   { width: 60%; }
.skeleton-text.medium  { width: 80%; }
.skeleton-card         { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.skeleton-cert         { aspect-ratio: 3/4; border-radius: 12px; margin-bottom: 12px; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE TABLES → CARD ROWS
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .tcs-table { border: none; }
  .tcs-table thead { display: none; }

  .tcs-table tbody tr {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 14px 16px;
    gap: 8px;
  }

  .tcs-table tbody tr:hover td { background: transparent; }

  .tcs-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    border-bottom: none !important;
    font-size: 14px;
  }

  .tcs-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
  }

  .tcs-table td:first-child { justify-content: center; margin-bottom: 4px; }
  .tcs-table td:first-child::before { display: none; }

  .card-thumb { width: 56px; height: 78px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BROWSE PAGE — MOBILE FILTER DRAWER
   ═══════════════════════════════════════════════════════════════════════════ */

.mp-filter-mobile-btn { display: none; }

/* Drawer category buttons */
.mp-drawer-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mp-drawer-cat-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 36px;
}
.mp-drawer-cat-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(124,108,248,0.08);
}

@media (max-width: 768px) {
  /* Hide desktop category chips — moved into filter drawer */
  .mp-cat-scroll { display: none; }

  .mp-filter-mobile-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    padding: 8px 14px;
    cursor: pointer;
    flex-shrink: 0;
    min-height: 38px;
  }

  .mp-filter-badge {
    background: var(--gold);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
  }

  .mp-filter-controls .mp-select { display: none; }
  .mp-type-tabs { display: none; }
}

.mp-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1200;
  backdrop-filter: blur(2px);
}
.mp-drawer-overlay.open { display: block; }

.mp-filter-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1300;
  background: #141418;
  border-top: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 0 20px calc(20px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
  max-height: 85vh;
  overflow-y: auto;
}
.mp-filter-drawer.open { transform: translateY(0); }

.mp-filter-drawer-handle {
  width: 36px;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  margin: 14px auto 20px;
}

.mp-drawer-title { font-size: 17px; font-weight: 700; margin-bottom: 24px; }
.mp-drawer-section { margin-bottom: 20px; }

.mp-drawer-type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.mp-dtype-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  padding: 12px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.mp-dtype-btn.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(124,108,248,0.08);
}

/* Browse grid — always 2 cols on small mobile */
@media (max-width: 600px) {
  .mp-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .mp-card-info { padding: 10px 12px 12px; }
  .mp-card-title { font-size: 12px; }
  .mp-card-price { font-size: 16px; }
  .mp-card-meta  { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD — MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card { padding: 14px 16px; }
  .stat-card .value { font-size: 22px; }

  .quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .action-card {
    min-width: 0;
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .kyc-banner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .kyc-banner .btn-gold { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MY LISTINGS — MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .mine-card-edit {
    opacity: 1;
    background: rgba(0,0,0,0.6);
  }

  #editModal { align-items: flex-end; padding: 0; }

  .edit-box {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    max-width: 100%;
    padding-bottom: var(--safe-bottom);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.1, 0.64, 1);
  }

  @keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  .edit-form-grid { grid-template-columns: 1fr; }
  .edit-form-grid .full { grid-column: 1; }

  .edit-modal-footer {
    position: sticky;
    bottom: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 12px 20px calc(12px + var(--safe-bottom));
    flex-direction: column-reverse;
    gap: 8px;
  }

  .edit-modal-footer .footer-right { width: 100%; flex-direction: column; }
  .edit-modal-footer .footer-right .btn-gold,
  .edit-modal-footer .footer-right .btn-secondary { width: 100%; }
  .btn-danger-outline { width: 100%; order: 1; margin-top: 4px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW LISTING — MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .listing-submit-bar {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--safe-bottom));
    left: 0;
    right: 0;
    background: rgba(13,13,16,0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    z-index: 900;
  }

  .listing-submit-bar .btn-gold { width: 100%; }
  .listing-form-content { padding-bottom: 90px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   VAULT — MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .tab-bar {
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    gap: 0;
  }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab-bar button { white-space: nowrap; padding: 14px 16px; font-size: 14px; min-width: 120px; }

  .form-grid-2 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   STOREFRONT — MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
  .sd-grid { grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
  .sd-card-body { padding: 26px 12px 14px; }
  .sd-card-name { font-size: 13px; }
  .sd-card-tagline { display: none; }

  .sf-profile-row { flex-wrap: wrap; gap: 12px; padding: 0 16px 16px; margin-top: -32px; }
  .sf-logo-wrap  { flex-basis: 100%; display: flex; justify-content: flex-start; }
  .sf-info       { flex-basis: 100%; }
  .sf-actions    { flex-basis: 100%; }

  .sf-stats-bar { display: grid; grid-template-columns: 1fr 1fr; padding: 0; }
  .sf-stat { padding: 14px 16px; border-bottom: 1px solid var(--border); }
  .sf-stat:nth-child(odd) { border-right: 1px solid var(--border); }
  .sf-stat-divider { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE NAV DRAWER (hamburger)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hamburger button — hidden on desktop */
.tcs-hdr-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  flex-shrink: 0;
  min-width: 36px;
  min-height: 36px;
}

.tcs-hdr-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

@media (max-width: 768px) {
  .tcs-hdr-hamburger { display: flex; }
}

/* Overlay */
.mobile-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 1400;
  backdrop-filter: blur(3px);
}
.mobile-drawer-overlay.open { display: block; }

/* Slide-in drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  z-index: 1500;
  background: #111214;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: var(--safe-bottom);
}
.mobile-drawer.open { transform: translateX(0); }

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}

.mobile-drawer-user {
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
}
.mobile-drawer-close:hover { color: var(--text); }

.mobile-drawer-links {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
  border-left: 3px solid transparent;
}
.mobile-drawer-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.mobile-drawer-link.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(124,108,248,0.06);
}

.mobile-drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 20px;
}

.mobile-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.mobile-drawer-signout {
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-family: inherit;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.mobile-drawer-signout:hover { color: var(--text); border-color: #555; }

/* ═══════════════════════════════════════════════════════════════════════════
   SIGN-IN — MOBILE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .signin-center { padding: 20px 16px; align-items: flex-start; padding-top: 40px; }
  .signin-wrap   { max-width: 100%; }
  .logo-wrap img { max-width: 160px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-subtle);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.mono-id {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--brand);
  letter-spacing: 0.03em;
}

.value-xl { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.value-lg  { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.value-md  { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTON SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

.btn-primary, .btn-secondary, .btn-tertiary, .btn-danger, .btn-danger-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  cursor: pointer;
  transition: background var(--ease-fast), box-shadow var(--ease-fast), transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
  border: none;
}
.btn-primary:active, .btn-danger:active { transform: scale(0.98); }
.btn-primary:disabled, .btn-danger:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-light);
  box-shadow: 0 0 20px var(--brand-glow);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
}
.btn-secondary:hover { background: var(--brand-tint-sm); color: var(--brand); }

.btn-tertiary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-tertiary:hover { border-color: rgba(255,255,255,0.25); color: var(--text); background: rgba(255,255,255,0.04); }

.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-danger:hover { background: #dc2626; }

.btn-danger-outline {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
}
.btn-danger-outline:hover { background: var(--red-tint); }

.btn-sm   { padding: 7px 16px; font-size: 12px; }
.btn-lg   { padding: 13px 32px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

/* ═══════════════════════════════════════════════════════════════════════════
   BADGE SYSTEM
   ═══════════════════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-dot::before {
  display: block;
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge-brand { background: var(--brand-tint-md);    color: var(--brand); }
.badge-info  { background: var(--blue-tint);        color: var(--blue);  }
.badge-warning { background: var(--amber-tint);     color: var(--amber); }

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATION BELL (moved from header.js inline style)
   ═══════════════════════════════════════════════════════════════════════════ */

.tcs-hdr-notif {
  position: relative;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color var(--ease-fast), background var(--ease-fast);
}
.tcs-hdr-notif:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.tcs-hdr-notif-badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--brand);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--navbar-bg);
}

.tcs-hdr-notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: -8px;
  width: 360px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  max-height: 440px;
  overflow: hidden;
  flex-direction: column;
}
.tcs-hdr-notif-dropdown.open { display: flex; }

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
#notifList { overflow-y: auto; flex: 1; }

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-muted);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--ease-fast);
}
.notif-item:hover { background: rgba(255,255,255,0.025); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--brand-tint-xs); }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex-shrink: 0; margin-top: 5px; }
.notif-dot.read { background: var(--surface-3); }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-meta { font-size: 11px; color: var(--text-subtle); margin-top: 2px; }
.notif-empty { padding: 28px; text-align: center; color: var(--text-subtle); font-size: 13px; }
.tcs-hdr-right { position: relative; }

/* ═══════════════════════════════════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════════════════════════════════ */

.stat-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--ease-normal);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--ease-normal);
}
.stat-card:hover::before { opacity: 1; }
.stat-card .s-label {
  font-size: 11px; font-weight: 600; color: var(--text-subtle);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 8px;
}
.stat-card .s-value {
  font-size: 30px; font-weight: 800; color: var(--brand);
  line-height: 1; letter-spacing: -0.03em;
}
.stat-card .s-sub { font-size: 12px; color: var(--text-subtle); margin-top: 6px; }

/* ═══════════════════════════════════════════════════════════════════════════
   DATA TABLES
   ═══════════════════════════════════════════════════════════════════════════ */

.tcs-table { width: 100%; border-collapse: collapse; }
.tcs-table thead th {
  font-size: 11px; font-weight: 700; color: var(--text-subtle);
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  text-align: left; white-space: nowrap;
  background: rgba(255,255,255,0.015);
}
.tcs-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-muted);
  font-size: 13.5px;
  vertical-align: middle;
  color: var(--text-secondary);
}
.tcs-table tbody tr:last-child td { border-bottom: none; }
.tcs-table tbody tr { transition: background var(--ease-fast); }
.tcs-table tbody tr:hover td { background: rgba(255,255,255,0.025); color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════════════
   TOGGLE SWITCH
   ═══════════════════════════════════════════════════════════════════════════ */

.toggle-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toggle-info  { flex: 1; }
.toggle-label { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.toggle-hint  { font-size: 13px; color: var(--text-muted); }

.toggle { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  display: block; width: 44px; height: 24px; border-radius: 12px;
  background: var(--surface-3); border: 1px solid var(--border);
  cursor: pointer; transition: background var(--ease-normal), border-color var(--ease-normal);
  position: relative;
}
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--text-subtle);
  transition: transform var(--ease-normal), background var(--ease-normal);
}
.toggle input:checked ~ .toggle-track { background: var(--brand); border-color: var(--brand); }
.toggle input:checked ~ .toggle-track .toggle-thumb { transform: translateX(20px); background: #fff; }

/* ═══════════════════════════════════════════════════════════════════════════
   INFO ROW
   ═══════════════════════════════════════════════════════════════════════════ */

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-muted);
  font-size: 14px;
  gap: 16px;
}
.info-row:last-child { border-bottom: none; }
.info-row-label { font-size: 13px; color: var(--text-muted); font-weight: 500; flex-shrink: 0; }
.info-row-value { color: var(--text); text-align: right; }

/* ═══════════════════════════════════════════════════════════════════════════
   MICRO-INTERACTIONS & GLOBAL POLISH
   ═══════════════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }
* { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }

::selection { background: var(--brand-tint-md); color: var(--text); }

*:focus { outline: none; }
*:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

button, a, [role="button"] { -webkit-tap-highlight-color: transparent; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tcs-main { animation: fadeUp 0.22s ease-out; }
@media (prefers-reduced-motion: reduce) { .tcs-main { animation: none; } }

.sd-card:hover {
  border-color: var(--brand);
  transform: translateY(-4px);
  box-shadow: var(--shadow-brand), var(--shadow-md);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR DIVIDER
   ═══════════════════════════════════════════════════════════════════════════ */

.tcs-sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 16px 4px;
}

/* ── Filter Bar ──────────────────────────────────────────────────────────── */
.tcs-filter-bar {
  background: var(--content-bg);
  border-bottom: 1px solid var(--content-border);
  padding: 14px 24px;
  position: sticky;
  top: var(--header-height);
  z-index: 10;
}
.tcs-filter-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.tcs-filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.tcs-filter-tabs { display: flex; gap: 4px; }
.tcs-filter-tab {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--content-border);
  background: transparent;
  color: var(--content-text-muted);
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: all .15s;
  white-space: nowrap;
}
.tcs-filter-tab.active,
.tcs-filter-tab:hover {
  background: var(--brand-tint-md);
  color: var(--brand);
  border-color: var(--brand);
  font-weight: 600;
}
.tcs-filter-select {
  background: var(--content-card);
  border: 1px solid var(--content-border);
  color: var(--content-text);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.tcs-filter-select:focus { outline: none; border-color: var(--brand); }
.tcs-filter-select option { background: #fff; color: #111827; }
.tcs-filter-input {
  background: var(--content-card);
  border: 1px solid var(--content-border);
  color: var(--content-text);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.tcs-filter-input:focus { outline: none; border-color: var(--brand); }
.tcs-filter-input::placeholder { color: var(--content-text-subtle); }


/* ─── Footer ─────────────────────────────────────────────────────────────── */
.tcs-footer {
  background: var(--sidebar-bg, #0f0f12);
  border-top: 1px solid var(--border, #1e1e24);
  margin-top: auto;
}

.tcs-footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 32px;
}

.tcs-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tcs-footer-logo-link { display: inline-block; }

.tcs-footer-logo {
  height: 40px;
  width: auto;
}

.tcs-footer-tagline {
  font-size: 13px;
  color: var(--text-muted, #a1a1aa);
  line-height: 1.6;
  max-width: 220px;
  margin: 0;
}

.tcs-footer-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #a1a1aa);
  margin: 0 0 12px 0;
}

.tcs-footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tcs-footer-nav a {
  font-size: 13px;
  color: var(--text-muted, #a1a1aa);
  text-decoration: none;
  transition: color 0.15s;
}

.tcs-footer-nav a:hover { color: var(--text, #fff); }

.tcs-footer-disclaimer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  font-size: 11px;
  color: var(--text-muted, #a1a1aa);
  border-top: 1px solid var(--border, #1e1e24);
  line-height: 1.7;
}

.tcs-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  border-top: 1px solid var(--border, #1e1e24);
  font-size: 12px;
  color: var(--text-muted, #a1a1aa);
}

.tcs-footer-bottom-links {
  display: flex;
  gap: 16px;
}

.tcs-footer-bottom-links a {
  color: var(--text-muted, #a1a1aa);
  text-decoration: none;
  transition: color 0.15s;
}

.tcs-footer-bottom-links a:hover { color: var(--text, #fff); }

@media (max-width: 1024px) {
  .tcs-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .tcs-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .tcs-footer-inner {
    grid-template-columns: 1fr;
    padding: 32px 20px 24px;
    gap: 28px;
  }
  .tcs-footer-disclaimer,
  .tcs-footer-bottom { padding: 16px 20px; }
  .tcs-footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .has-bottom-nav .tcs-footer {
    padding-bottom: calc(var(--bottom-nav-height, 64px) + 8px);
  }
}

/* ─── Auction Cards ──────────────────────────────────────── */
.auction-card {
  background: var(--content-card, var(--surface-2));
  border: 1px solid var(--content-border, var(--border));
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  position: relative;
}
.auction-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.auction-card-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--surface-1);
}
.auction-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auction-badge--no-reserve  { background: #16a34a; color: #fff; }
.auction-badge--reserve-met { background: #16a34a; color: #fff; }
.auction-badge--winning     { background: var(--brand); color: #fff; }
.auction-badge--outbid      { background: #dc2626; color: #fff; }
.auction-card-body  { padding: 12px; }
.auction-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--content-text, var(--text));
  margin: 0 0 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.auction-card-grade { font-size: 11px; color: var(--content-text-muted, var(--text-muted)); margin: 0 0 10px; }
.auction-card-price { font-size: 20px; font-weight: 700; color: var(--content-text, var(--text)); margin: 0 0 2px; }
.auction-card-price-label {
  font-size: 10px;
  color: var(--content-text-muted, var(--text-muted));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auction-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--content-border, var(--border));
}
.auction-bids { font-size: 12px; color: var(--content-text-muted, var(--text-muted)); }

/* ─── Auction grid ───────────────────────────────────────── */
.auction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 24px;
}
@media (max-width: 480px) {
  .auction-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px; }
}

/* ─── Countdown Timer ────────────────────────────────────── */
.auction-timer {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--content-text-muted, var(--text-muted));
}
.auction-timer svg { flex-shrink: 0; }
.auction-timer--soon     { color: #f97316; }
.auction-timer--critical { color: #dc2626; animation: pulse-text 1s ease-in-out infinite; }
@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ─── Auction Detail Page ────────────────────────────────── */
.auction-detail-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 32px;
  align-items: start;
}
.auction-sticky-panel { position: sticky; top: calc(var(--header-height, 72px) + 24px); }
.auction-current-bid  { font-size: 36px; font-weight: 700; color: var(--text); line-height: 1; }
.auction-timer-large  { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.auction-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px 0;
  overflow: hidden;
}
.auction-progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: width 1s linear;
}
.bid-input-row { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.bid-min-label { font-size: 12px; color: var(--text-muted); margin-bottom: 2px; }

/* ─── Bid History ────────────────────────────────────────── */
.bid-history-list { list-style: none; padding: 0; margin: 0; }
.bid-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.bid-history-row:last-child { border-bottom: none; }
.bid-history-bidder { font-weight: 600; color: var(--text); }
.bid-history-amount { font-weight: 700; color: var(--text); }
.bid-history-time   { color: var(--text-muted); font-size: 12px; }
.bid-history-proxy-tag {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 4px;
}
@media (max-width: 1024px) {
  .auction-detail-layout { grid-template-columns: 1fr; }
  .auction-sticky-panel { position: static; }
}
