/* ==========================================================================
   Skymart — design tokens
   ========================================================================== */
:root {
  --bg: #faf6ef;
  --surface: #ffffff;
  --surface-2: #f4ede1;
  --ink: #1f1d36;
  --ink-soft: #4a4660;
  --muted: #7a7489;
  --line: #e9e0d1;
  --line-strong: #d9cdb8;

  --brand: #283b7a;
  --brand-deep: #1b2858;
  --brand-soft: #e7ebf7;
  --accent: #e0912f;
  --accent-deep: #c2741a;
  --accent-soft: #fbead2;

  --success: #2f7d5b;
  --success-soft: #e3f2ea;
  --warning: #a8660f;
  --warning-soft: #fdf0dc;
  --danger: #b4443a;
  --danger-soft: #fbe6e3;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(31, 29, 54, 0.06);
  --shadow: 0 1px 2px rgba(31, 29, 54, 0.05), 0 8px 24px -12px rgba(31, 29, 54, 0.18);
  --shadow-lg: 0 24px 60px -24px rgba(31, 29, 54, 0.35);

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --container: 1200px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-deep); }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
h1 em, h2 em { font-style: italic; color: var(--accent-deep); font-weight: 500; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.narrow-sm { max-width: 480px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: .6em; }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.pre-line { white-space: pre-line; }
.text-danger { color: var(--danger) !important; }
.h-sm { font-size: 1.25rem; }
.h-md { font-size: clamp(1.6rem, 3vw, 2rem); }
.inline-form { display: inline; }

/* ==========================================================================
   Buttons, chips, badges
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .78em 1.4em; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 .95rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .18s, box-shadow .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .5em 1em; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px rgba(40, 59, 122, .7); }
.btn-primary:hover { background: var(--brand-deep); color: #fff; }
.btn-accent { background: var(--accent); color: #1f1d36; }
.btn-accent:hover { background: #ecaa52; color: #1f1d36; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #256649; color: #fff; }
.btn-warning { background: var(--warning-soft); color: var(--warning); border-color: #f1d3a6; }
.btn-warning:hover { background: #fae3c0; color: var(--warning); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-link { background: none; color: var(--ink-soft); padding-left: .6em; padding-right: .6em; }
.btn-link:hover { color: var(--brand); }
.btn-outline-light { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); color: #fff; border-color: #fff; }

.chip {
  display: inline-flex; align-items: center; padding: .45em 1em; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
  font-size: .88rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: all .18s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip-active:hover { color: #fff; }
.chip-quiet { background: transparent; border-style: dashed; }

.badge { display: inline-block; padding: .2em .7em; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; vertical-align: middle; }
.badge-pending { background: var(--warning-soft); color: var(--warning); }
.badge-approved { background: var(--success-soft); color: var(--success); }
.badge-rejected { background: var(--danger-soft); color: var(--danger); }
.badge-hidden { background: #ecebf0; color: #5d5a6b; }
.private-tag { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); background: var(--brand-soft); padding: .1em .5em; border-radius: 6px; vertical-align: middle; }

.link-arrow { font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; }
.link-back { display: inline-block; margin-bottom: 1rem; color: var(--muted); text-decoration: none; font-size: .9rem; }
.link-back:hover { color: var(--ink); }

/* ==========================================================================
   Header & navigation
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, .88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.logo { width: 38px; height: 38px; }
.brand-name { font-family: var(--font-serif); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.02em; }
.brand-name small { font-family: var(--font-sans); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .7; margin-left: 4px; }
.brand-light, .brand-light:hover { color: #fff; }

.site-nav { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 16px; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px;
  color: var(--ink-soft); font: 600 .95rem/1 var(--font-sans); text-decoration: none;
  background: none; border: 0; cursor: pointer; transition: color .15s, background .15s;
}
.nav-link:hover, .has-menu.open > .nav-link { color: var(--ink); background: rgba(31, 29, 54, .05); }
.nav-link.is-active { color: var(--brand); }
.chev { width: 12px; height: 12px; transition: transform .2s; }
.has-menu.open > .nav-link .chev { transform: rotate(180deg); }
.nav-actions { display: flex; align-items: center; gap: 6px; }

/* Dropdown: level 1 (categories) */
.menu {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  width: 290px; padding: 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.menu::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* hover bridge */
.has-menu.open > .menu { display: block; animation: drop .16s ease-out; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-heading { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 12px 6px; margin: 0; }
.menu-list, .submenu-list { list-style: none; margin: 0; padding: 0; }
.menu-item { position: relative; }
.menu-row { display: flex; align-items: center; border-radius: var(--radius-sm); transition: background .15s; }
.menu-item:hover > .menu-row, .menu-item.open > .menu-row { background: var(--surface-2); }
.menu-link { flex: 1; padding: 10px 12px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.menu-link:hover { color: var(--brand); }
.sub-trigger { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; padding: 6px 8px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; }
.sub-trigger:hover { color: var(--ink); background: rgba(31, 29, 54, .06); }
.sub-trigger svg { width: 12px; height: 12px; transition: transform .2s; }
.menu-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); font-size: .75rem; font-weight: 700; text-align: center; }
.menu-soon { margin-right: 12px; font-size: .72rem; color: var(--muted); font-style: italic; }
.menu-footer-link { display: block; margin-top: 6px; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--brand); font-weight: 600; font-size: .88rem; text-decoration: none; }
.menu-footer-link:hover { color: var(--brand-deep); }

/* Dropdown: level 2 (sellers in a category) */
.submenu {
  display: none; position: absolute; top: -10px; left: calc(100% + 10px); z-index: 61;
  width: 260px; padding: 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.submenu::before { content: ''; position: absolute; top: 0; bottom: 0; left: -14px; width: 14px; } /* hover bridge */
.submenu.flip { left: auto; right: calc(100% + 10px); }
.submenu.flip::before { left: auto; right: -14px; }
.menu-item.open > .submenu { display: block; animation: drop .16s ease-out; }
.menu-item.open > .menu-row .sub-trigger svg { transform: rotate(90deg); }
.submenu-list { max-height: 320px; overflow-y: auto; }
.seller-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 500; font-size: .93rem; }
.seller-link:hover { background: var(--surface-2); color: var(--brand); }

@media (hover: hover) and (min-width: 961px) {
  .has-menu:hover > .menu { display: block; }
  .has-menu:hover > .nav-link .chev { transform: rotate(180deg); }
  .menu-item.has-sub:hover > .submenu { display: block; }
  .menu-item.has-sub:hover > .menu-row .sub-trigger svg { transform: rotate(90deg); }
  /* while hovering inside a menu, only the hovered category shows its sellers */
  .menu:hover .menu-item.open:not(:hover) > .submenu { display: none; }
  .menu:hover .menu-item.open:not(:hover) > .menu-row { background: none; }
}

/* Avatars */
.avatar {
  --h: 30;
  display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%;
  background: hsl(var(--h) 70% 90%); color: hsl(var(--h) 45% 32%);
  font-family: var(--font-serif); font-weight: 600; object-fit: cover;
}
.avatar-xs { width: 28px; height: 28px; font-size: .85rem; }
.avatar-sm { width: 42px; height: 42px; font-size: 1.1rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2.8rem; box-shadow: 0 0 0 6px var(--surface), var(--shadow); }

/* Mobile navigation */
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); cursor: pointer; position: relative; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { position: absolute; left: 12px; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; content: ''; }
.nav-toggle-bars { top: 21px; }
.nav-toggle-bars::before { left: 0; top: -6px; }
.nav-toggle-bars::after { left: 0; top: 6px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 12px;
    padding: 12px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); max-height: calc(100vh - 72px); overflow-y: auto;
  }
  .nav-open .site-nav { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-link { width: 100%; justify-content: space-between; padding: 14px 12px; border-radius: var(--radius-sm); font-size: 1rem; }
  .menu, .submenu { position: static; width: auto; box-shadow: none; border: 0; padding: 0 0 0 10px; background: transparent; animation: none !important; }
  .menu::before, .submenu::before { display: none; }
  .menu-heading { display: none; }
  .submenu { padding: 4px 0 8px 14px; margin-left: 12px; border-left: 2px solid var(--line); }
  .submenu .menu-heading { display: block; padding-left: 10px; }
  .menu-footer-link { border-top: 0; margin: 0; }
  .nav-actions { border-top: 1px solid var(--line); padding-top: 14px; justify-content: flex-start; flex-wrap: wrap; }
}

