/* ==========================================================================
   ShopLab — UI Automation Testbed
   Modern retail look (monochrome ink + soft neutrals, pill buttons, Inter).
   Plain CSS, no build step. Design tokens first, then components.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f5f4;
  --surface-3: #fafaf9;
  --border: #e7e5e4;
  --border-strong: #d6d3d1;
  --text: #0c0a09;
  --text-muted: #6b6560;
  --primary: #111111;
  --primary-hover: #333333;
  --primary-fg: #ffffff;
  --primary-soft: #f2f2f1;
  --accent: #4f46e5;
  --success: #15803d;
  --success-soft: #ecfdf3;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #b45309;
  --warning-soft: #fffbeb;
  --info: #0369a1;
  --info-soft: #f0f9ff;
  --sale: #e11d48;
  --focus: 0 0 0 3px rgba(17, 17, 17, .18);
  --radius: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(12, 10, 9, .04), 0 2px 8px rgba(12, 10, 9, .04);
  --shadow-lg: 0 24px 60px -12px rgba(12, 10, 9, .25);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-h: 68px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --surface: #131315;
    --surface-2: #1b1b1e;
    --surface-3: #161618;
    --border: #2a2a2e;
    --border-strong: #3a3a40;
    --text: #f5f5f4;
    --text-muted: #a8a29e;
    --primary: #fafaf9;
    --primary-hover: #e7e5e4;
    --primary-fg: #0b0b0c;
    --primary-soft: #232326;
    --accent: #a5b4fc;
    --success: #4ade80;
    --success-soft: #0f2a1a;
    --danger: #f87171;
    --danger-soft: #331517;
    --warning: #fbbf24;
    --warning-soft: #33270e;
    --info: #38bdf8;
    --info-soft: #0c2533;
    --sale: #fb7185;
    --focus: 0 0 0 3px rgba(250, 250, 249, .25);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--text-muted); }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.3rem); letter-spacing: -0.03em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.02rem; letter-spacing: -0.01em; }

p { margin: 0 0 .75em; }

code, kbd { font-family: var(--mono); font-size: .86em; background: var(--surface-2); padding: .12em .4em; border-radius: 6px; }

::selection { background: var(--text); color: var(--bg); }

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

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

.muted { color: var(--text-muted); }
.small { font-size: .84rem; }
.mono { font-family: var(--mono); }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.section-title { font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 1rem; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .75rem; }

/* ---------- Announcement / Header / Footer ---------- */

.announcement-bar {
  background: var(--primary); color: var(--primary-fg);
  text-align: center; font-size: .8rem; letter-spacing: .01em;
  padding: .5rem 16px;
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.12rem; letter-spacing: -0.03em; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
  background: var(--primary); color: var(--primary-fg);
  display: grid; place-items: center; font-size: .95rem; font-weight: 800;
}
.brand small { font-weight: 500; color: var(--text-muted); font-size: .72rem; letter-spacing: 0; margin-left: .25rem; }

.main-nav { display: flex; gap: .15rem; margin-left: auto; align-items: center; }
.main-nav a {
  position: relative; padding: .5rem .85rem; border-radius: var(--radius-pill);
  color: var(--text); text-decoration: none; font-weight: 500; font-size: .92rem;
  transition: background .15s;
}
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.main-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .2rem; height: 2px; border-radius: 2px; background: var(--text);
}
.main-nav .btn { margin-left: .25rem; }
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }

.cart-link { display: inline-flex !important; align-items: center; gap: .4rem; }
.cart-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--primary); color: var(--primary-fg); font-size: .72rem; font-weight: 700;
  display: inline-grid; place-items: center;
}
.cart-count.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.35); } }

.user-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .85rem; color: var(--text-muted); padding: 0 .3rem 0 .6rem; white-space: nowrap;
}
.user-chip::before {
  content: attr(data-initial);
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--surface-2); color: var(--text); font-weight: 700; font-size: .8rem;
  border: 1px solid var(--border);
}

.site-header .menu-toggle { display: none; margin-left: auto; }

@media (max-width: 760px) {
  .site-header .menu-toggle { display: inline-flex; }
  .main-nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .25rem; padding: .75rem 16px 1rem;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a[aria-current="page"]::after { display: none; }
  .main-nav a[aria-current="page"] { background: var(--surface-2); }
  .user-chip { padding: .4rem .85rem; }
}

.site-footer { margin-top: 4rem; border-top: 1px solid var(--border); background: var(--surface-3); padding: 2rem 0; font-size: .86rem; color: var(--text-muted); }
.site-footer .container { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; gap: .75rem; align-items: center; color: var(--text); }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-border: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 40px; padding: .5rem 1.15rem;
  font: inherit; font-weight: 600; font-size: .88rem; letter-spacing: -0.005em;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-border); border-radius: var(--radius-pill);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .08s, opacity .15s, box-shadow .15s;
}
.btn:hover:not(:disabled) { background: var(--surface-2); color: var(--btn-fg); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }

.btn-primary { --btn-bg: var(--primary); --btn-fg: var(--primary-fg); --btn-border: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-outline { --btn-bg: transparent; --btn-border: var(--text); }
.btn-outline:hover:not(:disabled) { background: var(--text); color: var(--bg); }
.btn-danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-border: var(--danger); }
.btn-danger:hover:not(:disabled) { background: var(--danger); filter: brightness(.92); }
.btn-success { --btn-bg: var(--success); --btn-fg: #fff; --btn-border: var(--success); }
.btn-success:hover:not(:disabled) { background: var(--success); filter: brightness(.95); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; }
.btn-sm { min-height: 32px; padding: .3rem .8rem; font-size: .8rem; }
.btn-icon { width: 34px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 50px; padding: .7rem 1.6rem; font-size: .95rem; }

.btn.is-loading { pointer-events: none; }
.btn.is-loading::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}

.spinner {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid var(--text); border-right-color: transparent;
  animation: spin .7s linear infinite; vertical-align: middle;
}
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: .35rem; }
.field label, .field-label { font-weight: 600; font-size: .84rem; }
.field .hint { font-size: .78rem; color: var(--text-muted); }
.required::after { content: " *"; color: var(--danger); }

.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: .6rem .85rem;
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.select {
  appearance: none; -webkit-appearance: none; padding-right: 2.2rem;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center;
}
.select[multiple] { min-height: 130px; padding: .35rem; background-image: none; }
.textarea { min-height: 96px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: color-mix(in srgb, var(--text-muted) 75%, transparent); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-muted); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--text); box-shadow: var(--focus); outline: none; }
.input:disabled, .select:disabled { background: var(--surface-2); cursor: not-allowed; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 15%, transparent); }
.input[aria-invalid="false"].was-validated { border-color: var(--success); }

