/* =====================================================================
   ZS TRADER — MAIN STYLESHEET
   Design tokens, base styles, layout and components for the public site.
   The admin panel reuses the tokens defined here (admin/css/admin.css).
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. DESIGN TOKENS
   --------------------------------------------------------------------- */
:root {
  /* Typography */
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --text-xs: clamp(0.72rem, 0.7rem + 0.1vw, 0.78rem);
  --text-sm: clamp(0.8rem, 0.78rem + 0.15vw, 0.875rem);
  --text-base: clamp(0.95rem, 0.9rem + 0.2vw, 1rem);
  --text-lg: clamp(1.05rem, 1rem + 0.3vw, 1.125rem);
  --text-xl: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
  --text-2xl: clamp(1.35rem, 1.2rem + 0.8vw, 1.75rem);
  --text-3xl: clamp(1.6rem, 1.3rem + 1.4vw, 2.25rem);
  --text-4xl: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  --text-5xl: clamp(2.4rem, 1.6rem + 3.6vw, 4rem);

  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.6;

  /* Brand colours (overridden at runtime from js/config.js) */
  --primary: #f5b400;              /* ZS gold */
  --primary-hover: #d99c00;
  --primary-soft: rgba(245, 180, 0, 0.14);
  --primary-contrast: #151000;     /* dark text on gold buttons */
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.14);
  --link: #a16207;                 /* readable gold on light backgrounds */
  --gold-gradient: linear-gradient(135deg, #ffd85c 0%, #f5b400 45%, #c98f00 100%);

  /* Neutral scale */
  --n-0: #ffffff;
  --n-50: #faf9f6;
  --n-100: #f3f1ec;
  --n-200: #e6e3dc;
  --n-300: #cfcbc2;
  --n-400: #9a968d;
  --n-500: #6b675f;
  --n-600: #4a4741;
  --n-700: #33312c;
  --n-800: #1f1e1b;
  --n-900: #121110;
  --n-950: #0a0a0a;

  /* Semantic */
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.12);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.14);
  --error: #dc2626;
  --error-soft: rgba(220, 38, 38, 0.12);
  --info: #2563eb;
  --info-soft: rgba(37, 99, 235, 0.12);
  --star: #f59e0b;

  /* Surface roles (light) */
  --bg: var(--n-50);
  --surface: var(--n-0);
  --surface-2: var(--n-100);
  --surface-3: var(--n-200);
  --text: var(--n-900);
  --text-muted: var(--n-600);
  --text-subtle: var(--n-500);
  --border: var(--n-200);
  --border-strong: var(--n-300);
  --overlay: rgba(10, 10, 10, 0.6);
  --skeleton-a: var(--n-200);
  --skeleton-b: var(--n-100);

  /* Spacing (8px scale) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 24px -8px rgba(15, 23, 42, 0.16), 0 4px 8px -4px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 24px 48px -12px rgba(15, 23, 42, 0.24);

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 450ms;

  /* Layout */
  --container: 1280px;
  --header-h: 72px;
  --header-h-compact: 60px;
  --tap: 44px;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --surface-3: #262626;
  --text: #f5f5f5;
  --text-muted: #c4c1ba;
  --text-subtle: #8f8c85;
  --border: #2a2a2a;
  --border-strong: #3a3a3a;
  --overlay: rgba(0, 0, 0, 0.75);
  --skeleton-a: #1c1c1c;
  --skeleton-b: #262626;
  --link: #f5b400;
  --primary-soft: rgba(245, 180, 0, 0.16);
  --accent-soft: rgba(34, 197, 94, 0.16);
  --success-soft: rgba(74, 222, 128, 0.16);
  --warning-soft: rgba(251, 191, 36, 0.16);
  --error-soft: rgba(248, 113, 113, 0.16);
  --info-soft: rgba(96, 165, 250, 0.16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 28px -8px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 24px 48px -12px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------------------------------------------------------------------
   2. RESET & BASE
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-3);
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
p { margin: 0 0 var(--space-4); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

.skip-link {
  position: absolute; top: -100px; left: var(--space-4); z-index: 1000;
  background: var(--primary); color: var(--primary-contrast);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  font-weight: 600; transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); outline-color: var(--n-0); }