/* ==========================================================================
   Flash & alerts
   ========================================================================== */
.flash-stack { padding-top: 16px; display: grid; gap: 8px; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .93rem; border: 1px solid transparent; margin-bottom: 12px; }
.alert ul { margin: 0; padding-left: 1.2em; }
.alert-success { background: var(--success-soft); color: #1f5a40; border-color: #c4e3d2; }
.alert-error { background: var(--danger-soft); color: #8a2f27; border-color: #f2c6c0; }
.alert-info { background: var(--brand-soft); color: var(--brand-deep); border-color: #cfd7ef; }
.note { background: var(--warning-soft); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .9rem; margin: 8px 0 12px; }

/* ==========================================================================
   Hero & page heroes
   ========================================================================== */
.hero { position: relative; overflow: hidden; padding: 64px 0 72px; }
.hero::before {
  content: ''; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224, 145, 47, .18), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; left: -200px; bottom: -300px; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(40, 59, 122, .10), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.6rem); line-height: 1.02; margin-bottom: .35em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 36px; }
.hero-stats { display: flex; gap: 36px; margin: 0; padding-top: 24px; border-top: 1px solid var(--line); }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { font-size: .82rem; color: var(--muted); }
.hero-stats dd { margin: 0; font-family: var(--font-serif); font-size: 2rem; font-weight: 600; color: var(--brand); line-height: 1.1; }

.hero-art { display: flex; justify-content: center; }
.hero-stack { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1 / 1.05; }
.hero-tile { position: absolute; overflow: hidden; border-radius: 24px; box-shadow: var(--shadow-lg); border: 6px solid var(--surface); background: var(--surface); }
.hero-tile img, .hero-tile .placeholder { width: 100%; height: 100%; object-fit: cover; }
.hero-tile-1 { width: 62%; height: 68%; left: 0; top: 6%; transform: rotate(-4deg); }
.hero-tile-2 { width: 52%; height: 56%; right: 0; top: 0; transform: rotate(5deg); }
.hero-tile-3 { width: 50%; height: 48%; right: 8%; bottom: 0; transform: rotate(-2deg); z-index: 2; }
.hero-badge {
  position: absolute; left: 4%; bottom: 8%; z-index: 3; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow);
  font-size: .85rem; font-weight: 600;
}
.hero-badge-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }

.page-hero { padding: 56px 0 40px; background: linear-gradient(180deg, var(--surface-2), var(--bg)); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: .3em; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }

/* Category chips bar */
.chips-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.chips { display: flex; gap: 8px; padding-top: 14px; padding-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 64px 0; }
.section-tight { padding: 36px 0; }
.section-top { padding-top: 32px; }
.section-tint { background: var(--surface-2); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin-bottom: .15em; }
.section-head-center { justify-content: center; text-align: center; }
.section-sub { color: var(--muted); margin: 0; max-width: 60ch; }

.empty-state { text-align: center; padding: 56px 24px; }
.empty-state p { color: var(--muted); max-width: 48ch; margin-left: auto; margin-right: auto; }

/* Listing cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  border: 1px solid rgba(233, 224, 209, .7); transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.card-media { position: relative; aspect-ratio: 4 / 3.4; overflow: hidden; background: var(--surface-2); }
.card-media img, .card-media .placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-kind { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .92); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: 4px; }
.card-title { font-family: var(--font-sans); font-size: 1.02rem; font-weight: 600; line-height: 1.35; margin-bottom: 14px; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .88rem; }
.card-seller { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-price { font-weight: 700; color: var(--brand); white-space: nowrap; }

/* Placeholder art for listings without photos */
.placeholder {
  --h: 30;
  display: grid; place-items: center; width: 100%; height: 100%;
  background:
    radial-gradient(circle at 20% 20%, hsl(var(--h) 80% 94%) 0 18%, transparent 19%),
    radial-gradient(circle at 85% 80%, hsl(calc(var(--h) + 20) 70% 82%) 0 22%, transparent 23%),
    linear-gradient(135deg, hsl(var(--h) 72% 88%), hsl(calc(var(--h) + 25) 62% 78%));
}
.placeholder span { font-family: var(--font-serif); font-size: clamp(2rem, 6vw, 4rem); font-weight: 600; font-style: italic; color: hsl(var(--h) 45% 32%); opacity: .75; }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { background: var(--surface); padding: 32px 28px; border-radius: var(--radius); box-shadow: var(--shadow); }
.step-num { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); font-family: var(--font-serif); font-size: 1.3rem; font-weight: 700; }
.steps p { color: var(--ink-soft); margin: 0; }