.field-error { color: var(--danger); font-size: .8rem; margin: 0; }
.field-error:empty { display: none; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
}

.check { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; font-size: .92rem; }
.check input { width: 18px; height: 18px; margin: .15rem 0 0; accent-color: var(--primary); flex-shrink: 0; }

.radio-cards { display: grid; gap: .6rem; }
.radio-card {
  display: flex; align-items: center; gap: .85rem; padding: .95rem 1.1rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.radio-card:hover { border-color: var(--text-muted); }
.radio-card:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.radio-card input { accent-color: var(--primary); width: 18px; height: 18px; margin: 0; }
.radio-card .rc-title { font-weight: 600; }
.radio-card .rc-price { margin-left: auto; font-weight: 700; }

input[type="range"] { width: 100%; accent-color: var(--primary); }

.input-group { display: flex; gap: .5rem; }
.input-group .input { flex: 1; }

.card-brand { font-size: .7rem; font-weight: 700; letter-spacing: .04em; padding: .15rem .5rem; border-radius: 6px; background: var(--surface-2); color: var(--text-muted); margin-left: .35rem; }

/* ---------- Panels / cards ---------- */

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.panel + .panel { margin-top: 1rem; }
.panel-title { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.15rem; }
.panel-title h2, .panel-title h3 { margin: 0; font-size: 1.15rem; }
.step-badge { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--primary-fg); display: grid; place-items: center; font-size: .78rem; font-weight: 700; }

/* ---------- Alerts / banners ---------- */