/* ---------------------------------------------------------------------
   3. LAYOUT UTILITIES
   --------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 768px) { .container { padding-inline: var(--space-6); } }
.section { padding-block: var(--space-7); }
@media (min-width: 1024px) { .section { padding-block: var(--space-8); } }
.section--tight { padding-block: var(--space-6); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4);
  flex-wrap: wrap; margin-bottom: var(--space-5);
}
.section-head h2 { margin: 0; }
.section-head .eyebrow { display: block; }
.eyebrow {
  font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--link); margin-bottom: var(--space-2);
}
.lead { font-size: var(--text-lg); color: var(--text-muted); max-width: 62ch; }
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.stack > * + * { margin-top: var(--space-4); }
.flex { display: flex; gap: var(--space-3); align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; gap: var(--space-5); }
main { display: block; }

/* ---------------------------------------------------------------------
   4. BUTTONS
   --------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface-2); --btn-fg: var(--text); --btn-border: transparent;
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2); min-height: var(--tap); padding: 0.65rem 1.35rem;
  font-family: var(--font-heading); font-weight: 600; font-size: var(--text-sm);
  line-height: 1; border-radius: var(--radius-md); border: 1.5px solid var(--btn-border);
  background: var(--btn-bg); color: var(--btn-fg); text-decoration: none;
  overflow: hidden; isolation: isolate; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-base) var(--ease-out),
              background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--primary { --btn-bg: var(--primary); --btn-fg: var(--primary-contrast); background-image: var(--gold-gradient); }
.btn--primary:hover { --btn-bg: var(--primary-hover); background-image: none; }
.btn--dark { --btn-bg: var(--n-900); --btn-fg: #fff; --btn-border: var(--n-700); }
.btn--dark:hover { --btn-bg: var(--n-800); }
[data-theme="dark"] .btn--dark { --btn-bg: var(--surface-3); --btn-border: var(--border-strong); }
.btn--whatsapp { --btn-bg: #25d366; --btn-fg: #06240f; }
.btn--accent { --btn-bg: var(--accent); --btn-fg: #fff; }
.btn--outline { --btn-bg: transparent; --btn-border: var(--border-strong); }
.btn--outline:hover { --btn-border: var(--primary); --btn-fg: var(--link); }
.btn--ghost { --btn-bg: transparent; }
.btn--ghost:hover { --btn-bg: var(--surface-2); box-shadow: none; }
.btn--danger { --btn-bg: var(--error); --btn-fg: #fff; }
.btn--sm { min-height: 38px; padding: 0.5rem 1rem; font-size: var(--text-xs); }
.btn--lg { min-height: 52px; padding: 0.9rem 1.9rem; font-size: var(--text-base); }
.btn--block { width: 100%; }
.btn--icon { width: var(--tap); padding: 0; border-radius: var(--radius-full); }
/* Shine sweep on hover — animation defined in animations.css */
.btn--primary::after, .btn--accent::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.28) 50%, transparent 70%);
  transform: translateX(-120%);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--sm svg { width: 16px; height: 16px; }
.btn .spinner { display: none; width: 16px; height: 16px; }
.btn.is-loading { pointer-events: none; opacity: 0.8; }
.btn.is-loading .btn__label { visibility: hidden; }
.btn.is-loading .spinner { display: inline-block; position: absolute; }

.spinner {
  display: inline-block; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent;
}

/* Icon button (header) */
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); border-radius: var(--radius-full);
  color: var(--text); transition: background-color var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn__badge {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--radius-full); background: var(--primary); color: var(--primary-contrast);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  transform: scale(0); transition: transform var(--dur-base) var(--ease-spring);
}
.icon-btn__badge.is-visible { transform: scale(1); }

/* ---------------------------------------------------------------------
   5. HEADER & NAVIGATION
   --------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--dur-base);
}
@supports not (color-mix(in srgb, red, blue)) { .site-header { background: var(--surface); } }
.site-header.is-compact { box-shadow: var(--shadow-md); }
.site-header__inner {
  display: flex; align-items: center; gap: var(--space-3);
  height: var(--header-h); transition: height var(--dur-base) var(--ease-out);
}
.site-header.is-compact .site-header__inner { height: var(--header-h-compact); }
.logo {
  display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-heading);
  font-weight: 800; font-size: var(--text-xl); color: var(--text); letter-spacing: -0.02em;
  text-decoration: none; margin-right: auto; min-height: var(--tap);
}
.logo:hover { text-decoration: none; }
.logo__mark {
  display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 6px; border-radius: var(--radius-md);
  background: var(--gold-gradient); color: #151000; font-family: var(--font-heading); font-weight: 800; font-size: 15px; letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(245, 180, 0, 0.35); transition: transform var(--dur-base) var(--ease-out);
}
.logo__text { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .logo__text { background: none; -webkit-text-fill-color: initial; color: var(--text); }
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.05); }
.site-nav { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-1); }
.site-nav a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--space-3);
  border-radius: var(--radius-md); color: var(--text-muted); font-weight: 500; font-size: var(--text-sm);
  transition: color var(--dur-fast), background-color var(--dur-fast);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--link); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: var(--space-1); }
.header-search { display: none; }
@media (min-width: 1024px) {
  .site-nav { display: block; }
  .menu-toggle { display: none !important; }
  .header-search { display: flex; align-items: center; position: relative; }
  .header-search input {
    width: 220px; height: 42px; padding: 0 var(--space-4) 0 2.5rem; border-radius: var(--radius-full);
    border: 1.5px solid var(--border); background: var(--surface-2); transition: width var(--dur-base) var(--ease-out), border-color var(--dur-fast);
  }
  .header-search input:focus { width: 280px; border-color: var(--primary); outline: none; background: var(--surface); }
  .header-search svg { position: absolute; left: 0.85rem; width: 18px; height: 18px; color: var(--text-subtle); pointer-events: none; }
}

/* Mobile drawer */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 200; background: var(--overlay);
  opacity: 0; visibility: hidden; transition: opacity var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 210; width: min(84vw, 340px);
  background: var(--surface); box-shadow: var(--shadow-xl); display: flex; flex-direction: column;
  transform: translateX(-105%); transition: transform var(--dur-slow) var(--ease-out); overflow-y: auto;
}
.drawer--right { left: auto; right: 0; transform: translateX(105%); width: min(92vw, 420px); }
.drawer.is-open { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4); border-bottom: 1px solid var(--border); }
.drawer__head h2 { margin: 0; font-size: var(--text-lg); }
.drawer__body { padding: var(--space-4); flex: 1; }
.drawer__foot { padding: var(--space-4); border-top: 1px solid var(--border); }
.drawer nav ul { list-style: none; margin: 0; padding: 0; }
.drawer nav a {
  display: flex; align-items: center; min-height: 48px; padding: 0 var(--space-3);
  border-radius: var(--radius-md); color: var(--text); font-weight: 500; font-size: var(--text-lg);
}
.drawer nav a:hover, .drawer nav a[aria-current="page"] { background: var(--primary-soft); color: var(--link); text-decoration: none; }
.drawer .search-field { margin-bottom: var(--space-4); }

