/* ==========================================================================
   STROLLHOLIC — NOCTURNE ECLECTIC DESIGN SYSTEM
   Palette: Charcoal #24242C | Dusty Purple #78669E | Gold #F2C14E | #F5F6F7
   ========================================================================== */
:root {
  --platinum: #F5F6F7;
  --mist: #B8B5C4;
  --slate: #837F92;
  --charcoal: #24242C;
  --champagne: #F2C14E;
  --purple: #78669E;
  --gold: #F2C14E;

  --bg: var(--charcoal);
  --surface: rgba(36, 36, 44, 0.78);
  --surface-strong: rgba(36, 36, 44, 0.92);
  --surface-elevated: rgba(120, 102, 158, 0.12);
  --text-primary: var(--platinum);
  --text-secondary: var(--mist);
  --text-muted: var(--slate);
  --accent: var(--gold);
  --accent-secondary: var(--purple);
  --border: rgba(184, 181, 196, 0.22);
  --border-strong: rgba(242, 193, 78, 0.48);
  --btn-primary-bg: var(--gold);
  --btn-primary-fg: #1C1C22;
  --btn-primary-hover: #F7CE6D;
  --btn-primary-hover-fg: #1C1C22;
  --glow-a: rgba(120, 102, 158, 0.28);
  --glow-b: rgba(242, 193, 78, 0.14);
}

[data-theme="light"] {
  --bg: #F6F5F8;
  --surface: rgba(246, 245, 248, 0.86);
  --surface-strong: rgba(246, 245, 248, 0.96);
  --surface-elevated: rgba(107, 91, 142, 0.08);
  --text-primary: #24242C;
  --text-secondary: #5C586B;
  --text-muted: #7B768A;
  --accent: #6B5B8E;
  --accent-secondary: #D49B1A;
  --border: rgba(107, 91, 142, 0.22);
  --border-strong: rgba(36, 36, 44, 0.34);
  --btn-primary-bg: #24242C;
  --btn-primary-fg: #F2C14E;
  --btn-primary-hover: #6B5B8E;
  --btn-primary-hover-fg: #F5F6F7;
  --glow-a: rgba(107, 91, 142, 0.22);
  --glow-b: rgba(242, 193, 78, 0.16);
}

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

html {
  font-size: 16px;
  background-color: var(--bg);
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: clip;
  transition: background-color 0.3s ease, color 0.3s ease;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--accent);
  color: var(--btn-primary-fg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  display: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 15%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 15%, transparent 100%);
  opacity: 0.35;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 clamp(20px, 4.5vw, 80px);
  position: relative;
  z-index: 2;
}

/* Floating Glass Navigation */
.nav {
  position: sticky;
  top: 14px;
  z-index: 30;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: background-color 0.28s ease, border-color 0.28s ease;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo {
  height: 58px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: contrast(1.08) brightness(1.04);
  transition: filter 0.25s ease;
}

[data-theme="light"] .brand-logo {
  filter: brightness(0.24) contrast(1.25);
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
}

.brand-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.theme-toggle,
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.theme-toggle:hover,
.pill-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.theme-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--text-primary);
}

.nav-cta,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-cta:hover,
.btn-primary:hover {
  background: var(--btn-primary-hover);
  color: var(--btn-primary-hover-fg);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Media Frames — Neutral background so product photos keep natural colors */
.empty-media {
  position: relative;
  width: 100%;
  border-radius: 16px;
  border: 1px dashed var(--border-strong);
  background: var(--surface-elevated);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.empty-media.has-image {
  border-style: solid;
  border-color: var(--border);
  background: #F5F6F7;
}

.empty-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  display: block;
}

.empty-media-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.8;
}

@media (max-width: 600px) {
  .container {
    padding: 0 14px;
  }

  .nav {
    top: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand-logo {
    height: 38px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }

  .brand-name {
    font-size: 1.05rem;
    letter-spacing: 0.08em;
  }

  .nav-actions {
    gap: 6px;
  }

  #themeLabel {
    display: none;
  }

  .theme-toggle {
    padding: 7px;
  }

  .pill-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .nav-cta {
    display: none;
  }
}

/* Shared Deep Charcoal Footer */
.site-footer {
  position: relative;
  z-index: 2;
  background: #2B2E33;
  color: #F5F6F7;
  border-top: 1px solid rgba(193, 196, 200, 0.22);
  padding: 56px clamp(20px, 4.5vw, 80px) 36px;
  margin-top: 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(120px, 1fr));
  gap: 36px;
  margin-bottom: 40px;
}

.footer-desc {
  color: #C1C4C8;
  font-size: 0.88rem;
  line-height: 1.65;
  max-width: 320px;
}

.footer-col-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #C8B99F;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #C1C4C8;
  text-decoration: none;
  font-size: 0.86rem;
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: #F5F6F7;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(193, 196, 200, 0.16);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: #7B7F85;
}

/* Legal & Policy Editorial Layout */
.legal-hero {
  padding: clamp(44px, 7vh, 80px) 0 28px;
  border-bottom: 1px solid var(--border);
}

.legal-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.legal-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  font-weight: 400;
  line-height: 1.06;
  margin-bottom: 12px;
}

.legal-meta {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.legal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  padding: 36px 0 80px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 96px;
  border-radius: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.legal-toc a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.legal-toc a:hover {
  color: var(--accent);
}

.legal-article {
  max-width: 70ch;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.legal-section {
  scroll-margin-top: 104px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal-section:last-child {
  border-bottom: 0;
}

.legal-section h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.legal-section p,
.legal-section li {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.legal-section p + p {
  margin-top: 12px;
}

.legal-section ul {
  margin: 12px 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-callout {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.65;
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
  }
}

@media (max-width: 540px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Seller Side Panel & Mobile Burger Drawer */
.seller-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  padding: 24px 0 64px;
  align-items: start;
  transition: grid-template-columns 0.25s ease;
}

.seller-shell.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
  gap: 0;
}

.seller-sidebar {
  position: sticky;
  top: 94px;
  border-radius: 20px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.seller-shell.sidebar-collapsed .seller-sidebar {
  opacity: 0;
  pointer-events: none;
  padding: 0;
  border: 0;
}

.seller-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.trust-value,
.stat-value,
.kpi-value,
.card-price,
.feed-price,
.detail-price {
  font-variant-numeric: tabular-nums;
}

.seller-nav-item:hover,
.seller-nav-item.active {
  background: var(--surface-elevated);
  border-color: var(--accent);
  color: var(--accent);
}

.seller-main {
  min-width: 0;
}

.seller-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.burger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.seller-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 44;
  background: rgba(43, 46, 51, 0.68);
  backdrop-filter: blur(8px);
  display: none;
}

.seller-drawer-backdrop.open {
  display: block;
}

@media (max-width: 900px) {
  .seller-shell,
  .seller-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .seller-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 84vw);
    z-index: 48;
    border-radius: 0 22px 22px 0;
    background: var(--bg);
    transform: translateX(-105%);
    opacity: 1 !important;
    pointer-events: auto !important;
    padding: 22px !important;
    border: 1px solid var(--border-strong) !important;
  }

  .seller-sidebar.mobile-open {
    transform: translateX(0);
  }
}