.alert {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .8rem 1rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-size: .9rem;
}
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert-error   { background: var(--danger-soft);  color: var(--danger);  border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-info    { background: var(--info-soft);    color: var(--info);    border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.alert a { color: inherit; }
.alert .alert-close { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; font-size: 1.15rem; line-height: 1; }

.badge {
  display: inline-flex; align-items: center; padding: .18rem .55rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 6px; background: var(--surface-2); color: var(--text-muted);
}
.badge-sale { background: var(--sale); color: #fff; }
.badge-new { background: var(--primary); color: var(--primary-fg); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

/* ---------- Toasts ---------- */

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: flex; flex-direction: column; gap: .5rem; max-width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: .6rem; align-items: center;
  padding: .8rem 1rem; border-radius: var(--radius-md);
  background: var(--primary); color: var(--primary-fg); box-shadow: var(--shadow-lg);
  font-size: .88rem; font-weight: 500; animation: toast-in .25s cubic-bezier(.2, .9, .3, 1.2);
}
.toast[data-type="success"]::before { content: "✓"; font-weight: 800; color: #4ade80; }
.toast[data-type="error"] { background: var(--danger); color: #fff; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; font-size: 1.1rem; opacity: .7; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ---------- Catalog: hero, categories, value props ---------- */

.hero {
  margin: 1.5rem 0 2.5rem; padding: clamp(2rem, 4vw, 3.5rem);
  border-radius: 24px; background: var(--surface-2);
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2rem; align-items: center;
  overflow: hidden;
}
.hero h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800; margin-bottom: 1rem; max-width: 14ch; }
.hero-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 46ch; margin-bottom: 1.75rem; }
.hero-visual { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 420px; justify-self: end; width: 100%; }
.hero-tile {
  aspect-ratio: 1; border-radius: 20px; display: grid; place-items: center;
  font-size: clamp(3rem, 2rem + 4vw, 5.5rem); box-shadow: var(--shadow);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.hero-tile:hover { transform: translateY(-6px) rotate(-2deg); }
.hero-tile.t1 { background: #e0e7ff; }
.hero-tile.t2 { background: #ffedd5; transform: translateY(1.5rem); }
.hero-tile.t3 { background: #e0f2fe; }
.hero-tile.t4 { background: #dcfce7; transform: translateY(1.5rem); }
@media (prefers-color-scheme: dark) {
  .hero-tile.t1 { background: #23264a; } .hero-tile.t2 { background: #3b2513; }
  .hero-tile.t3 { background: #10283a; } .hero-tile.t4 { background: #12301d; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { grid-template-columns: repeat(4, 1fr); max-width: none; justify-self: stretch; }
  .hero-tile { font-size: 2.4rem; border-radius: 14px; }
  .hero-tile.t2, .hero-tile.t4 { transform: none; }
}

.category-strip { margin-bottom: 2.5rem; }
.category-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .9rem; }
@media (max-width: 900px) { .category-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.category-tile {
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
  padding: 1.25rem .5rem; border-radius: var(--radius); background: var(--surface-2);
  text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--text);
  border: 1px solid transparent; transition: transform .2s, border-color .2s, background .2s;
}
.category-tile:hover { transform: translateY(-3px); color: var(--text); border-color: var(--border-strong); }
.category-tile[aria-current="true"] { border-color: var(--text); background: var(--surface); }
.category-emoji { font-size: 2rem; line-height: 1; }

.value-props {
  margin-top: 3.5rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem;
  border-top: 1px solid var(--border); padding-top: 2rem;
}
.value-props div { display: flex; flex-direction: column; gap: .2rem; }
.value-props span { color: var(--text-muted); font-size: .86rem; }
@media (max-width: 760px) { .value-props { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Catalog: filters + grid ---------- */

.catalog-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
@media (max-width: 900px) { .catalog-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }

.filters { position: sticky; top: calc(var(--header-h) + 16px); border: 0; padding: 0; background: transparent; }
@media (max-width: 900px) { .filters { position: static; border: 1px solid var(--border); padding: 1.25rem; } }
.filters-heading { font-size: 1.05rem; margin-bottom: 1rem; }
.filters .field, .filters fieldset { padding: 1rem 0; border-top: 1px solid var(--border); margin: 0; }
.filters fieldset { border-left: 0; border-right: 0; border-bottom: 0; }
.filters legend { font-weight: 600; font-size: .84rem; padding: 1rem 0 .5rem; float: left; width: 100%; }
.filters fieldset .chip-group { clear: both; }

.chip-group { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  display: inline-flex; align-items: center;
  padding: .38rem .8rem; border-radius: var(--radius-pill); border: 1px solid var(--border-strong);
  background: var(--surface); font-size: .82rem; font-weight: 500; cursor: pointer; user-select: none;
  transition: background .15s, border-color .15s;
}
.chip:hover { border-color: var(--text); }
.chip input { width: 14px; height: 14px; margin: 0 .4rem 0 0; cursor: pointer; accent-color: var(--primary-fg); }
.chip:has(input:checked) { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.chip:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }

.range-labels { display: flex; justify-content: space-between; font-size: .76rem; color: var(--text-muted); }

.catalog-toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.catalog-toolbar .select { width: auto; min-height: 40px; border-radius: var(--radius-pill); padding-left: 1rem; }
#results-count { font-size: .88rem; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2rem 1.25rem; }
.product-grid[data-state="loading"] { display: block; }

.loading-state, .empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem;
  padding: 3.5rem 1rem; text-align: center; color: var(--text-muted);
  border-radius: var(--radius); background: var(--surface-2);
}
.empty-state .emoji { font-size: 2.5rem; }

.product-card { display: flex; flex-direction: column; background: transparent; }
.product-card.is-out-of-stock .product-media img { filter: grayscale(.6); opacity: .7; }

.product-media-wrap { position: relative; }
.product-media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); border-radius: var(--radius); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.product-card:hover .product-media img { transform: scale(1.05); }
.product-media .badge { position: absolute; top: 12px; left: 12px; }

.card-wish {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--text);
  font-size: 1.15rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
  box-shadow: var(--shadow); backdrop-filter: blur(6px);
  transition: transform .15s, color .15s;
}
.card-wish:hover { transform: scale(1.08); }
.card-wish[aria-pressed="true"] { color: var(--sale); }

.product-body { padding: .9rem .15rem 0; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.product-category { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin: 0; font-weight: 500; }
.product-title { margin: 0; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.product-title a { color: var(--text); text-decoration: none; }
.product-title a:hover { text-decoration: underline; }
.rating { color: var(--text); font-size: .8rem; letter-spacing: 1px; }
.rating span { color: var(--text-muted); letter-spacing: 0; margin-left: .3rem; }
.price-row { display: flex; align-items: baseline; gap: .5rem; }
.price { font-weight: 700; font-size: 1.05rem; margin: 0; letter-spacing: -0.01em; }
.compare-price { color: var(--text-muted); text-decoration: line-through; font-size: .86rem; }
.price-row:has(.compare-price:not(:empty)) .price { color: var(--sale); }
.tag-list { display: flex; gap: .3rem; flex-wrap: wrap; }
.stock-note { font-size: .78rem; margin: 0; }
.stock-note.low { color: var(--warning); font-weight: 600; }
.stock-note.out { color: var(--danger); font-weight: 600; }
.color-dots { display: flex; align-items: center; gap: .3rem; }
.color-dots .swatch-dot { width: 12px; height: 12px; }
.color-dots .small { margin-left: .2rem; }

.card-actions { display: flex; gap: .5rem; align-items: center; margin-top: auto; padding-top: .6rem; }
.card-actions .btn { flex: 1; }
.card-links { display: flex; gap: 1rem; font-size: .8rem; padding-top: .3rem; }
.card-links a { color: var(--text-muted); }
.card-links a:hover { color: var(--text); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); overflow: hidden; background: var(--surface); }
.qty button {
  width: 34px; height: 38px; border: 0; background: transparent; color: var(--text);
  font-size: 1.05rem; cursor: pointer;
}
.qty button:hover:not(:disabled) { background: var(--surface-2); }
.qty button:disabled { opacity: .3; cursor: not-allowed; }
.qty input {
  width: 36px; height: 38px; border: 0; text-align: center; font: inherit; font-weight: 600;
  background: transparent; color: var(--text); -moz-appearance: textfield; appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm button { height: 30px; width: 28px; }
.qty-sm input { height: 30px; width: 30px; font-size: .85rem; }

.btn.is-added { --btn-bg: var(--success); --btn-border: var(--success); --btn-fg: #fff; }

/* ---------- Product detail ---------- */

.breadcrumb { display: flex; gap: .45rem; font-size: .84rem; color: var(--text-muted); margin: 1.5rem 0; flex-wrap: wrap; padding: 0; list-style: none; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb li + li::before { content: "/"; margin-right: .45rem; opacity: .5; }

.pdp { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
@media (max-width: 860px) { .pdp { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }

.gallery-main { border-radius: 20px; overflow: hidden; aspect-ratio: 1; background: var(--surface-2); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .75rem; margin-top: .85rem; }
.gallery-thumbs button { width: 84px; aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: var(--radius-md); overflow: hidden; cursor: pointer; background: none; opacity: .7; transition: opacity .15s, border-color .15s; }
.gallery-thumbs button:hover { opacity: 1; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--text); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pdp-info { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 860px) { .pdp-info { position: static; } }
.pdp-info h1 { margin-bottom: .35rem; font-size: clamp(1.7rem, 1.2rem + 1.5vw, 2.4rem); }
.pdp-info .price { font-size: 1.5rem; }
.pdp-options { display: grid; gap: 1.15rem; margin: 1.5rem 0; padding: 1.5rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.swatches { display: flex; gap: .5rem; flex-wrap: wrap; border: 0; padding: 0; margin: 0; }
.swatch { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .85rem; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); cursor: pointer; font-size: .85rem; font-weight: 500; }
.swatch:hover { border-color: var(--text); }
.swatch:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.swatch input { accent-color: var(--primary); margin: 0; }
.swatch-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); display: inline-block; flex-shrink: 0; }

.wishlist-btn[aria-pressed="true"] { color: var(--sale); border-color: var(--sale); }

.tabs { margin-top: 3.5rem; }
.tablist { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab {
  padding: .85rem 0; border: 0; background: none; font: inherit; font-weight: 600; font-size: .95rem;
  color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.tabpanel { padding: 1.5rem 0; max-width: 820px; }

.review { padding: 1.15rem 0; border-bottom: 1px solid var(--border); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.review-head strong { font-size: .95rem; }

.star-input { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: .15rem; border: 0; padding: 0; margin: 0; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 1.7rem; color: var(--border-strong); cursor: pointer; line-height: 1; transition: color .1s; }
.star-input input:checked ~ label,
.star-input label:hover, .star-input label:hover ~ label { color: var(--text); }
.star-input input:focus-visible + label { outline: 2px solid var(--text); border-radius: 4px; }

/* ---------- Checkout ---------- */

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 2rem; align-items: start; margin-top: 1.5rem; }
@media (max-width: 960px) { .checkout-layout { grid-template-columns: minmax(0, 1fr); } }
.summary { position: sticky; top: calc(var(--header-h) + 16px); background: var(--surface-3); }
@media (max-width: 960px) { .summary { position: static; } }

.cart-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; min-height: 40px; }
.cart-item {
  display: grid; grid-template-columns: auto 56px 1fr auto; gap: .7rem; align-items: center;
  padding: .65rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
}
.cart-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.cart-item-name { font-weight: 600; font-size: .88rem; margin: 0; line-height: 1.3; }
.cart-item-meta { display: flex; gap: .5rem; align-items: center; margin-top: .35rem; flex-wrap: wrap; }
.cart-item-total { font-weight: 700; font-size: .9rem; text-align: right; }
.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }

.drag-handle { cursor: grab; color: var(--text-muted); user-select: none; font-size: 1.1rem; padding: 0 .1rem; }
[draggable="true"] { cursor: grab; }
.is-dragging { opacity: .45; outline: 2px dashed var(--text); }
.is-drop-target { background: var(--primary-soft) !important; outline: 2px dashed var(--text-muted); outline-offset: 2px; }

.totals { margin: 1.25rem 0 0; display: grid; gap: .5rem; }
.totals div { display: flex; justify-content: space-between; font-size: .9rem; }
.totals dt { color: var(--text-muted); }
.totals dt, .totals dd { margin: 0; }
.totals .total-row { border-top: 1px solid var(--border); padding-top: .85rem; margin-top: .35rem; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.totals .total-row dt { color: var(--text); }
.discount-value { color: var(--success); }

.promo-loading { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .88rem; }

.iframe-shell { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); }
.iframe-shell iframe { display: block; width: 100%; border: 0; }

.success-hero { text-align: center; padding: 3rem 1rem; }
.success-hero .check-circle { width: 72px; height: 72px; border-radius: 50%; background: var(--primary); color: var(--primary-fg); display: grid; place-items: center; font-size: 2rem; margin: 0 auto 1.25rem; }

/* ---------- Dialog / overlay ---------- */

dialog.modal {
  border: 0; padding: 0; border-radius: 20px; box-shadow: var(--shadow-lg);
  width: min(540px, calc(100vw - 32px)); color: var(--text); background: var(--surface);
}
dialog.modal[open] { animation: modal-in .25s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
dialog.modal::backdrop { background: rgba(12, 10, 9, .45); backdrop-filter: blur(4px); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.15rem 1.5rem; border-bottom: 1px solid var(--border); }
.modal-header h2 { margin: 0; font-size: 1.15rem; }
.modal-body { padding: 1.5rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: .5rem; padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: var(--surface-3); }
.modal-close { background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); line-height: 1; }
.modal-close:hover { color: var(--text); }

.overlay {
  position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 16px;
  background: rgba(12, 10, 9, .5); backdrop-filter: blur(4px);
}
.overlay-card { background: var(--surface); border-radius: 20px; padding: 1.75rem; width: min(440px, 100%); box-shadow: var(--shadow-lg); }

.summary-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.summary-table td { padding: .4rem 0; }
.summary-table td:last-child { text-align: right; }

/* ---------- Login ---------- */

.auth-page { background: var(--bg); }
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-aside {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(900px 500px at 0% 0%, #4338ca 0%, transparent 60%),
              radial-gradient(800px 600px at 100% 100%, #be185d 0%, transparent 55%), #0c0a09;
  display: flex; align-items: flex-end; padding: 3rem;
}
.auth-aside-inner { max-width: 440px; position: relative; z-index: 1; }
.auth-aside h2 { font-size: clamp(2rem, 1.2rem + 2.5vw, 3.2rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800; margin: 2rem 0 1rem; }
.auth-aside p { color: rgba(255, 255, 255, .72); font-size: 1.02rem; }
.auth-brand-light { color: #fff; }
.auth-brand-light .brand-mark { background: #fff; color: #0c0a09; }
.auth-tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: .6rem; margin-top: 2rem; }
.auth-tiles span { aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(6px); }
.auth-shell { width: 100%; max-width: 460px; margin: 0 auto; padding: 48px 24px; display: flex; flex-direction: column; justify-content: center; gap: 1.25rem; }
.auth-brand { font-size: 1.25rem; }
.auth-card { padding: 0; border: 0; background: transparent; }
.auth-card h1 { margin-bottom: .3rem; font-size: 2rem; }
.auth-card form { display: grid; gap: 1.1rem; margin-top: 1.25rem; }
.auth-card .alert { margin-top: 1rem; }
.demo-creds { margin-top: 1.5rem; padding: .9rem 1.1rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-3); font-size: .86rem; }
.demo-creds summary { cursor: pointer; font-weight: 600; }
.demo-creds table { margin-top: .5rem; }
.demo-creds td:last-child { text-align: right; color: var(--text-muted); }
@media (max-width: 860px) {
  .auth-split { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
}

/* ---------- Uploads, tables, menus ---------- */

.dropzone {
  display: block;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 2.5rem 1rem;
  text-align: center; background: var(--surface-3); cursor: pointer; transition: background .15s, border-color .15s;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--text); background: var(--surface-2); }
.dropzone .dz-icon { font-size: 2rem; margin-bottom: .25rem; }
.upload-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.upload-item { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.upload-item .thumb { aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; font-size: 2rem; }
.upload-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-item .meta { padding: .55rem; font-size: .78rem; display: flex; flex-direction: column; gap: .3rem; }
.upload-item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.progress { width: 100%; height: 8px; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--primary); transition: width .1s linear; }

/* Table */
.table-toolbar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: .9rem; }
.table-toolbar .input { max-width: 260px; min-height: 40px; }
.table-toolbar .select { width: auto; min-height: 40px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.data-table th, .data-table td { padding: .65rem .75rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table thead th { background: var(--surface-3); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); position: sticky; top: 0; }
.data-table tbody tr:hover { background: var(--surface-3); }
.data-table tbody tr.is-selected { background: var(--primary-soft); }
.data-table tbody tr.is-editing { background: var(--warning-soft); }
.data-table .num { text-align: right; }
.data-table .input { min-height: 32px; padding: .25rem .5rem; width: 90px; border-radius: 8px; }
.data-table input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; }
.sort-btn { all: unset; cursor: pointer; display: inline-flex; gap: .3rem; align-items: center; }
.sort-btn:hover { color: var(--text); }
.sort-btn:focus-visible { outline: 2px solid var(--text); border-radius: 3px; }
.sort-indicator { opacity: .4; }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--text) !important; }
th[aria-sort="ascending"] .sort-indicator, th[aria-sort="descending"] .sort-indicator { opacity: 1; }
.row-actions { display: flex; gap: .3rem; }

.pagination { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; margin-top: .9rem; }
.pagination .btn[aria-current="page"] { --btn-bg: var(--primary); --btn-fg: var(--primary-fg); --btn-border: var(--primary); }

/* Combobox */
.combobox { position: relative; }
.combobox-field { position: relative; display: flex; }
.combobox-field .input { padding-right: 2.4rem; }
.combobox-toggle { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 34px; border: 0; background: none; color: var(--text-muted); cursor: pointer; border-radius: 8px; }
.combobox-toggle:hover { background: var(--surface-2); }
.listbox {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 260px; overflow-y: auto; margin: 0; padding: .35rem; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
}
.listbox [role="option"] { padding: .55rem .7rem; border-radius: 8px; cursor: pointer; font-size: .9rem; display: flex; justify-content: space-between; gap: .5rem; }
.listbox [role="option"]:hover { background: var(--surface-2); }
.listbox [role="option"].is-active { background: var(--primary); color: var(--primary-fg); }
.listbox [role="option"].is-active .muted { color: inherit; opacity: .75; }
.listbox [role="option"][aria-selected="true"]::after { content: "✓"; }
.listbox mark { background: transparent; color: inherit; font-weight: 800; text-decoration: underline; }
.listbox .no-results { padding: .55rem .7rem; color: var(--text-muted); font-size: .88rem; }

.context-menu { position: fixed; z-index: 950; min-width: 170px; padding: .35rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); list-style: none; margin: 0; }
.context-menu button { all: unset; display: block; width: 100%; box-sizing: border-box; padding: .45rem .7rem; border-radius: 8px; cursor: pointer; font-size: .88rem; }
.context-menu button:hover, .context-menu button:focus-visible { background: var(--surface-2); }

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

.field > .qty { align-self: flex-start; }

/* ==========================================================================
   v2: integrated store components
   ========================================================================== */

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 2000; background: var(--primary); color: var(--primary-fg); padding: .5rem 1rem; border-radius: var(--radius-pill); }
.skip-link:focus { left: 16px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--text-muted); }
.hr { border: 0; border-top: 1px solid var(--border); margin: .25rem 0; }
.badge-info { background: var(--info-soft); color: var(--info); }
main.container { padding-top: 1.25rem; }

/* ---------- Header v2 ---------- */
.announcement-bar { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.announcement-bar .dot { opacity: .5; }
.site-header .header-inner { gap: 1.25rem; }
.site-header .main-nav { margin-left: .5rem; }
.nav-item { position: relative; }
.nav-trigger {
  display: inline-flex; align-items: center; gap: .3rem; padding: .5rem .85rem; border-radius: var(--radius-pill);
  background: none; border: 0; font: inherit; font-weight: 500; font-size: .92rem; color: var(--text); cursor: pointer;
}
.nav-trigger:hover, .nav-item.is-open .nav-trigger { background: var(--surface-2); }
.nav-item.is-open .nav-trigger .icon { transform: rotate(180deg); }
.mega-menu, .dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 70;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-item.is-open > .mega-menu, .nav-item.is-open > .dropdown { visibility: visible; opacity: 1; transform: none; }
.mega-menu { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1rem; padding: 1rem; width: 560px; }
.mega-cats { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; }
.mega-cats a, .dropdown a, .dropdown button {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: 10px; text-decoration: none;
  color: var(--text); font-size: .9rem; background: none; border: 0; font-family: inherit; width: 100%; text-align: left; cursor: pointer;
}
.mega-cats a:hover, .dropdown a:hover, .dropdown button:hover { background: var(--surface-2); color: var(--text); }
.mega-cats span { font-size: 1.2rem; }
.mega-featured { background: var(--surface-3); border-radius: var(--radius-md); padding: .85rem; display: flex; flex-direction: column; gap: .5rem; }
.mega-featured .eyebrow { margin: 0; }
.mega-product { display: flex; gap: .7rem; align-items: center; text-decoration: none; color: var(--text); font-size: .85rem; }
.mega-product img { border-radius: 10px; }
.mega-product > span { display: flex; flex-direction: column; }
.price-sale { color: var(--sale); font-weight: 700; }
.dropdown { left: auto; right: 0; min-width: 230px; padding: .4rem; }
.dropdown-head { display: flex; flex-direction: column; padding: .6rem .7rem .7rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }
.dropdown button[data-testid="header-logout-btn"] { color: var(--danger); border-top: 1px solid var(--border); border-radius: 0 0 10px 10px; margin-top: .3rem; }

.header-search { position: relative; flex: 1; max-width: 420px; margin-left: auto; }
.header-search .input { min-height: 42px; border-radius: var(--radius-pill); padding-left: 2.5rem; padding-right: 2.5rem; background: var(--surface-2); border-color: transparent; }
.header-search .input:focus { background: var(--surface); border-color: var(--text); }
.search-icon { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); display: flex; pointer-events: none; }
.search-kbd { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); font-size: .72rem; border: 1px solid var(--border-strong); background: var(--surface); padding: .05rem .4rem; pointer-events: none; }
.header-search .listbox { top: calc(100% + 6px); }
.opt-label { display: flex; align-items: center; gap: .55rem; }
.opt-icon { font-size: 1.15rem; }

.header-actions { display: flex; align-items: center; gap: .25rem; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--text);
  display: inline-grid; place-items: center; cursor: pointer; text-decoration: none; font-size: 1.1rem;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-count {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill);
  background: var(--primary); color: var(--primary-fg); font-size: .66rem; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--bg);
}
.icon-count[hidden] { display: none !important; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, #ec4899); color: #fff; font-weight: 700; font-size: .85rem;
}
.avatar-sm { width: 28px; height: 28px; font-size: .75rem; }
.avatar-lg { width: 60px; height: 60px; font-size: 1.5rem; }

@media (max-width: 1080px) { .search-kbd { display: none; } .header-search { max-width: 280px; } }
@media (max-width: 760px) {
  .site-header .header-inner { flex-wrap: wrap; height: auto; padding-top: .6rem; padding-bottom: .6rem; gap: .5rem; }
  .site-header .menu-toggle { margin-left: 0; order: 0; }
  .site-header .brand { order: 1; }
  .header-actions { order: 2; margin-left: auto; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .site-header .main-nav { top: 100%; margin-left: 0; }
  .mega-menu { position: static; width: auto; grid-template-columns: 1fr; box-shadow: none; display: none; }
  .nav-item.is-open > .mega-menu { display: grid; }
  .mega-featured { display: none; }
}

/* ---------- Footer v2 ---------- */
.site-footer { padding: 3rem 0 0; }
.footer-grid { display: grid !important; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; align-items: start !important; }
.footer-brand { flex-direction: column; align-items: flex-start; gap: .5rem; max-width: 360px; }
.footer-col { display: flex; flex-direction: column; gap: .45rem; }
.footer-col h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin-bottom: .35rem; }
.footer-col a, .footer-col .link-btn { color: var(--text-muted); text-decoration: none; text-align: left; }
.footer-col a:hover, .footer-col .link-btn:hover { color: var(--text); }
.footer-bottom { margin-top: 2.5rem; padding: 1.1rem 16px !important; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .8rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Cart drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 980; background: rgba(12, 10, 9, .45); backdrop-filter: blur(2px); animation: fade-in .2s ease; }
@keyframes fade-in { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 990; width: min(420px, 100vw);
  background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility .3s;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer:focus { outline: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); }
.drawer-head h2 { margin: 0; font-size: 1.15rem; }
.drawer-shipping { padding: .9rem 1.25rem; background: var(--surface-3); border-bottom: 1px solid var(--border); }
.drawer-shipping p { margin: 0 0 .5rem; }
.drawer-shipping .progress-bar { background: var(--success); transition: width .4s ease; }
.drawer-lines { list-style: none; margin: 0; padding: .5rem 1.25rem; overflow-y: auto; flex: 1; }
.drawer-line { display: grid; grid-template-columns: 64px 1fr auto; gap: .8rem; padding: .9rem 0; border-bottom: 1px solid var(--border); align-items: start; }
.drawer-line img { border-radius: 12px; }
.drawer-line-info { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.drawer-line-name { font-weight: 600; text-decoration: none; font-size: .9rem; }
.drawer-line-info .qty { align-self: flex-start; }
.drawer-line-end { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; }
.drawer-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--text-muted); }
.drawer-empty .emoji { font-size: 3rem; }
.drawer-foot { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .5rem; }
.drawer-foot p { margin: 0; }
.drawer-subtotal { display: flex; justify-content: space-between; font-size: 1.05rem; }
body.has-drawer { overflow: hidden; }

/* ---------- Cookie banner, switches, back to top ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 950; max-width: 760px; margin: 0 auto;
  display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; box-shadow: var(--shadow-lg);
  animation: toast-in .35s ease;
}
.cookie-banner p { margin: .2rem 0 0; }
body.has-cookie-banner .toast-region { bottom: 120px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; cursor: pointer; }
.switch {
  appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--border-strong);
  position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s; margin: 0;
}
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch:checked { background: var(--success); }
.switch:checked::after { transform: translateX(18px); }
.switch:disabled { opacity: .6; cursor: not-allowed; }
.switch:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.back-to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 900; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--primary); color: var(--primary-fg); font-size: 1.2rem; cursor: pointer; box-shadow: var(--shadow-lg);
}
body.has-cookie-banner .back-to-top { bottom: 120px; }

/* ---------- Hero carousel ---------- */
.carousel { position: relative; overflow: hidden; border-radius: 28px; margin-bottom: 2.5rem; }
.carousel-track { display: flex; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.carousel-slide {
  flex: 0 0 100%; min-height: 420px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center;
  padding: clamp(2rem, 5vw, 4rem); padding-bottom: 5rem; gap: 2rem; color: #fff; position: relative; overflow: hidden;
}
.slide-1 { background: radial-gradient(700px 400px at 90% 20%, #6366f1 0%, transparent 60%), radial-gradient(600px 400px at 70% 100%, #ec4899 0%, transparent 55%), #0c0a09; }
.slide-2 { background: radial-gradient(700px 400px at 85% 30%, #f97316 0%, transparent 60%), radial-gradient(500px 400px at 60% 100%, #e11d48 0%, transparent 60%), #1c0a05; }
.slide-3 { background: radial-gradient(700px 400px at 85% 30%, #14b8a6 0%, transparent 60%), radial-gradient(600px 400px at 60% 100%, #4f46e5 0%, transparent 60%), #04131a; }
.carousel-slide h1, .slide-title { font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.9rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800; margin: 0 0 1rem; max-width: 15ch; color: #fff; }
.carousel-slide .eyebrow { color: rgba(255, 255, 255, .7); }
.carousel-slide .hero-sub { color: rgba(255, 255, 255, .78); font-size: 1.05rem; max-width: 46ch; margin-bottom: 1.75rem; }
.carousel-slide .btn-primary { --btn-bg: #fff; --btn-fg: #0c0a09; --btn-border: #fff; }
.carousel-slide .btn-primary:hover:not(:disabled) { background: #e7e5e4; border-color: #e7e5e4; }
.carousel-slide .btn-outline { --btn-border: rgba(255, 255, 255, .6); --btn-fg: #fff; }
.carousel-slide .btn-outline:hover:not(:disabled) { background: #fff; color: #0c0a09; }
.slide-visual { position: relative; height: 300px; }
.float { position: absolute; display: grid; place-items: center; width: 150px; height: 150px; border-radius: 32px; font-size: 4.5rem;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(10px); animation: float 6s ease-in-out infinite; }
.float.f1 { left: 10%; top: 0; }
.float.f2 { right: 4%; top: 30%; width: 180px; height: 180px; font-size: 5.5rem; animation-delay: -2s; }
.float.f3 { left: 30%; bottom: -10px; width: 120px; height: 120px; font-size: 3.6rem; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-14px) rotate(-3deg); } }
.carousel-controls { position: absolute; left: 0; right: 0; bottom: 1.25rem; display: flex; justify-content: center; align-items: center; gap: .6rem; }
.carousel-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.1rem; cursor: pointer; backdrop-filter: blur(6px); }
.carousel-btn:hover { background: rgba(255, 255, 255, .25); }
#carousel-pause { font-size: .7rem; }
.carousel-dots { display: flex; gap: .4rem; }
.carousel-dot { width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .45); cursor: pointer; transition: width .3s, background .3s; }
.carousel-dot[aria-selected="true"] { width: 28px; background: #fff; }
@media (max-width: 760px) {
  .carousel-slide { grid-template-columns: 1fr; min-height: 460px; }
  .slide-visual { display: none; }
}

/* ---------- Deals & scrollers ---------- */
.deal-strip { margin-bottom: 2.5rem; padding: 1.5rem; border-radius: 24px; background: var(--surface-2); }
.deal-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.deal-head .eyebrow { margin-bottom: .25rem; }
.countdown { display: flex; align-items: center; gap: .4rem; }
.cd-box { display: flex; flex-direction: column; align-items: center; min-width: 54px; padding: .35rem .5rem; border-radius: 12px; background: var(--primary); color: var(--primary-fg); }
.cd-box strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cd-box small { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.scroller { position: relative; }
.scroller-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 220px); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: .25rem .1rem 1rem; scrollbar-width: thin; }
.scroller-track > * { scroll-snap-align: start; }
.scroller-btn { position: absolute; top: 38%; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-lg); cursor: pointer; font-size: 1.3rem; color: var(--text); }
.scroller-btn.prev { left: -14px; }
.scroller-btn.next { right: -14px; }
@media (max-width: 600px) { .scroller-btn { display: none; } }
.product-card.is-compact .product-body { gap: .2rem; }
.product-card.is-compact .product-title { font-size: .9rem; }
.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.25rem; }
.recent-section { margin-top: 3rem; }

/* ---------- Catalog v2 ---------- */
.catalog-section { scroll-margin-top: calc(var(--header-h) + 16px); }
.category-tile { gap: .3rem; }
.card-quick-view {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; min-height: 38px; border-radius: var(--radius-pill);
  border: 0; background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--text); font: inherit; font-weight: 600; font-size: .85rem;
  cursor: pointer; box-shadow: var(--shadow); backdrop-filter: blur(6px); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.product-card:hover .card-quick-view, .card-quick-view:focus-visible { opacity: 1; transform: none; }
@media (hover: none) { .card-quick-view { opacity: 1; transform: none; } }
.active-filters { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: 1rem; min-height: 0; }
.active-filters:empty { display: none; }
.filter-pill { display: inline-flex; gap: .35rem; align-items: center; padding: .3rem .75rem; border-radius: var(--radius-pill); border: 0; background: var(--primary); color: var(--primary-fg); font: inherit; font-size: .8rem; font-weight: 500; cursor: pointer; }
.skeleton-card { aspect-ratio: 3 / 4.6; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.product-grid[data-state="loading"] { display: grid; }
.load-more { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-top: 2.5rem; }
.load-more p { margin: 0; }
.load-progress { width: 220px; height: 4px; border: 0; }
.load-progress .progress-bar { transition: width .4s ease; }
.modal-lg { width: min(860px, calc(100vw - 32px)) !important; }
.quick-view { display: grid; grid-template-columns: 1fr 1fr; }
.quick-view > img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.quick-view-info { position: relative; padding: 2rem 1.75rem 1.75rem; display: flex; flex-direction: column; gap: .4rem; }
.quick-view-info h2 { font-size: 1.5rem; margin: 0; }
.qv-close { position: absolute; top: .75rem; right: .9rem; }
@media (max-width: 700px) { .quick-view { grid-template-columns: 1fr; } .quick-view > img { min-height: 0; max-height: 240px; } }

/* ---------- Login v2 ---------- */
.segmented { display: inline-flex; padding: 4px; border-radius: var(--radius-pill); background: var(--surface-2); gap: 2px; }
.segmented [role="tab"] { padding: .5rem 1.1rem; border: 0; border-radius: var(--radius-pill); background: transparent; font: inherit; font-weight: 600; font-size: .88rem; color: var(--text-muted); cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; }
.segmented [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.auth-card .segmented { margin-bottom: 1.5rem; }
.auth-card [role="tabpanel"] h1 { margin-bottom: .25rem; }
.demo-users { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.demo-user { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .6rem .75rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); cursor: pointer; font: inherit; text-align: left; color: var(--text); }
.demo-user:hover { border-color: var(--text); }
.demo-user span { font-size: .75rem; color: var(--text-muted); }
.strength { display: flex; flex-direction: column; gap: .3rem; }
.strength-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.strength-bar span { height: 4px; border-radius: 2px; background: var(--border); transition: background .2s; }
.strength[data-strength="1"] .strength-bar span:nth-child(-n+1) { background: var(--danger); }
.strength[data-strength="2"] .strength-bar span:nth-child(-n+2) { background: var(--warning); }
.strength[data-strength="3"] .strength-bar span:nth-child(-n+3) { background: #65a30d; }
.strength[data-strength="4"] .strength-bar span { background: var(--success); }
.auth-shell { max-width: 520px; }

/* ---------- Product detail v2 ---------- */
.gallery-main { position: relative; cursor: zoom-in; }
.gallery-main img { transition: transform .35s ease; user-select: none; }
.gallery-main.is-zoomed { cursor: zoom-out; }
.gallery-main.is-zoomed img { transform: scale(2); }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--surface) 85%, transparent); box-shadow: var(--shadow); font-size: 1.4rem; cursor: pointer; color: var(--text); opacity: 0; transition: opacity .2s; }
.gallery-arrow.prev { left: 12px; }
.gallery-arrow.next { right: 12px; }
.gallery-main:hover .gallery-arrow, .gallery-arrow:focus-visible { opacity: 1; }
.zoom-hint { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); font-size: .75rem; padding: .25rem .65rem; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--text-muted); pointer-events: none; }
.gallery-main.is-zoomed .zoom-hint { display: none; }
#pdp-rating { text-decoration: none; display: inline-flex; gap: .15rem; margin: .1rem 0 .4rem; }
#pdp-rating span { text-decoration: underline; }
.stock-note.in { color: var(--success); font-weight: 500; }
.option-panel { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem 1.1rem; background: var(--surface-3); }
.option-panel h3 { margin-bottom: .3rem; font-size: .98rem; }
.option-panel .switch-row { padding: 0; }
#custom-fields { margin-top: .9rem; }
.uploader .dropzone { padding: 1.5rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.uploader .upload-list { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.buy-row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.buy-row #pdp-add-to-cart { flex: 1.4; min-width: 160px; }
.buy-row #pdp-buy-now { flex: 1; min-width: 120px; }
.btn-icon-lg { width: 50px; padding: 0; font-size: 1.15rem; }
.share-menu .dropdown { top: calc(100% + 6px); }
.notify-panel { margin-top: 1rem; }
.notify-panel .alert { margin-top: .75rem; }
.perks { list-style: none; padding: 1.25rem 0 0; margin: 1.25rem 0 0; border-top: 1px solid var(--border); display: grid; gap: .5rem; font-size: .88rem; color: var(--text-muted); }
.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; padding: 0; list-style: none; }
.feature-list li { padding: .7rem .9rem; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .9rem; }
.feature-list li::before { content: "✓ "; font-weight: 700; color: var(--success); }
.reviews-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; }
@media (max-width: 700px) { .reviews-layout { grid-template-columns: 1fr; } }
.review-summary { display: flex; flex-direction: column; gap: .4rem; }
.review-avg { margin: 0; font-size: 2.6rem; letter-spacing: -0.04em; }
.review-avg strong { font-weight: 800; }
.review-bar { display: grid; grid-template-columns: 26px 1fr 18px; gap: .5rem; align-items: center; font-size: .8rem; }
.review-bar .progress { height: 6px; border: 0; }
.review-scroll { max-height: 360px; overflow-y: auto; padding-right: .5rem; }
.review-head .badge { font-size: .62rem; }
.tabpanel { max-width: none; }
.recommendations { margin-top: 3rem; }
.loading-inline { display: flex; align-items: center; gap: .6rem; color: var(--text-muted); padding: 2rem 0; }

/* ---------- Checkout v2 ---------- */
.stepper { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; flex-wrap: wrap; }
.stepper li { display: flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 600; color: var(--text-muted); }
.stepper li + li::before { content: ""; width: 32px; height: 2px; background: var(--border-strong); margin-right: .5rem; }
.stepper li > span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); font-size: .75rem; }
.stepper li.is-done { color: var(--text); }
.stepper li.is-done > span { background: var(--success); border-color: var(--success); color: #fff; }
.stepper li.is-current { color: var(--text); }
.stepper li.is-current > span { border-color: var(--text); background: var(--text); color: var(--bg); }
.radio-cards.two-up { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.cart-item-variant { margin: .1rem 0 0; }
.terms-scroll { max-height: 260px; overflow-y: auto; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-3); font-size: .88rem; }
.terms-scroll h3 { font-size: .92rem; margin: 1rem 0 .3rem; }
.terms-scroll h3:first-child { margin-top: 0; }
.success-hero .alert { justify-content: center; max-width: 560px; margin: 1rem auto; }

/* ---------- Account ---------- */
.account-hero { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding: 1.75rem; border-radius: 24px; background: var(--surface-2); margin-bottom: 1.5rem; }
.account-hero h1 { font-size: 1.9rem; }
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(90px, 1fr)); gap: .75rem; }
@media (max-width: 700px) { .stat-row { grid-template-columns: repeat(2, 1fr); width: 100%; } }
.stat { display: flex; flex-direction: column; padding: .8rem 1rem; border-radius: var(--radius-md); background: var(--surface); }
.stat strong { font-size: 1.35rem; letter-spacing: -0.02em; }
.stat span { font-size: .78rem; color: var(--text-muted); }
.account-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .account-layout { grid-template-columns: minmax(0, 1fr); } }
.side-tabs { display: flex; flex-direction: column; gap: .25rem; position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 860px) { .side-tabs { flex-direction: row; overflow-x: auto; position: static; } }
.side-tabs [role="tab"] { text-align: left; padding: .7rem 1rem; border-radius: var(--radius-md); border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.side-tabs [role="tab"]:hover { background: var(--surface-2); color: var(--text); }
.side-tabs [role="tab"][aria-selected="true"] { background: var(--primary); color: var(--primary-fg); }
.thumb-stack { display: inline-flex; vertical-align: middle; }
.thumb-stack img { border-radius: 8px; border: 2px solid var(--surface); margin-left: -8px; }
.thumb-stack img:first-child { margin-left: 0; }
.strong-link { font-weight: 600; }
.table-empty { text-align: center; padding: 2.5rem 1rem !important; color: var(--text-muted); white-space: normal !important; }
.table-empty-inner { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.table-empty-inner .emoji { font-size: 2rem; }
.table-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .9rem; }
.table-footer p { margin: 0; }
.table-footer .pagination { margin: 0; }
.pagination .btn.is-current { --btn-bg: var(--primary); --btn-fg: var(--primary-fg); --btn-border: var(--primary); }
.select-sm { min-height: 36px !important; width: auto; padding-top: .3rem; padding-bottom: .3rem; }
.input-sm { min-height: 34px !important; width: 96px !important; padding: .3rem .5rem !important; }
.wishlist-board { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 1rem; align-items: start; }
@media (max-width: 760px) { .wishlist-board { grid-template-columns: 1fr; } }
.wishlist-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; min-height: 60px; border-radius: var(--radius-md); }
.wishlist-item { display: grid; grid-template-columns: auto auto 56px minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.wishlist-item img { border-radius: 10px; }
.wishlist-info { display: flex; flex-direction: column; min-width: 0; }
.wishlist-info a { font-weight: 600; text-decoration: none; }
.rank { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: .75rem; font-weight: 700; }
@media (max-width: 600px) { .wishlist-item { grid-template-columns: auto 48px minmax(0, 1fr); } .wishlist-item .rank { display: none; } .wishlist-item .row-actions { grid-column: 1 / -1; } }
.cart-dropzone { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; min-height: 200px; padding: 1rem; text-align: center; border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-3); transition: background .2s, border-color .2s, transform .2s; }
.cart-dropzone .dz-bag { font-size: 2.5rem; }
.cart-dropzone.is-drop-target { transform: scale(1.03); border-color: var(--success); }
.cart-dropzone.is-success { border-color: var(--success); background: var(--success-soft); }
.plain-fieldset { border: 0; padding: 0; margin: 0; }
.plain-fieldset legend { padding: 0; margin-bottom: .4rem; }
.return-items-list { display: grid; gap: .5rem; }
.return-item { align-items: center; padding: .55rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.return-item img { border-radius: 8px; }
.return-item:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.returns-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.return-card { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-md); }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; padding: 1rem 1.1rem; border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); border-radius: var(--radius-md); background: var(--danger-soft); }

/* ---------- Order details ---------- */
.order-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.order-head h1 { margin: .1rem 0 .25rem; font-size: 1.7rem; }
.timeline { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; }
.timeline li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; position: relative; font-size: .88rem; color: var(--text-muted); }
.timeline li::before { content: ""; position: absolute; top: 17px; left: -50%; right: 50%; height: 3px; background: var(--border); z-index: 0; }
.timeline li:first-child::before { display: none; }
.timeline li.is-done::before, .timeline li.is-current::before { background: var(--success); }
.timeline .dot { position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 3px solid var(--border); font-weight: 700; color: var(--text-muted); }
.timeline li.is-done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.timeline li.is-current .dot { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); box-shadow: 0 0 0 6px color-mix(in srgb, var(--text) 12%, transparent); }
.timeline li.is-done strong, .timeline li.is-current strong { color: var(--text); }
.timeline li[data-step="cancelled"].is-current .dot, .timeline li[data-step="return_rejected"].is-current .dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
@media (max-width: 960px) { .order-layout { grid-template-columns: minmax(0, 1fr); } }
.order-layout > .stack > .panel + .panel { margin-top: 0; }
.order-items { list-style: none; padding: 0; margin: 0; }
.order-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: .9rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.order-item:last-child { border-bottom: 0; }
.order-item img { border-radius: 12px; }
.order-item a { font-weight: 600; text-decoration: none; }
.summary-panel { background: var(--surface-3); }
.panel h2 { font-size: 1.1rem; }

/* ---------- Admin ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pill-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--sale); color: #fff; font-size: .68rem; display: inline-grid; place-items: center; }
.pill-count:empty { display: none; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
@media (max-width: 1000px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { display: flex; flex-direction: column; gap: .2rem; padding: 1.15rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.kpi-label { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.kpi-value { font-size: 1.8rem; letter-spacing: -0.03em; }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dash-grid .panel + .panel { margin-top: 0; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }
.bar-chart { display: grid; gap: .55rem; }
.bar-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 28px; gap: .6rem; align-items: center; font-size: .85rem; }
.bar-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--text); transition: width .5s ease; }
.bar-fill.status-processing { background: var(--info); }
.bar-fill.status-shipped { background: #6366f1; }
.bar-fill.status-delivered, .bar-fill.status-returned { background: var(--success); }
.bar-fill.status-cancelled, .bar-fill.status-return_rejected { background: var(--danger); }
.bar-fill.status-return_requested { background: var(--warning); }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.mini-list li { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.mini-list li:last-child { border-bottom: 0; }
.mini-list li > span:first-of-type { flex: 1; }
.mini-list img { border-radius: 8px; }
.cell-product { display: flex; gap: .7rem; align-items: center; }
.cell-product img { border-radius: 8px; }
.data-table td { vertical-align: middle; }
#admin-panel-products .panel-title, #admin-panel-orders .panel-title { flex-wrap: wrap; }
