/* ==========================================================================
   MoserVibes — Design System
   One shared stylesheet for the whole storefront. Light + dark themes via
   [data-theme] / prefers-color-scheme. Replaces per-page inline <style>
   blocks and the Tailwind CDN runtime compiler.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root{
  /* Brand accent ramp (violet) */
  --acc-50:#f2f1ff;  --acc-100:#e6e4ff; --acc-200:#cfccff; --acc-300:#b3affe;
  --acc-400:#9b96f5; --acc-500:#8e8cf0; --acc-600:#746fe0; --acc-700:#5d57c4;
  --acc-800:#46418f; --acc-900:#312c66;

  /* Light theme (default) */
  --bg:#f7f6fb;
  --bg-canvas:#f0eef8;
  --surface:#ffffff;
  --surface-2:#f4f3fa;
  --surface-hover:#ecebf7;
  --fg:#161421;
  --fg-muted:#5c5a72;
  --fg-subtle:#8b899e;
  --border:#e3e1f0;
  --border-strong:#c9c6e2;
  --accent:var(--acc-600);
  --accent-fg:#ffffff;
  --accent-soft:var(--acc-100);
  --accent-soft-fg:var(--acc-800);
  --glow: 0 0 0 rgba(0,0,0,0);

  --success:#0f9d63; --success-bg:#e4f8ee; --success-fg:#0b6b45;
  --warning:#b6790a; --warning-bg:#fdf1de; --warning-fg:#8a5a06;
  --danger:#d3384c;  --danger-bg:#fdecef;  --danger-fg:#a32233;
  --info:#3763e0;    --info-bg:#eaefff;    --info-fg:#2947a8;

  --shadow-sm: 0 1px 2px rgba(23,20,45,.06), 0 1px 1px rgba(23,20,45,.04);
  --shadow-md: 0 6px 20px rgba(23,20,45,.08), 0 2px 6px rgba(23,20,45,.05);
  --shadow-lg: 0 20px 45px rgba(23,20,45,.12), 0 6px 16px rgba(23,20,45,.06);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --font-display: 'Unbounded', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1240px;
  --container-narrow: 880px;

  --dur-fast: .15s;
  --dur-base: .28s;
  --dur-slow: .5s;
  --ease: cubic-bezier(.22,1,.36,1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#09090f;
    --bg-canvas:#0c0c14;
    --surface:#131320;
    --surface-2:#191928;
    --surface-hover:#1f1f30;
    --fg:#f3f2fb;
    --fg-muted:#a7a4c2;
    --fg-subtle:#726f8e;
    --border:#232235;
    --border-strong:#33324a;
    --accent:var(--acc-500);
    --accent-fg:#0b0b14;
    --accent-soft:rgba(142,140,240,.16);
    --accent-soft-fg:#cfcdff;
    --glow: 0 0 0 1px rgba(142,140,240,.3), 0 0 32px rgba(142,140,240,.18);

    --success:#33d488; --success-bg:rgba(51,212,136,.12); --success-fg:#7cf0b6;
    --warning:#f2b33d; --warning-bg:rgba(242,179,61,.12); --warning-fg:#f7cd7c;
    --danger:#f2607a;  --danger-bg:rgba(242,96,122,.12);  --danger-fg:#ff93a6;
    --info:#6d94ff;    --info-bg:rgba(109,148,255,.12);   --info-fg:#a9bfff;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 10px 30px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.3);
    --shadow-lg: 0 24px 60px rgba(0,0,0,.55), 0 8px 20px rgba(0,0,0,.35);

    color-scheme: dark;
  }
}
[data-theme="dark"]{
  --bg:#09090f; --bg-canvas:#0c0c14; --surface:#131320; --surface-2:#191928; --surface-hover:#1f1f30;
  --fg:#f3f2fb; --fg-muted:#a7a4c2; --fg-subtle:#726f8e;
  --border:#232235; --border-strong:#33324a;
  --accent:var(--acc-500); --accent-fg:#0b0b14; --accent-soft:rgba(142,140,240,.16); --accent-soft-fg:#cfcdff;
  --glow: 0 0 0 1px rgba(142,140,240,.3), 0 0 32px rgba(142,140,240,.18);
  --success:#33d488; --success-bg:rgba(51,212,136,.12); --success-fg:#7cf0b6;
  --warning:#f2b33d; --warning-bg:rgba(242,179,61,.12); --warning-fg:#f7cd7c;
  --danger:#f2607a;  --danger-bg:rgba(242,96,122,.12);  --danger-fg:#ff93a6;
  --info:#6d94ff;    --info-bg:rgba(109,148,255,.12);   --info-fg:#a9bfff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 10px 30px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.3);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55), 0 8px 20px rgba(0,0,0,.35);
  color-scheme: dark;
}
[data-theme="light"]{ color-scheme: light; }