/* CTA band */
.cta-band { background: var(--brand); color: #fff; padding: 56px 0; position: relative; overflow: hidden; }
.cta-band::after { content: ''; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(243, 194, 122, .12); }
.cta-inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: rgba(255, 255, 255, .78); margin: 0; max-width: 54ch; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* About */
.prose-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.prose h2 { font-size: 1.6rem; margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-soft); font-size: 1.05rem; }
.about-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.value-card { background: var(--surface); padding: 22px; border-radius: var(--radius); box-shadow: var(--shadow); }
.value-card:nth-child(1) { border-top: 4px solid var(--accent); }
.value-card:nth-child(2) { border-top: 4px solid var(--brand); }
.value-card:nth-child(3) { border-top: 4px solid var(--success); }
.value-card:nth-child(4) { border-top: 4px solid #c4553f; }
.value-card p { color: var(--ink-soft); font-size: .92rem; margin: 0; }

/* Category overview */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.category-card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .25s, box-shadow .25s; }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.category-media { aspect-ratio: 16 / 10; overflow: hidden; }
.category-media img, .category-media .placeholder { width: 100%; height: 100%; object-fit: cover; }
.category-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.category-body p { color: var(--muted); font-size: .92rem; }
.category-meta { margin-top: auto; font-size: .82rem; font-weight: 600; color: var(--brand); }

/* Seller cards (category page) */
.seller-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; }
.seller-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .2s, box-shadow .2s, transform .2s; }
.seller-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.seller-card .avatar-lg { width: 52px; height: 52px; font-size: 1.3rem; }
.seller-card-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.seller-card-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seller-card-count { font-size: .78rem; font-weight: 700; color: var(--accent-deep); background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; }

/* Seller page */
.seller-head { display: flex; gap: 32px; align-items: center; }
.seller-head h1 { margin-bottom: .2em; }
.seller-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.privacy-note { display: flex; gap: 14px; align-items: flex-start; max-width: 760px; padding: 20px 24px; background: var(--brand-soft); border-radius: var(--radius); color: var(--brand-deep); }
.privacy-note svg { width: 26px; height: 26px; flex-shrink: 0; }
.privacy-note p { margin: 0; font-size: .95rem; }