/* ---------------------------------------------------------------------
   6. FORMS
   --------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.field label, .field .label { font-weight: 600; font-size: var(--text-sm); }
.field .hint { font-size: var(--text-xs); color: var(--text-subtle); }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .field select, .field textarea {
  width: 100%; min-height: var(--tap); padding: 0.65rem 0.9rem; border-radius: var(--radius-md);
  border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field textarea { min-height: 140px; resize: vertical; line-height: var(--leading-normal); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); outline: none;
}
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--error); }
.field.has-error input:focus, .field.has-error textarea:focus { box-shadow: 0 0 0 4px var(--error-soft); }
.field__error { display: none; font-size: var(--text-xs); color: var(--error); font-weight: 500; }
.field.has-error .field__error { display: block; }
.search-field { position: relative; }
.search-field input { padding-left: 2.6rem !important; }
.search-field svg { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-subtle); pointer-events: none; }
.checkbox { display: flex; align-items: center; gap: var(--space-2); min-height: 36px; cursor: pointer; font-size: var(--text-sm); }
.checkbox input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.form-success {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4);
  background: var(--success-soft); color: var(--success); border-radius: var(--radius-md); font-weight: 600;
}

/* ---------------------------------------------------------------------
   7. HERO
   --------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; padding-block: var(--space-7);
  background:
    radial-gradient(ellipse 60% 70% at 85% 10%, var(--primary-soft), transparent 60%),
    radial-gradient(ellipse 50% 60% at 10% 90%, rgba(245, 180, 0, 0.08), transparent 60%),
    var(--surface);
  border-bottom: 1px solid var(--border);
}
@media (min-width: 1024px) { .hero { padding-block: var(--space-9); } }
.hero__grid { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 1024px) { .hero__grid { grid-template-columns: 1.1fr 0.9fr; } }
.hero h1 { font-size: var(--text-5xl); font-weight: 800; letter-spacing: -0.03em; margin-bottom: var(--space-4); }
.hero h1 .highlight { background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; position: relative; }
.hero__grid > * { min-width: 0; }
.hero .lead { margin-bottom: var(--space-5); }
.hero__cta { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-5); }
.hero__stats { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.hero__stat strong { display: block; font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 800; }
.hero__stat span { font-size: var(--text-sm); color: var(--text-muted); }
.hero__visual { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
.hero__visual .hero-card {
  aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface-2);
  box-shadow: var(--shadow-lg); position: relative;
}
.hero__visual .hero-card:nth-child(2) { transform: translateY(var(--space-5)); }
.hero__visual .hero-card:nth-child(3) { transform: translateY(calc(var(--space-5) * -1)); }
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card__price {
  position: absolute; left: var(--space-3); bottom: var(--space-3); padding: 4px 10px;
  border-radius: var(--radius-full); background: var(--surface); color: var(--link);
  font-weight: 700; font-size: var(--text-sm); box-shadow: var(--shadow-md);
}
.hero-pill {
  display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px 12px 6px 6px; margin-bottom: var(--space-4);
  border-radius: var(--radius-full); background: var(--surface); border: 1px solid var(--border);
  font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); box-shadow: var(--shadow-sm);
}
.hero-pill .dot { width: 20px; height: 20px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: grid; place-items: center; font-size: 11px; }

/* ---------------------------------------------------------------------
   8. DISCLOSURE BANNER
   --------------------------------------------------------------------- */
.disclosure-banner {
  display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md); background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--info) 30%, transparent);
  font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-5);
}
.disclosure-banner svg { flex: none; width: 20px; height: 20px; color: var(--info); margin-top: 2px; }
.disclosure-banner a { font-weight: 600; }

/* ---------------------------------------------------------------------
   9. PRODUCT GRID & CARD
   --------------------------------------------------------------------- */