/* ---------- Reset & base ---------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
html,body{ margin:0; padding:0; }
body{
  background:var(--bg);
  color:var(--fg);
  font-family:var(--font-body);
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  transition:background var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
img,svg,video{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; }
ul,ol{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4,h5,h6{ margin:0; font-family:var(--font-display); font-weight:600; letter-spacing:-.01em; line-height:1.15; }
p{ margin:0; }
fieldset{ border:0; margin:0; padding:0; }
::selection{ background:var(--accent); color:var(--accent-fg); }

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

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

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

/* ---------- Layout ---------- */
.container{ max-width:var(--container); margin:0 auto; padding:0 20px; }
.container-narrow{ max-width:var(--container-narrow); margin:0 auto; padding:0 20px; }
.stack{ display:flex; flex-direction:column; }
.cluster{ display:flex; flex-wrap:wrap; align-items:center; }
.flex{ display:flex; }
.flex-between{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.flex-center{ display:flex; align-items:center; justify-content:center; }
.grow{ flex:1 1 auto; }
.gap-xs{ gap:6px; } .gap-sm{ gap:10px; } .gap-md{ gap:16px; } .gap-lg{ gap:24px; }
.mt-0{ margin-top:0; } .mt-sm{ margin-top:10px; } .mt-md{ margin-top:20px; } .mt-lg{ margin-top:40px; } .mt-xl{ margin-top:64px; }
.mb-sm{ margin-bottom:10px; } .mb-md{ margin-bottom:20px; } .mb-lg{ margin-bottom:40px; }
.text-center{ text-align:center; }
.muted{ color:var(--fg-muted); }
.subtle{ color:var(--fg-subtle); }
.section{ padding:56px 0; }
.section-tight{ padding:32px 0; }
.divider{ height:1px; background:var(--border); border:0; margin:20px 0; }

.grid-auto{ display:grid; gap:16px; grid-template-columns:repeat(2,1fr); }
@media (min-width:640px){ .grid-auto{ grid-template-columns:repeat(3,1fr); } }
@media (min-width:1000px){ .grid-auto{ grid-template-columns:repeat(4,1fr); } }

.eyebrow{
  display:inline-flex; align-items:center; gap:8px; font-family:var(--font-display);
  font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase;
  color:var(--accent-soft-fg); background:var(--accent-soft); padding:6px 12px; border-radius:var(--radius-full);
}

/* ---------- Buttons ---------- */
.btn{
  --btn-bg:var(--accent); --btn-fg:var(--accent-fg);
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:var(--font-body); font-weight:700; font-size:14.5px; letter-spacing:.005em;
  padding:12px 20px; border-radius:var(--radius-md); border:1px solid transparent;
  background:var(--btn-bg); color:var(--btn-fg); cursor:pointer;
  transition:transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  white-space:nowrap; box-shadow:var(--shadow-sm);
}
.btn:hover{ transform:translateY(-1px); box-shadow:var(--shadow-md); }
.btn:active{ transform:translateY(0); }
.btn:disabled,.btn[aria-disabled="true"]{ opacity:.5; cursor:not-allowed; transform:none; box-shadow:none; }
.btn-primary{ background:var(--accent); color:var(--accent-fg); }
.btn-secondary{ background:var(--surface-2); color:var(--fg); border-color:var(--border); box-shadow:none; }
.btn-secondary:hover{ border-color:var(--border-strong); background:var(--surface-hover); }
.btn-ghost{ background:transparent; color:var(--fg); border-color:var(--border); box-shadow:none; }
.btn-ghost:hover{ background:var(--surface-2); }
.btn-danger{ background:var(--danger); color:#fff; }
.btn-sm{ padding:8px 14px; font-size:13px; border-radius:var(--radius-sm); }
.btn-lg{ padding:15px 26px; font-size:16px; border-radius:var(--radius-md); }
.btn-block{ width:100%; }
.btn-icon{ padding:10px; border-radius:var(--radius-full); }
.btn-glow:hover{ box-shadow:var(--glow), var(--shadow-md); }

/* ---------- Forms ---------- */
.field{ display:flex; flex-direction:column; gap:6px; }
.field label,.form-label{ font-size:13px; font-weight:600; color:var(--fg-muted); }
.input,.select,.textarea,
input[type=text],input[type=email],input[type=password],input[type=tel],input[type=number],input[type=search],select,textarea{
  width:100%; font-family:var(--font-body); font-size:15px; color:var(--fg);
  background:var(--surface-2); border:1.5px solid var(--border); border-radius:var(--radius-sm);
  padding:11px 13px; transition:border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.input:focus,.select:focus,.textarea:focus,
input:focus,select:focus,textarea:focus{
  outline:none; border-color:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); background:var(--surface);
}
.textarea,textarea{ resize:vertical; min-height:90px; font-family:inherit; }
.form-grid{ display:grid; gap:14px; grid-template-columns:1fr; }
@media (min-width:620px){ .form-grid-2{ grid-template-columns:1fr 1fr; } .form-grid-3{ grid-template-columns:2fr 1fr; } }
.checkbox-row{ display:flex; align-items:flex-start; gap:10px; font-size:14px; color:var(--fg-muted); }
.checkbox-row input{ width:auto; margin-top:3px; accent-color:var(--accent); }
.error-text{ color:var(--danger); font-size:13px; }

/* ---------- Surfaces / cards ---------- */
.card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); }
.card-pad{ padding:20px; }
.card-hover{ transition:transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease); }
.card-hover:hover{ transform:translateY(-3px); box-shadow:var(--shadow-lg); border-color:var(--border-strong); }
.surface-2{ background:var(--surface-2); border-radius:var(--radius-md); }