/* Listing detail */
.detail-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.gallery-main { aspect-ratio: 1 / 1; border-radius: 20px; overflow: hidden; background: var(--surface-2); box-shadow: var(--shadow); }
.gallery-main img, .gallery-main .placeholder { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumb { width: 76px; height: 76px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: none; opacity: .7; transition: opacity .2s, border-color .2s; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.is-active, .gallery-thumb:hover { opacity: 1; border-color: var(--brand); }
.detail-info h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: .2em; }
.detail-price { font-family: var(--font-serif); font-size: 1.7rem; font-weight: 600; color: var(--brand); margin-bottom: 20px; }
.seller-chip { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); margin-bottom: 20px; transition: border-color .2s; }
.seller-chip:hover { border-color: var(--brand); color: var(--ink); }
.seller-chip-go { margin-left: auto; font-size: .85rem; font-weight: 600; color: var(--brand); }
.detail-desc { color: var(--ink-soft); margin-bottom: 24px; }
.inquire { background: var(--surface); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--accent); scroll-margin-top: 90px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   Forms & panels
   ========================================================================== */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-cat { grid-template-columns: 2fr 1fr 100px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.field > span { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field > span em { font-style: normal; font-weight: 400; color: var(--muted); }
input[type=text], input[type=password], input[type=search], input[type=number], input:not([type]), select, textarea {
  width: 100%; padding: 11px 14px; font: inherit; font-size: .95rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(40, 59, 122, .12); }
input[type=file] { font-size: .88rem; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 4px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.check-field { align-self: end; padding-bottom: 12px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

.segmented { display: flex; gap: 8px; border: 0; padding: 0; margin: 0; flex-wrap: wrap; }
.segmented legend { font-size: .88rem; font-weight: 600; margin-bottom: 6px; padding: 0; width: 100%; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-block; padding: 9px 18px; border: 1.5px solid var(--line-strong); border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--ink-soft); transition: all .15s; }
.segmented input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.segmented input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.private-box { padding: 16px; border-radius: var(--radius-sm); background: var(--brand-soft); border: 1px dashed #b8c3e6; display: flex; flex-direction: column; gap: 12px; }
.private-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .85rem; font-weight: 700; color: var(--brand-deep); }
.private-title svg { width: 18px; height: 18px; }

.dropzone { position: relative; display: grid; place-items: center; padding: 28px 16px; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--bg); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-text { color: var(--muted); font-size: .9rem; }
.dropzone-text strong { color: var(--brand); }
.image-manage { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.image-manage:empty { display: none; }
.image-tile { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; background: var(--surface-2); border: 1px solid var(--line); }
.image-tile img { width: 100%; height: 100%; object-fit: cover; }
.image-remove { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; background: rgba(255, 255, 255, .92); font-size: .78rem; font-weight: 600; cursor: pointer; }
.image-tile:has(input:checked) img { opacity: .35; filter: grayscale(1); }
.image-tile:has(input:checked) .image-remove { background: var(--danger); color: #fff; }

.photo-row { display: flex; gap: 18px; align-items: center; }

/* Auth pages */
.auth-section { padding: 56px 0 80px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.auth-intro h1 { font-size: clamp(2.2rem, 4.4vw, 3.2rem); }
.auth-panel { padding: 32px; box-shadow: var(--shadow); }
.check-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 32px; color: var(--ink-soft); }
.check-list li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: .75rem; font-weight: 700; }

/* ==========================================================================
   Seller dashboard
   ========================================================================== */
.dash-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.dash-bar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 18px; padding-bottom: 0; flex-wrap: wrap; }
.dash-bar .eyebrow { margin-bottom: 0; }
.dash-hello { margin: 0 0 14px; font-size: 1.1rem; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 16px; color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .92rem; border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-row-4 { grid-template-columns: repeat(4, 1fr); }
.stat { display: flex; flex-direction: column; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.stat-link:hover { border-color: var(--brand); color: var(--ink); }
.stat-alert { border-color: #f1d3a6; background: var(--warning-soft); }
.stat-num { font-family: var(--font-serif); font-size: 2rem; font-weight: 600; line-height: 1.1; }
.stat-label { font-size: .85rem; color: var(--muted); }

.row-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.row-item { display: flex; align-items: center; gap: 16px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.row-list-compact .row-item { padding: 10px; border-color: transparent; background: var(--bg); }
.row-thumb { width: 76px; height: 76px; flex-shrink: 0; border-radius: 12px; overflow: hidden; }
.row-list-compact .row-thumb { width: 52px; height: 52px; }
.row-thumb img, .row-thumb .placeholder { width: 100%; height: 100%; object-fit: cover; }
.row-thumb .placeholder span, .td-thumb .placeholder span { font-size: 1.4rem; }
.row-main { flex: 1; min-width: 0; }
.row-main p { margin: 2px 0 0; }
.row-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-body { background: #f6f3ee; }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px; padding: 22px 14px; background: var(--brand-deep); color: #fff; overflow-y: auto; }
.admin-side .brand { padding: 0 8px; }
.admin-side .brand-name { font-size: 1.25rem; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-link { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; color: rgba(255, 255, 255, .75); text-decoration: none; font-weight: 500; font-size: .93rem; }
.admin-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.admin-link.is-active { background: rgba(255, 255, 255, .14); color: #fff; }
.admin-link-btn { width: 100%; border: 0; background: none; cursor: pointer; font-family: inherit; text-align: left; }
.admin-count { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: .75rem; font-weight: 700; text-align: center; }
.admin-side-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 12px; }
.admin-main { min-width: 0; }
.admin-top { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--surface); }
.admin-menu-btn { display: none; margin-right: auto; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font: 600 .9rem var(--font-sans); cursor: pointer; }
.admin-content { padding: 28px 32px 64px; max-width: 1240px; }
.admin-content .flash-stack { padding: 0; width: auto; max-width: none; }
.admin-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-page-head h1 { margin-bottom: .2em; }
.admin-page-head p { margin: 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }

.filter-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-bar .tabs { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.filter-bar .tab { border: 0; border-radius: 999px; padding: 7px 14px; font-size: .86rem; }
.filter-bar .tab.is-active { background: var(--brand); color: #fff; }
.search { max-width: 320px; border-radius: 999px !important; }

.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fcfaf6; }
.table a { text-decoration: none; }
.td-thumb { width: 64px; }
.td-thumb img, .td-thumb .placeholder { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.row-muted { opacity: .6; }

.review-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.review-side { position: sticky; top: 20px; }
.info-list { margin: 0; display: grid; gap: 10px; }
.info-list div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; font-size: .9rem; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; word-break: break-word; }
.danger-zone { margin-top: 8px; }
.danger-panel { border-color: #f2c6c0; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.plain-list p { margin: 2px 0 0; }
.section-label { margin: 28px 0 12px; }
.cat-list { display: grid; gap: 10px; }
.cat-item { padding: 0; margin: 0; }
.cat-item summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.cat-item summary::-webkit-details-marker { display: none; }
.cat-edit { margin-left: auto; font-size: .85rem; font-weight: 600; color: var(--brand); }
.cat-item[open] summary { border-bottom: 1px solid var(--line); }
.cat-item > form { padding: 16px 20px 0; }
.cat-item > form:last-child { padding-bottom: 16px; }
.narrow-form { max-width: 520px; }
.inquiry-list { display: grid; gap: 12px; }
.inquiry { display: flex; gap: 20px; align-items: flex-start; margin: 0; }
.inquiry.is-handled { opacity: .65; }
.inquiry-main { flex: 1; min-width: 0; }
.inquiry-main p { margin: 4px 0 0; }
.seller-contact { padding-top: 8px; margin-top: 8px !important; border-top: 1px dashed var(--line); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: #191833; color: rgba(255, 255, 255, .7); padding: 56px 0 24px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; }
.footer-brand p { margin-top: 16px; font-size: .92rem; max-width: 36ch; }
.site-footer h4 { font-family: var(--font-sans); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: rgba(255, 255, 255, .7); text-decoration: none; font-size: .93rem; }
.site-footer a:hover { color: #fff; }
.footer-note { font-size: .9rem; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .review-grid { grid-template-columns: 1fr; }
  .review-side { position: static; }
  .admin-cols { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .hero { padding: 40px 0 56px; }
  .hero-grid, .detail-grid, .prose-grid, .auth-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { order: -1; }
  .hero-stack { max-width: 340px; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-row-4 { grid-template-columns: repeat(2, 1fr); }

  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 80; transform: translateX(-100%); transition: transform .25s; }
  .admin-side.open { transform: none; box-shadow: var(--shadow-lg); }
  .admin-menu-btn { display: inline-block; }
  .admin-top { padding: 12px 16px; }
  .admin-content { padding: 20px 16px 48px; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 44px 0; }
  .header-inner { height: 64px; }
  .site-nav { top: 64px; max-height: calc(100vh - 64px); }
  .hero-stats { gap: 22px; }
  .hero-stats dd { font-size: 1.6rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 12px; }
  .card-title { font-size: .92rem; margin-bottom: 8px; }
  .card-foot { flex-direction: column; gap: 2px; font-size: .8rem; }
  .card-seller { max-width: 100%; }
  .form-row, .form-row-cat { grid-template-columns: 1fr; }
  .about-aside { grid-template-columns: 1fr; }
  .seller-head { flex-direction: column; align-items: flex-start; gap: 18px; }
  .avatar-xl { width: 88px; height: 88px; font-size: 2.2rem; }
  .stat-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat { padding: 12px; }
  .stat-num { font-size: 1.5rem; }
  .stat-label { font-size: .75rem; }
  .row-item { flex-wrap: wrap; }
  .row-actions { width: 100%; justify-content: flex-start; }
  .inquiry { flex-direction: column; gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .panel, .auth-panel { padding: 18px; }
  .search { max-width: none; }
  .filter-bar .tabs { border-radius: var(--radius-sm); }
}