.product-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 480px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); } }
@media (min-width: 1280px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
.product-grid--3 { grid-template-columns: 1fr; }
@media (min-width: 480px) { .product-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .product-grid--3 { grid-template-columns: repeat(3, 1fr); } }

.product-card {
  position: relative; display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product-card__media {
  position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface-2);
}
.product-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}
.product-card:hover .product-card__media img { transform: scale(1.06); }
.product-card__badges { position: absolute; top: var(--space-3); left: var(--space-3); display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.badge {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.4;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm);
}
.badge--bestseller { background: var(--gold-gradient); color: #151000; }
.badge--new { background: var(--accent); color: #06240f; }
.badge--own { background: #151000; color: var(--primary); border: 1px solid var(--primary); }
.badge--affiliate { background: var(--surface); color: var(--text-muted); border: 1px solid var(--border-strong); }
.badge--limited { background: var(--n-900); color: #fff; }
[data-theme="dark"] .badge--limited { background: var(--n-100); color: var(--n-900); }
.badge--discount { background: var(--error); color: #fff; }
.badge--stock { background: var(--surface-3); color: var(--text-muted); }
.badge--muted { background: var(--surface-2); color: var(--text-muted); box-shadow: none; }
.wishlist-btn {
  position: absolute; top: var(--space-3); right: var(--space-3); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--text-muted); box-shadow: var(--shadow-md);
  transition: transform var(--dur-base) var(--ease-spring), color var(--dur-fast), background-color var(--dur-fast);
}
.wishlist-btn:hover { transform: scale(1.1); color: var(--error); }
.wishlist-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; transition: fill var(--dur-fast); }
.wishlist-btn[aria-pressed="true"] { color: var(--error); }
.wishlist-btn[aria-pressed="true"] svg { fill: currentColor; }
.product-card__body { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); flex: 1; }
.product-card__category { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--link); display: flex; justify-content: space-between; gap: var(--space-2); align-items: center; }
.type-pill { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; padding: 2px 8px; border-radius: var(--radius-full); text-transform: uppercase; white-space: nowrap; }
.type-pill--own { background: var(--primary-soft); color: var(--link); }
.type-pill--affiliate { background: var(--surface-2); color: var(--text-subtle); }
.price--ask { font-family: var(--font-heading); font-size: var(--text-sm); font-weight: 700; color: var(--text-muted); }
.product-card__title { font-size: var(--text-base); font-weight: 600; margin: 0; line-height: var(--leading-snug); }
.product-card__title a { color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__title a:hover { color: var(--link); text-decoration: none; }
.rating { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-muted); }
.stars { display: inline-flex; gap: 1px; color: var(--star); }
.stars svg { width: 15px; height: 15px; }
.price-row { display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; margin-top: auto; }
.price { font-family: var(--font-heading); font-size: var(--text-xl); font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.price--original { font-size: var(--text-sm); color: var(--text-subtle); text-decoration: line-through; }
.price--save { font-size: var(--text-xs); font-weight: 700; color: var(--success); }
.product-card__meta { font-size: var(--text-xs); color: var(--text-subtle); display: flex; gap: var(--space-2); flex-wrap: wrap; }
.product-card__meta span + span::before { content: '·'; margin-right: var(--space-2); }
.product-card__actions { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
.product-card__actions .btn { flex: 1; }
.product-card.is-out-of-stock .product-card__media img { filter: grayscale(0.6); opacity: 0.8; }

/* Image loading (blur-up) and fallback */
.img-wrap { position: relative; overflow: hidden; background: var(--surface-2); }
.img-wrap::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--skeleton-a) 0%, var(--skeleton-b) 50%, var(--skeleton-a) 100%);
  background-size: 200% 100%; opacity: 1; transition: opacity var(--dur-slow);
}
.img-wrap.is-loaded::before, .img-wrap.is-error::before { opacity: 0; }
.img-wrap img { position: relative; opacity: 0; filter: blur(14px); transform: scale(1.04); transition: opacity var(--dur-slow) var(--ease-out), filter var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.img-wrap.is-loaded img { opacity: 1; filter: blur(0); transform: none; }
.img-wrap.is-error img { opacity: 1; filter: none; transform: none; object-fit: contain; padding: 18%; }

/* Skeleton */
.skeleton { position: relative; overflow: hidden; background: var(--skeleton-a); border-radius: var(--radius-md); }
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--skeleton-b), transparent); transform: translateX(-100%);
}
.skeleton-card { display: flex; flex-direction: column; gap: var(--space-3); padding: 0 0 var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.skeleton-card .skeleton--img { aspect-ratio: 1; border-radius: 0; }
.skeleton-card .skeleton--line { height: 14px; margin-inline: var(--space-4); }
.skeleton-card .skeleton--line.w-60 { width: 60%; }
.skeleton-card .skeleton--line.w-40 { width: 40%; }
.skeleton-card .skeleton--btn { height: 40px; margin-inline: var(--space-4); }

/* ---------------------------------------------------------------------
   10. CATEGORY SHOWCASE & TRUST STRIP
   --------------------------------------------------------------------- */
.category-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .category-grid { grid-template-columns: repeat(4, 1fr); gap: var(--space-4); } }
.category-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 150px;
  padding: var(--space-4); border-radius: var(--radius-lg); overflow: hidden; color: #fff; text-decoration: none;
  background: var(--n-800); box-shadow: var(--shadow-sm); isolation: isolate;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base);
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.category-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform var(--dur-slow) var(--ease-out); }
.category-card:hover img { transform: scale(1.08); }
.category-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(2,6,23,0.85), rgba(2,6,23,0.1)); }
.category-card h3 { margin: 0; font-size: var(--text-lg); color: #fff; }
.category-card span { font-size: var(--text-xs); opacity: 0.85; }
@media (min-width: 1024px) { .category-card { min-height: 190px; } }

.trust-strip { background: var(--surface); border-block: 1px solid var(--border); }
.trust-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 480px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-item { display: flex; gap: var(--space-3); align-items: flex-start; min-width: 0; }
.trust-item > div { min-width: 0; }
.trust-item__icon { flex: none; width: 48px; height: 48px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--primary-soft); color: var(--link); }
.trust-item__icon svg { width: 24px; height: 24px; }
.trust-item strong { display: block; font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.trust-item span { font-size: var(--text-sm); color: var(--text-muted); }

/* ---------------------------------------------------------------------
   11. NEWSLETTER & FOOTER
   --------------------------------------------------------------------- */
.newsletter {
  border-radius: var(--radius-xl); padding: var(--space-6) var(--space-4);
  background: radial-gradient(ellipse 70% 80% at 100% 0%, rgba(245, 180, 0, 0.35), transparent 60%), #151310;
  border: 1px solid rgba(245, 180, 0, 0.35); color: #fff; text-align: center; box-shadow: var(--shadow-lg);
}
@media (min-width: 768px) { .newsletter { padding: var(--space-8) var(--space-6); } }
.newsletter h2 { color: #fff; }
.newsletter p { color: rgba(255,255,255,0.85); max-width: 52ch; margin-inline: auto; }
.newsletter__form { display: flex; flex-direction: column; gap: var(--space-2); max-width: 520px; margin: var(--space-5) auto 0; }
@media (min-width: 480px) { .newsletter__form { flex-direction: row; } }
.newsletter__form input { flex: 1; min-height: 52px; padding: 0 var(--space-4); border-radius: var(--radius-md); border: 2px solid transparent; background: #fff; color: var(--n-900); }
.newsletter__form input:focus { border-color: var(--n-900); outline: none; }
.newsletter__form .btn { --btn-bg: var(--primary); --btn-fg: #151000; background-image: var(--gold-gradient); min-height: 52px; }
.newsletter .field__error { color: #fff; background: rgba(0,0,0,0.25); padding: 6px 10px; border-radius: var(--radius-sm); display: inline-block; margin-top: var(--space-2); }
.newsletter .form-success { background: rgba(255,255,255,0.18); color: #fff; justify-content: center; margin-top: var(--space-4); }

.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: var(--space-7) var(--space-5); margin-top: var(--space-6); }
.footer-grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand p { color: var(--text-muted); max-width: 36ch; font-size: var(--text-sm); }
.site-footer h3 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-3); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: var(--space-2); }
.site-footer li a { color: var(--text-muted); font-size: var(--text-sm); display: inline-flex; align-items: center; min-height: 32px; }
.site-footer li a:hover { color: var(--link); }
.social-links { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.social-links a { width: 40px; height: 40px; border-radius: var(--radius-full); display: grid; place-items: center; background: var(--surface-2); color: var(--text-muted); transition: background-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast); }
.social-links a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.social-links svg { width: 18px; height: 18px; }
.footer-bottom { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: space-between; font-size: var(--text-xs); color: var(--text-subtle); }

/* ---------------------------------------------------------------------
   12. BREADCRUMB, PAGE HEADER
   --------------------------------------------------------------------- */
.breadcrumb { font-size: var(--text-sm); color: var(--text-subtle); margin-bottom: var(--space-4); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1); padding: 0; margin: 0; }
.breadcrumb li { display: flex; align-items: center; gap: var(--space-1); max-width: 100%; min-width: 0; }
.breadcrumb li + li::before { content: '/'; color: var(--border-strong); margin-right: 2px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(40ch, 100%); }
.page-header { padding-block: var(--space-6) var(--space-4); }
.page-header h1 { margin-bottom: var(--space-2); }

/* ---------------------------------------------------------------------
   13. SHOP LAYOUT & FILTERS
   --------------------------------------------------------------------- */
.shop-layout { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 1024px) { .shop-layout { grid-template-columns: 280px 1fr; } }
.filters {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4);
}
@media (min-width: 1024px) { .filters { position: sticky; top: calc(var(--header-h-compact) + var(--space-4)); max-height: calc(100vh - var(--header-h-compact) - var(--space-6)); overflow-y: auto; } }
@media (max-width: 1023.98px) {
  .filters { display: none; }
  .filters.is-open { display: block; }
}
.filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.filters__head h2 { margin: 0; font-size: var(--text-lg); }
.filter-group { padding-block: var(--space-4); border-top: 1px solid var(--border); }
.filter-group:first-of-type { border-top: 0; }
.filter-group > h3 { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-3); color: var(--text-muted); }
.filter-group .checkbox span.count { margin-left: auto; font-size: var(--text-xs); color: var(--text-subtle); }
.filter-toggle { display: inline-flex; }
@media (min-width: 1024px) { .filter-toggle { display: none; } }