/* ---------- Badges / pills / chips ---------- */
.badge{ display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:700; letter-spacing:.02em; padding:4px 10px; border-radius:var(--radius-full); border:1px solid transparent; }
.badge-neutral{ background:var(--surface-2); color:var(--fg-muted); border-color:var(--border); }
.badge-accent{ background:var(--accent-soft); color:var(--accent-soft-fg); }
.badge-success{ background:var(--success-bg); color:var(--success-fg); }
.badge-warning{ background:var(--warning-bg); color:var(--warning-fg); }
.badge-danger{ background:var(--danger-bg); color:var(--danger-fg); }
.badge-info{ background:var(--info-bg); color:var(--info-fg); }
.badge-dot{ width:6px; height:6px; border-radius:50%; background:currentColor; }

.pill{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:9px 16px; border-radius:var(--radius-full); border:1.5px solid var(--border);
  background:var(--surface); color:var(--fg); font-size:14px; font-weight:600; cursor:pointer; white-space:nowrap;
  transition:all var(--dur-fast) var(--ease);
}
.pill:hover{ border-color:var(--border-strong); transform:translateY(-1px); }
.pill.active{ border-color:var(--accent); background:var(--accent-soft); color:var(--accent-soft-fg); box-shadow:0 0 0 1px var(--accent) inset; }
.pill-sm{ padding:6px 12px; font-size:13px; }

.chip{ display:inline-flex; align-items:center; gap:6px; padding:6px 8px 6px 12px; border-radius:var(--radius-full); background:var(--accent-soft); color:var(--accent-soft-fg); font-size:13px; font-weight:600; }
.chip button{ display:flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:50%; border:0; background:rgba(0,0,0,.08); color:inherit; cursor:pointer; }
[data-theme="dark"] .chip button{ background:rgba(255,255,255,.12); }

.tag{ display:inline-flex; align-items:center; padding:5px 12px; border-radius:var(--radius-full); border:1px solid var(--border); font-size:12.5px; color:var(--fg-muted); background:var(--surface); transition:all var(--dur-fast) var(--ease); }
.tag:hover{ border-color:var(--accent); color:var(--fg); }

/* ---------- Header / nav ---------- */
.site-header{ position:sticky; top:0; z-index:50; background:color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); border-bottom:1px solid var(--border); }
.site-header .bar{ max-width:var(--container); margin:0 auto; padding:12px 20px; display:flex; align-items:center; gap:16px; }
.site-logo{ display:flex; align-items:center; gap:10px; font-family:var(--font-display); font-weight:700; font-size:17px; color:var(--fg); letter-spacing:-.01em; flex-shrink:0; }
.site-logo img{ height:26px; width:auto; border-radius:6px; }
.site-nav{ display:flex; align-items:center; gap:6px; margin-left:8px; }
.site-nav-link{ padding:9px 14px; border-radius:var(--radius-full); font-size:14.5px; font-weight:600; color:var(--fg-muted); transition:all var(--dur-fast) var(--ease); }
.site-nav-link:hover{ color:var(--fg); background:var(--surface-2); }
.header-actions{ display:flex; align-items:center; gap:6px; margin-left:auto; }
.icon-btn{
  display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px;
  border-radius:var(--radius-full); border:1px solid var(--border); background:var(--surface); color:var(--fg);
  cursor:pointer; position:relative; transition:all var(--dur-fast) var(--ease); flex-shrink:0;
}
.icon-btn:hover{ border-color:var(--border-strong); background:var(--surface-2); transform:translateY(-1px); }
.cart-badge{ position:absolute; top:-4px; right:-4px; min-width:18px; height:18px; padding:0 4px; border-radius:999px; background:var(--accent); color:var(--accent-fg); font-size:10.5px; font-weight:800; display:flex; align-items:center; justify-content:center; box-shadow:0 0 0 2px var(--bg); }
.theme-toggle .icon-sun{ display:none; }
[data-theme="dark"] .theme-toggle .icon-sun{ display:block; }
[data-theme="dark"] .theme-toggle .icon-moon{ display:none; }
@media (prefers-color-scheme: dark){
  html:not([data-theme="light"]) .theme-toggle .icon-sun{ display:block; }
  html:not([data-theme="light"]) .theme-toggle .icon-moon{ display:none; }
}

.mobile-toggle{ display:none; }
@media (max-width:860px){
  .site-nav{ display:none; }
  .mobile-toggle{ display:inline-flex; }
}

/* Account dropdown */
.account{ position:relative; }
.account-menu{ position:absolute; right:0; top:calc(100% + 10px); background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); overflow:hidden; min-width:220px; display:none; box-shadow:var(--shadow-lg); z-index:60; }
.account-menu.open{ display:block; }
.account-menu a{ display:flex; align-items:center; gap:10px; padding:11px 14px; color:var(--fg); font-size:14px; font-weight:500; border-top:1px solid var(--border); }
.account-menu a:first-child{ border-top:0; }
.account-menu a:hover{ background:var(--surface-2); }

/* Login modal */
.modal-overlay{ position:fixed; inset:0; z-index:80; display:none; }
.modal-overlay.open{ display:block; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(8,7,15,.6); backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px); }
.modal-dialog{ position:relative; max-width:400px; margin:9vh auto 0; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:22px; box-shadow:var(--shadow-lg); animation:modal-in var(--dur-base) var(--ease); }
@keyframes modal-in{ from{ opacity:0; transform:translateY(12px) scale(.98);} to{ opacity:1; transform:none; } }

/* Mobile nav drawer */
.mobile-drawer{ position:fixed; inset:0; z-index:70; display:none; }
.mobile-drawer.open{ display:block; }
.mobile-drawer .modal-backdrop{ }
.mobile-drawer-panel{ position:absolute; top:0; right:0; bottom:0; width:min(320px,86vw); background:var(--surface); border-left:1px solid var(--border); padding:18px; box-shadow:var(--shadow-lg); display:flex; flex-direction:column; gap:4px; animation:drawer-in var(--dur-base) var(--ease); }
@keyframes drawer-in{ from{ transform:translateX(24px); opacity:0;} to{ transform:none; opacity:1;} }
.mobile-drawer-panel a{ padding:13px 10px; border-radius:var(--radius-sm); font-weight:600; color:var(--fg); font-size:15.5px; }
.mobile-drawer-panel a:hover{ background:var(--surface-2); }

/* ---------- Footer ---------- */
.site-footer{ background:var(--bg-canvas); border-top:1px solid var(--border); margin-top:64px; }
.footer-grid{ max-width:var(--container); margin:0 auto; padding:48px 20px 28px; display:grid; gap:32px; grid-template-columns:1.4fr 1fr 1fr 1fr; }
@media (max-width:820px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:480px){ .footer-grid{ grid-template-columns:1fr; } }
.footer-col-title{ font-family:var(--font-display); font-size:13px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--fg-subtle); margin-bottom:14px; }
.footer-col a{ display:block; padding:6px 0; color:var(--fg-muted); font-size:14.5px; }
.footer-col a:hover{ color:var(--fg); }
.footer-bottom{ border-top:1px solid var(--border); padding:18px 20px; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; max-width:var(--container); margin:0 auto; font-size:13px; color:var(--fg-subtle); }
.trust-bar{ display:grid; gap:16px; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); padding:28px 0; }
.trust-item{ display:flex; align-items:center; gap:12px; }
.trust-item .icon-wrap{ display:flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:var(--radius-md); background:var(--accent-soft); color:var(--accent-soft-fg); flex-shrink:0; }
.trust-item strong{ display:block; font-size:14px; }
.trust-item span{ font-size:12.5px; color:var(--fg-muted); }