/* Dual range slider */
.range { position: relative; height: 40px; margin: var(--space-2) 6px; }
.range__track { position: absolute; top: 50%; left: 0; right: 0; height: 6px; margin-top: -3px; border-radius: var(--radius-full); background: var(--surface-3); }
.range__fill { position: absolute; top: 50%; height: 6px; margin-top: -3px; border-radius: var(--radius-full); background: var(--primary); }
.range input[type="range"] {
  -webkit-appearance: none; appearance: none; position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 40px;
  margin: 0; background: transparent; pointer-events: none;
}
.range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface);
  border: 3px solid var(--primary); box-shadow: var(--shadow-md); pointer-events: auto; cursor: grab;
}
.range input[type="range"]::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); box-shadow: var(--shadow-md); pointer-events: auto; cursor: grab;
}
.range input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--primary); outline-offset: 2px; }
.range__labels { display: flex; justify-content: space-between; font-size: var(--text-sm); font-weight: 600; }
.rating-filter { display: flex; flex-direction: column; gap: 2px; }
.rating-filter label { display: flex; align-items: center; gap: var(--space-2); min-height: 36px; cursor: pointer; font-size: var(--text-sm); }
.rating-filter input { accent-color: var(--primary); width: 18px; height: 18px; }
.sort-select { min-height: var(--tap); padding: 0 2.2rem 0 var(--space-3); border-radius: var(--radius-md); border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; }
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.results-count { font-size: var(--text-sm); color: var(--text-muted); }
.results-count strong { color: var(--text); }
.active-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 12px; border-radius: var(--radius-full);
  background: var(--primary-soft); color: var(--link); font-size: var(--text-xs); font-weight: 600; min-height: 32px;
}
.chip button { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: inherit; }
.chip button:hover { background: var(--primary); color: #fff; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: var(--space-1); flex-wrap: wrap; margin-top: var(--space-6); }
.pagination button, .pagination span.ellipsis {
  min-width: var(--tap); height: var(--tap); padding: 0 var(--space-3); border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: var(--text-sm);
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text-muted);
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--link); }
.pagination button[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--primary-contrast); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination span.ellipsis { border: 0; background: transparent; }