/* ---------- Product grid & card ---------- */
.product-grid{ display:grid; gap:14px; grid-template-columns:repeat(2,1fr); }
@media (min-width:640px){ .product-grid{ grid-template-columns:repeat(3,1fr); gap:18px; } }
@media (min-width:1024px){ .product-grid{ grid-template-columns:repeat(4,1fr); } }

.product-card{ position:relative; border-radius:var(--radius-lg); background:var(--surface); border:1px solid var(--border); overflow:hidden; transition:transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease); }
.product-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-lg); border-color:var(--border-strong); }
.product-media{ position:relative; aspect-ratio:1/1; background:var(--surface-2); overflow:hidden; }
.product-media img{ width:100%; height:100%; object-fit:contain; transition:transform .5s var(--ease), opacity .35s ease; }
.product-card:hover .product-media img.img-a{ transform:scale(1.05); }
.product-body{ padding:13px 14px 15px; }
.product-title{ font-size:14px; font-weight:600; color:var(--fg); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.product-price{ margin-top:5px; font-family:var(--font-display); font-weight:600; font-size:15.5px; color:var(--accent); }
.price-compare{ text-decoration:line-through; color:var(--fg-subtle); font-weight:500; font-size:13px; margin-left:6px; }
.fav-btn{ position:absolute; top:10px; left:10px; z-index:2; width:34px; height:34px; border-radius:50%; border:1px solid var(--border); background:color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter:blur(6px); display:flex; align-items:center; justify-content:center; cursor:pointer; color:var(--fg-muted); transition:all var(--dur-fast) var(--ease); }
.fav-btn:hover{ color:var(--danger); transform:scale(1.08); }
.fav-btn.active{ color:var(--danger); }

/* ---------- Empty state ---------- */
.empty-state{ text-align:center; padding:64px 20px; color:var(--fg-muted); }
.empty-state .icon-wrap{ width:64px; height:64px; margin:0 auto 16px; border-radius:50%; background:var(--surface-2); display:flex; align-items:center; justify-content:center; color:var(--fg-subtle); }
.empty-state h3{ font-size:18px; color:var(--fg); margin-bottom:6px; }

/* ---------- Alerts ---------- */
.alert{ display:flex; gap:12px; align-items:flex-start; padding:14px 16px; border-radius:var(--radius-md); border:1px solid transparent; font-size:14px; }
.alert svg{ flex-shrink:0; margin-top:1px; }
.alert-success{ background:var(--success-bg); color:var(--success-fg); border-color:color-mix(in srgb, var(--success) 30%, transparent); }
.alert-warning{ background:var(--warning-bg); color:var(--warning-fg); border-color:color-mix(in srgb, var(--warning) 30%, transparent); }
.alert-danger{ background:var(--danger-bg); color:var(--danger-fg); border-color:color-mix(in srgb, var(--danger) 30%, transparent); }
.alert-info{ background:var(--info-bg); color:var(--info-fg); border-color:color-mix(in srgb, var(--info) 30%, transparent); }

/* ---------- Accordion ---------- */
.accordion{ border:1px solid var(--border); background:var(--surface); border-radius:var(--radius-md); overflow:hidden; }
.accordion > summary{ list-style:none; display:flex; align-items:center; justify-content:space-between; padding:16px 18px; cursor:pointer; font-weight:600; font-size:14.5px; }
.accordion > summary::-webkit-details-marker{ display:none; }
.accordion > summary .chev{ transition:transform var(--dur-base) var(--ease); color:var(--fg-subtle); }
.accordion[open] > summary .chev{ transform:rotate(180deg); }
.accordion .accordion-body{ padding:0 18px 18px; font-size:14px; color:var(--fg-muted); line-height:1.7; }

/* ---------- Tabs ---------- */
.tabs{ display:flex; gap:6px; overflow-x:auto; padding-bottom:2px; }
.tab{ padding:10px 16px; border-radius:var(--radius-full); border:1px solid var(--border); background:var(--surface); font-weight:700; font-size:13.5px; color:var(--fg-muted); white-space:nowrap; cursor:pointer; transition:all var(--dur-fast) var(--ease); }
.tab:hover{ color:var(--fg); }
.tab.active{ background:var(--fg); color:var(--bg); border-color:var(--fg); }

/* ---------- Stepper (checkout) ---------- */
.stepper{ display:flex; align-items:center; gap:0; margin:0 auto 8px; max-width:520px; }
.stepper .step{ display:flex; align-items:center; gap:10px; flex:1; }
.stepper .step-circle{ width:32px; height:32px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; background:var(--surface-2); color:var(--fg-subtle); border:2px solid var(--border); flex-shrink:0; transition:all var(--dur-base) var(--ease); }
.stepper .step-label{ font-size:13.5px; font-weight:700; color:var(--fg-subtle); white-space:nowrap; }
.stepper .step-line{ flex:1; height:2px; background:var(--border); margin:0 8px; border-radius:2px; }
.stepper .step.done .step-circle{ background:var(--accent); border-color:var(--accent); color:var(--accent-fg); }
.stepper .step.done .step-label{ color:var(--fg); }
.stepper .step.current .step-circle{ border-color:var(--accent); color:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); }
.stepper .step.current .step-label{ color:var(--fg); }
@media (max-width:560px){ .stepper .step-label{ display:none; } }

/* ---------- Timeline (order tracking) ---------- */
.timeline{ display:flex; flex-direction:column; }
.timeline-item{ display:flex; gap:16px; position:relative; padding-bottom:28px; }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-rail{ display:flex; flex-direction:column; align-items:center; flex-shrink:0; }
.timeline-dot{ width:30px; height:30px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:var(--surface-2); border:2px solid var(--border); color:var(--fg-subtle); flex-shrink:0; z-index:1; }
.timeline-line{ width:2px; flex:1; background:var(--border); margin:4px 0; min-height:14px; }
.timeline-item.done .timeline-dot{ background:var(--success); border-color:var(--success); color:#fff; }
.timeline-item.done .timeline-line{ background:var(--success); }
.timeline-item.current .timeline-dot{ background:var(--accent); border-color:var(--accent); color:var(--accent-fg); box-shadow:0 0 0 5px var(--accent-soft); }
.timeline-item.canceled .timeline-dot{ background:var(--danger); border-color:var(--danger); color:#fff; }
.timeline-content{ padding-top:3px; }
.timeline-title{ font-weight:700; font-size:14.5px; color:var(--fg); }
.timeline-item:not(.done):not(.current) .timeline-title{ color:var(--fg-subtle); }
.timeline-time{ font-size:12.5px; color:var(--fg-subtle); margin-top:2px; }
.timeline-note{ font-size:13.5px; color:var(--fg-muted); margin-top:4px; line-height:1.5; }

/* ---------- Table ---------- */
.table-wrap{ overflow-x:auto; }
table.data-table{ width:100%; border-collapse:collapse; font-size:14px; }
.data-table th{ text-align:left; color:var(--fg-subtle); font-weight:600; font-size:12.5px; text-transform:uppercase; letter-spacing:.03em; padding:10px 12px; border-bottom:1px solid var(--border); }
.data-table td{ padding:13px 12px; border-bottom:1px solid var(--border); }
.data-table tr:last-child td{ border-bottom:0; }
.data-table .right{ text-align:right; }
.data-table tbody tr{ transition:background var(--dur-fast) ease; }
.data-table tbody tr:hover{ background:var(--surface-2); }

/* ---------- Quantity stepper ---------- */
.qty-stepper{ display:inline-flex; align-items:center; border:1.5px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; background:var(--surface); }
.qty-stepper button{ width:36px; height:38px; border:0; background:transparent; color:var(--fg); font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background var(--dur-fast) ease; }
.qty-stepper button:hover{ background:var(--surface-2); }
.qty-stepper input{ width:42px; border:0; background:transparent; text-align:center; font-weight:700; padding:0; -moz-appearance:textfield; }
.qty-stepper input::-webkit-outer-spin-button,.qty-stepper input::-webkit-inner-spin-button{ -webkit-appearance:none; margin:0; }

/* ---------- Avatar ---------- */
.avatar{ width:34px; height:34px; border-radius:50%; background:var(--accent-soft); color:var(--accent-soft-fg); display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; flex-shrink:0; }

/* ---------- Skeleton ---------- */
.skeleton{ background:linear-gradient(90deg, var(--surface-2) 25%, var(--surface-hover) 37%, var(--surface-2) 63%); background-size:400% 100%; animation:skeleton-loading 1.4s ease infinite; border-radius:var(--radius-sm); }
@keyframes skeleton-loading{ 0%{ background-position:100% 50%; } 100%{ background-position:0 50%; } }

/* ---------- Hero / marquee ---------- */
.hero{ position:relative; overflow:hidden; border-radius:0; min-height:78vh; display:flex; align-items:center; justify-content:center; }
.hero-media{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.hero-scrim{ position:absolute; inset:0; background:linear-gradient(180deg, rgba(6,5,12,.35), rgba(6,5,12,.72)); }
[data-theme="light"] .hero-scrim, html:not([data-theme="dark"]) .hero-scrim{ background:linear-gradient(180deg, rgba(10,8,20,.28), rgba(10,8,20,.68)); }
.hero-content{ position:relative; z-index:2; text-align:center; color:#fff; padding:0 20px; max-width:720px; }
.hero-content h1{ font-size:clamp(2.4rem,6vw,4.2rem); color:#fff; }
.hero-content p{ margin-top:14px; font-size:clamp(1rem,2vw,1.2rem); color:rgba(255,255,255,.82); }

.marquee{ overflow:hidden; white-space:nowrap; border-top:1px solid var(--border); border-bottom:1px solid var(--border); background:var(--surface-2); padding:12px 0; }
.marquee-track{ display:inline-block; padding-left:100%; animation:marquee 24s linear infinite; font-family:var(--font-display); font-weight:600; font-size:14px; letter-spacing:.03em; color:var(--fg-muted); }
@keyframes marquee{ 0%{ transform:translateX(0);} 100%{ transform:translateX(-100%);} }

/* ---------- Breadcrumb ---------- */
.breadcrumb{ display:flex; align-items:center; flex-wrap:wrap; gap:6px; font-size:13.5px; color:var(--fg-subtle); }
.breadcrumb a{ color:var(--fg-subtle); }
.breadcrumb a:hover{ color:var(--fg); }
.breadcrumb .sep{ color:var(--border-strong); }

/* ---------- Sticky action bar ---------- */
.sticky-bar{ position:fixed; left:0; right:0; bottom:0; z-index:40; background:color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); border-top:1px solid var(--border); }
.sticky-bar-inner{ max-width:var(--container-narrow); margin:0 auto; padding:14px 20px; display:flex; align-items:center; gap:14px; }

/* ---------- Prose (legal / static content) ---------- */
.prose{ color:var(--fg); line-height:1.75; font-size:15.5px; }
.prose h2{ font-size:1.3rem; margin:1.6em 0 .6em; }
.prose h3{ font-size:1.1rem; margin:1.4em 0 .5em; }
.prose p,.prose li{ color:var(--fg-muted); margin:.6em 0; }
.prose ul,.prose ol{ padding-left:1.3em; list-style:disc; }
.prose ol{ list-style:decimal; }
.prose a{ color:var(--accent); text-decoration:underline; text-underline-offset:2px; }
.prose strong{ color:var(--fg); }

/* ---------- Misc utility ---------- */
.ratio-square{ aspect-ratio:1/1; }
.overflow-hidden{ overflow:hidden; }
.rounded-lg{ border-radius:var(--radius-lg); }
.center-col{ display:flex; flex-direction:column; align-items:center; text-align:center; }
.w-full{ width:100%; }
.reveal{ opacity:0; transform:translateY(18px); transition:opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in{ opacity:1; transform:none; }

/* Swiper theming hook (product gallery) */
.swiper{ --swiper-theme-color: var(--accent); --swiper-navigation-size:20px; }
.swiper-slide{ background:var(--surface-2); }
.thumbs .swiper-slide{ opacity:.55; border:1.5px solid var(--border); border-radius:var(--radius-sm); overflow:hidden; cursor:pointer; transition:all var(--dur-fast) ease; }
.thumbs .swiper-slide-thumb-active{ opacity:1; border-color:var(--accent); }

/* ---------- Product grid: dual-image swap (hover / motion) ---------- */
.product-media .img-a,.product-media .img-b{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.product-media .img-b{ opacity:0; }
.product-card:hover .product-media .img-a{ opacity:0; transform:scale(1.02); }
.product-card:hover .product-media .img-b{ opacity:1; }
.product-card[data-show="b"] .product-media .img-a{ opacity:0; }
.product-card[data-show="b"] .product-media .img-b{ opacity:1; }
.product-card{ position:relative; will-change:transform; transform-style:preserve-3d; }

/* ---------- Filter bar (shop / category) ---------- */
.filter-bar{ position:sticky; z-index:35; top:65px; background:color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); border-bottom:1px solid var(--border); }
.filter-bar-inner{ max-width:var(--container); margin:0 auto; padding:12px 20px; display:flex; align-items:center; gap:10px; overflow-x:auto; }
.filter-search{ position:relative; width:100%; max-width:360px; flex-shrink:0; }
.filter-search .input{ padding-left:38px; }
.filter-search .search-icon{ position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--fg-subtle); pointer-events:none; }
.filter-select{ min-width:120px; flex-shrink:0; }
.filter-num{ width:88px; flex-shrink:0; }

.search-panel{ position:absolute; margin-top:8px; left:0; right:0; border-radius:var(--radius-md); border:1px solid var(--border); background:var(--surface); box-shadow:var(--shadow-lg); overflow:hidden; z-index:45; }
.search-panel-grid{ display:grid; grid-template-columns:1fr 1fr; }
@media (max-width:520px){ .search-panel-grid{ grid-template-columns:1fr; } }
.search-panel-col{ padding:12px; }
.search-panel-col + .search-panel-col{ border-top:1px solid var(--border); }
@media (min-width:521px){ .search-panel-col + .search-panel-col{ border-top:0; border-left:1px solid var(--border); } }
.search-panel-label{ font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--fg-subtle); font-weight:700; margin-bottom:8px; }
.mini-hit{ display:flex; align-items:center; gap:10px; padding:8px; border-radius:var(--radius-sm); color:var(--fg); transition:background var(--dur-fast) ease; }
.mini-hit:hover{ background:var(--surface-2); }
.mini-hit img{ width:34px; height:34px; object-fit:contain; border-radius:6px; background:var(--surface-2); flex-shrink:0; }
.mini-hit .t{ font-size:13.5px; font-weight:600; }
.mini-hit .p{ font-size:12px; color:var(--fg-muted); }

.motion-btn{ position:fixed; right:16px; bottom:16px; z-index:45; }

/* Preview / lightbox modal */
.preview-dialog{ position:relative; max-width:640px; margin:6vh auto 0; border-radius:var(--radius-lg); overflow:hidden; background:var(--surface); border:1px solid var(--border); box-shadow:var(--shadow-lg); }
.preview-strip{ display:flex; gap:8px; overflow-x:auto; margin-top:12px; }
.preview-strip img{ width:60px; height:60px; object-fit:contain; background:var(--surface-2); border-radius:var(--radius-sm); border:1.5px solid var(--border); cursor:pointer; flex-shrink:0; }

/* Active filter chip row */
.active-filters{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }

/* ---------- Cart / order line items ---------- */
.cart-item{ display:grid; grid-template-columns:76px 1fr auto; gap:14px; align-items:center; padding:18px 0; border-bottom:1px solid var(--border); transition:opacity var(--dur-base) ease; }
.cart-item:last-child{ border-bottom:0; }
.cart-item-thumb{ width:76px; height:76px; border-radius:var(--radius-md); background:var(--surface-2); overflow:hidden; display:flex; align-items:center; justify-content:center; color:var(--fg-subtle); flex-shrink:0; }
.cart-item-thumb img{ width:100%; height:100%; object-fit:cover; }
.cart-item-title{ font-weight:600; font-size:14.5px; color:var(--fg); }
.cart-item-meta{ font-size:12.5px; color:var(--fg-muted); margin-top:3px; }
.cart-item-price-each{ font-size:12.5px; color:var(--fg-subtle); margin-top:5px; }
.cart-item-controls{ display:flex; flex-direction:column; align-items:flex-end; gap:10px; }
.cart-item-line-total{ font-weight:700; font-family:var(--font-display); white-space:nowrap; }
@media (max-width:600px){
  .cart-item{ grid-template-columns:56px 1fr; }
  .cart-item-thumb{ width:56px; height:56px; }
  .cart-item-controls{ grid-column:1/-1; flex-direction:row; align-items:center; justify-content:space-between; margin-top:10px; }
}

.summary-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 0; font-size:14px; }
.summary-row.total{ font-weight:800; font-size:16.5px; font-family:var(--font-display); padding-top:12px; border-top:1px solid var(--border); margin-top:6px; }