/* Empty / error states */
.empty-state { text-align: center; padding: var(--space-8) var(--space-4); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }
.empty-state svg { width: 96px; height: 96px; margin: 0 auto var(--space-4); color: var(--text-subtle); }
.empty-state h3 { font-size: var(--text-2xl); }
.empty-state p { color: var(--text-muted); max-width: 44ch; margin-inline: auto; }
.empty-state .btn { margin-top: var(--space-3); }
.grid-span { grid-column: 1 / -1; }

/* ---------------------------------------------------------------------
   14. PRODUCT DETAIL
   --------------------------------------------------------------------- */
.product-layout { display: grid; gap: var(--space-6); align-items: start; }
@media (min-width: 1024px) { .product-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--space-7); } }
.gallery { position: relative; }
@media (min-width: 1024px) { .gallery { position: sticky; top: calc(var(--header-h-compact) + var(--space-4)); } }
.gallery__main { aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); position: relative; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.gallery__main:hover img { transform: scale(1.04); }
.gallery__main .product-card__badges { top: var(--space-4); left: var(--space-4); }
.gallery__main .wishlist-btn { top: var(--space-4); right: var(--space-4); width: 48px; height: 48px; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-2); margin-top: var(--space-3); }
.gallery__thumb { aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; border: 2px solid var(--border); background: var(--surface-2); padding: 0; transition: border-color var(--dur-fast), transform var(--dur-fast) var(--ease-out); }
.gallery__thumb:hover { transform: translateY(-2px); }
.gallery__thumb[aria-current="true"] { border-color: var(--primary); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: var(--text-3xl); margin-bottom: var(--space-3); }
.product-info .rating { font-size: var(--text-base); margin-bottom: var(--space-4); }
.product-info .rating .stars svg { width: 18px; height: 18px; }
.product-info .rating a { color: var(--text-muted); }
.price-box { padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface-2); margin-bottom: var(--space-4); }
.price-box .price { font-size: var(--text-4xl); color: var(--link); }
.price-box .price--original { font-size: var(--text-lg); }
.price-box .savings { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-2); font-size: var(--text-sm); }
.price-box .savings strong { color: var(--success); }
.product-meta { display: grid; gap: var(--space-2); margin-bottom: var(--space-5); font-size: var(--text-sm); }
.product-meta div { display: flex; gap: var(--space-2); align-items: center; }
.product-meta svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.buy-box { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-5); }
@media (min-width: 480px) { .buy-box { flex-direction: row; } .buy-box .btn--buy { flex: 1; } }
.buy-box .btn--buy { font-size: var(--text-lg); min-height: 56px; }
.buy-note { font-size: var(--text-xs); color: var(--text-subtle); margin-top: calc(var(--space-3) * -1); margin-bottom: var(--space-5); }
.product-desc { border-top: 1px solid var(--border); padding-top: var(--space-5); }
.product-desc h2 { font-size: var(--text-xl); }
.product-desc p { color: var(--text-muted); }
.spec-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); margin-bottom: var(--space-4); }
.spec-table th, .spec-table td { text-align: left; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--border); vertical-align: top; }
.spec-table th { width: 38%; color: var(--text-muted); font-weight: 600; }
.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tag-list a { padding: 5px 12px; border-radius: var(--radius-full); background: var(--surface-2); color: var(--text-muted); font-size: var(--text-xs); font-weight: 500; min-height: 30px; display: inline-flex; align-items: center; }
.tag-list a:hover { background: var(--primary-soft); color: var(--link); text-decoration: none; }
.share-row { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; font-size: var(--text-sm); color: var(--text-muted); }

/* ---------------------------------------------------------------------
   15. CONTENT / LEGAL PAGES
   --------------------------------------------------------------------- */
.prose { max-width: 76ch; }
.prose h2 { font-size: var(--text-2xl); margin-top: var(--space-6); }
.prose h3 { margin-top: var(--space-5); }
.prose p, .prose li { color: var(--text-muted); }
.prose strong { color: var(--text); }
.prose .callout { padding: var(--space-4); border-left: 4px solid var(--primary); background: var(--primary-soft); border-radius: 0 var(--radius-md) var(--radius-md) 0; margin-block: var(--space-4); }
.prose .callout p { margin: 0; color: var(--text); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm); }
.two-col { display: grid; gap: var(--space-6); }
@media (min-width: 1024px) { .two-col { grid-template-columns: 1.2fr 0.8fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.contact-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
.contact-list svg { width: 22px; height: 22px; color: var(--primary); flex: none; margin-top: 2px; }
.contact-list strong { display: block; }
.contact-list span { color: var(--text-muted); font-size: var(--text-sm); }
.values-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 768px) { .values-grid { grid-template-columns: repeat(3, 1fr); } }
.values-grid .card h3 { display: flex; align-items: center; gap: var(--space-2); }
.values-grid .card p { margin: 0; color: var(--text-muted); font-size: var(--text-sm); }
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: var(--space-4) 0; font-weight: 600; font-family: var(--font-heading); list-style: none; display: flex; justify-content: space-between; gap: var(--space-3); align-items: center; min-height: var(--tap); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4em; color: var(--primary); transition: transform var(--dur-base) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: var(--space-4); color: var(--text-muted); }
.page-404 { text-align: center; padding-block: var(--space-8); }
.page-404 .big { font-family: var(--font-heading); font-size: clamp(5rem, 20vw, 10rem); font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-404 .lead { margin-inline: auto; }

/* ---------------------------------------------------------------------
   16. TOASTS, MODALS, BACK-TO-TOP
   --------------------------------------------------------------------- */
.toast-region { position: fixed; bottom: var(--space-4); left: 50%; transform: translateX(-50%); z-index: 500; display: flex; flex-direction: column; gap: var(--space-2); width: min(92vw, 380px); pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--n-900); color: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-xl);
  font-size: var(--text-sm); font-weight: 500; pointer-events: auto;
  opacity: 0; transform: translateY(16px); transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
[data-theme="dark"] .toast { background: var(--n-100); color: var(--n-900); }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast__icon { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.toast--success .toast__icon { background: var(--success); color: #fff; }
.toast--error .toast__icon { background: var(--error); color: #fff; }
.toast--info .toast__icon { background: var(--info); color: #fff; }
.toast__icon svg { width: 14px; height: 14px; }
.toast button { margin-left: auto; opacity: 0.7; width: 28px; height: 28px; display: grid; place-items: center; }
.toast button:hover { opacity: 1; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 300; background: var(--overlay); display: grid; place-items: center; padding: var(--space-4);
  opacity: 0; visibility: hidden; transition: opacity var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
}
.modal-backdrop.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.modal {
  width: 100%; max-width: 480px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  padding: var(--space-5); transform: translateY(20px) scale(0.97); transition: transform var(--dur-base) var(--ease-out);
}
.modal-backdrop.is-open .modal { transform: none; }
.modal h2 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.modal p { color: var(--text-muted); }
.modal__actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-5); flex-wrap: wrap; }

.back-to-top {
  position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 90; width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: var(--primary-contrast); box-shadow: var(--shadow-lg); display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.back-to-top:hover { background: var(--primary-hover); }
.back-to-top svg { width: 22px; height: 22px; }

/* Wishlist panel */
.wish-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.wish-item { display: grid; grid-template-columns: 72px 1fr auto; gap: var(--space-3); align-items: center; padding: var(--space-2); border: 1px solid var(--border); border-radius: var(--radius-md); }
.wish-item .img-wrap { width: 72px; height: 72px; border-radius: var(--radius-sm); }
.wish-item .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.wish-item h3 { font-size: var(--text-sm); margin: 0 0 4px; }
.wish-item h3 a { color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wish-item .price { font-size: var(--text-base); }
.wish-item__actions { display: flex; flex-direction: column; gap: 4px; }
.wish-item__actions .icon-btn { width: 40px; height: 40px; }
.wish-item__actions .icon-btn svg { width: 18px; height: 18px; }

/* Horizontal product scroller (recently viewed) */
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: var(--space-4); overflow-x: auto; padding-bottom: var(--space-3); scroll-snap-type: x mandatory; scrollbar-width: thin; }
.scroller > * { scroll-snap-align: start; }
@media (min-width: 1024px) { .scroller { grid-auto-columns: minmax(240px, 1fr); } }

/* Print */
@media print { .site-header, .site-footer, .back-to-top, .toast-region, .drawer, .drawer-backdrop { display: none !important; } }

/* ---------------------------------------------------------------------
   17. CART, CHECKOUT, ORDERS (own-product store)
   --------------------------------------------------------------------- */
.qty {
  display: inline-flex; align-items: center; border: 1.5px solid var(--border-strong); border-radius: var(--radius-md); overflow: hidden; background: var(--surface);
}
.qty button { width: 40px; height: 42px; display: grid; place-items: center; font-size: 18px; font-weight: 700; color: var(--text-muted); transition: background-color var(--dur-fast); }
.qty button:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.qty button:disabled { opacity: 0.35; cursor: not-allowed; }
.qty input { width: 48px; height: 42px; text-align: center; border: 0; border-inline: 1.5px solid var(--border-strong); background: transparent; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--sm button { width: 34px; height: 36px; font-size: 16px; } .qty--sm input { width: 40px; height: 36px; }
.stock-note { font-size: var(--text-xs); font-weight: 600; }
.stock-note--low { color: var(--warning); } .stock-note--ok { color: var(--accent); } .stock-note--out { color: var(--error); }

.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.cart-item { display: grid; grid-template-columns: 80px 1fr; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.cart-item .img-wrap { width: 80px; height: 80px; border-radius: var(--radius-sm); }
.cart-item .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__title { font-size: var(--text-sm); font-weight: 600; margin: 0 0 4px; }
.cart-item__title a { color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; margin-top: var(--space-2); }
.cart-item__line { font-family: var(--font-heading); font-weight: 800; }
.cart-item .remove { font-size: var(--text-xs); color: var(--text-subtle); text-decoration: underline; min-height: 32px; }
.cart-item .remove:hover { color: var(--error); }
@media (min-width: 640px) { .cart-item { grid-template-columns: 96px 1fr auto; align-items: center; } .cart-item .img-wrap { width: 96px; height: 96px; } .cart-item__line { min-width: 90px; text-align: right; font-size: var(--text-lg); } }

.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm); }
@media (min-width: 1024px) { .summary--sticky { position: sticky; top: calc(var(--header-h-compact) + var(--space-4)); } }
.summary h2 { font-size: var(--text-lg); margin-bottom: var(--space-4); }
.summary__row { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; font-size: var(--text-sm); color: var(--text-muted); }
.summary__row strong { color: var(--text); }
.summary__row--total { border-top: 1px solid var(--border); margin-top: var(--space-2); padding-top: var(--space-3); font-size: var(--text-lg); color: var(--text); }
.summary__row--total strong { font-family: var(--font-heading); font-size: var(--text-2xl); color: var(--link); }
.summary .free-ship { font-size: var(--text-xs); color: var(--accent); font-weight: 600; margin-top: var(--space-2); }
.summary .btn { margin-top: var(--space-4); }
.summary-items { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: var(--space-2); max-height: 320px; overflow: auto; }
.summary-items li { display: grid; grid-template-columns: 44px 1fr auto; gap: var(--space-2); align-items: center; font-size: var(--text-sm); }
.summary-items .img-wrap { width: 44px; height: 44px; border-radius: var(--radius-sm); } .summary-items img { width: 100%; height: 100%; object-fit: cover; }
.summary-items .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.summary-items .t small { display: block; color: var(--text-subtle); }

.checkout-layout { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 1024px) { .checkout-layout { grid-template-columns: 1.3fr 0.9fr; gap: var(--space-6); } }
.pay-options { display: grid; gap: var(--space-2); }
.pay-option { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border: 1.5px solid var(--border-strong); border-radius: var(--radius-md); cursor: pointer; transition: border-color var(--dur-fast), background-color var(--dur-fast); }
.pay-option:hover { background: var(--surface-2); }
.pay-option input { margin-top: 4px; accent-color: var(--primary); width: 18px; height: 18px; flex: none; }
.pay-option strong { display: block; font-size: var(--text-sm); }
.pay-option span { font-size: var(--text-xs); color: var(--text-muted); }
.pay-option.is-selected { border-color: var(--primary); background: var(--primary-soft); }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.order-success { text-align: center; padding: var(--space-6) var(--space-4); }
.order-success .check { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto var(--space-4); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.order-success .check svg { width: 42px; height: 42px; }
.order-success .number { display: inline-block; font-family: var(--font-heading); font-size: var(--text-2xl); font-weight: 800; letter-spacing: 0.04em; padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); background: var(--primary-soft); color: var(--link); margin: var(--space-2) 0 var(--space-4); user-select: all; }
.order-success .actions { display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; margin-top: var(--space-4); }
.bank-box { text-align: left; padding: var(--space-4); border-radius: var(--radius-md); background: var(--surface-2); border: 1px dashed var(--border-strong); font-size: var(--text-sm); margin-top: var(--space-4); }

.order-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow-sm); }
.order-card__head { display: flex; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; align-items: center; margin-bottom: var(--space-3); }
.order-card__head strong { font-family: var(--font-heading); font-size: var(--text-lg); }
.order-card__head small { color: var(--text-subtle); display: block; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
.status-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--pending { background: var(--warning-soft); color: var(--warning); }
.status--confirmed, .status--processing { background: var(--info-soft); color: var(--info); }
.status--shipped { background: var(--primary-soft); color: var(--link); }
.status--delivered, .status--paid { background: var(--success-soft); color: var(--success); }
.status--cancelled, .status--refunded { background: var(--error-soft); color: var(--error); }
.status--unpaid { background: var(--surface-3); color: var(--text-muted); }
.timeline { list-style: none; margin: var(--space-4) 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 var(--space-3) var(--space-5); font-size: var(--text-sm); }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline li::after { content: ''; position: absolute; left: 10px; top: 18px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline small { display: block; color: var(--text-subtle); }
.progress-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: var(--space-4) 0 var(--space-6); }
.progress-steps span { height: 6px; border-radius: 3px; background: var(--surface-3); position: relative; }
.progress-steps span.is-done { background: var(--gold-gradient); }
.progress-steps span::after { content: attr(data-label); position: absolute; top: 10px; left: 0; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-subtle); font-weight: 700; }
.progress-steps.is-cancelled span { background: var(--error-soft); }

@media print {
  body { background: #fff !important; color: #000 !important; }
  .no-print { display: none !important; }
  .order-card { border: 1px solid #000; box-shadow: none; }
}
