/* =============================================================================
   CARTILIO DESIGN SYSTEM
   One stylesheet shared by the storefront and all three dashboards.
   Sections: 1 Tokens · 2 Base · 3 Controls · 4 Header · 5 Hero · 6 Sections
            7 Cards · 8 Filters · 9 Footer · 10 Drawers · 11 Modals & forms
            12 Checkout & account · 13 Product detail · 14 Toasts
            15 Dashboards · 16 Responsive
   ============================================================================= */

/* 1 ── TOKENS ─────────────────────────────────────────────────────────────── */
:root {
  /* colour */
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --text-hi: #101828;
  --text-mid: #475467;
  --text-low: #667085;
  --ink: #0f1b2d;

  --brand: #0f6b5c;
  --brand-hover: #0b5549;
  --brand-soft: #e5f3f0;
  --brand-line: #b6dcd4;

  --accent: #e8890c;
  --accent-soft: #fff1d9;
  --danger: #c0352b;
  --danger-soft: #fdecea;
  --success: #17803d;
  --success-soft: #e6f5ea;
  --info: #1d5fc4;
  --info-soft: #e8f0fc;
  --warn-soft: #fff4dc;
  --warn: #9a5b00;

  /* category counters (identity colours, used sparingly) */
  --c-wear: #6d5bd0;
  --c-tech: #0e7c86;
  --c-home: #b7791f;
  --c-care: #be3b6b;
  --c-pantry: #4d7c0f;
  --c-study: #2563eb;
  --c-life: #c2570c;

  /* shape & depth */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --sh-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --sh-md: 0 8px 24px -8px rgba(16, 24, 40, .16);
  --sh-lg: 0 24px 60px -16px rgba(16, 24, 40, .28);

  /* layout */
  --gutter: 16px;
  --container: 1240px;
  --header-h: 124px;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
}

/* 2 ── BASE ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  min-height: 100vh; background: var(--bg); color: var(--text-hi);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  font-feature-settings: 'cv11', 'ss03';
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
button:disabled { cursor: not-allowed; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.price, .o-total, .sc-value, td.num, .num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

h1, h2, h3, h4 { letter-spacing: -0.015em; line-height: 1.2; font-weight: 700; }

/* 3 ── CONTROLS ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-hi);
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: #b9c0cc; }
.btn:disabled { opacity: .5; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-ghost { background: var(--surface); }
.btn-danger { color: var(--danger); border-color: #f2c4bf; background: var(--surface); }
.btn-danger:hover:not(:disabled) { background: var(--danger-soft); border-color: #eba39b; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-block + .btn-block { margin-top: 10px; }
.btn svg { flex: none; }

.close-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%; color: var(--text-mid); font-size: 15px;
  background: var(--surface-2); border: 1px solid var(--line); transition: background .15s;
}
.close-btn:hover { background: var(--line); color: var(--text-hi); }

.field { margin-bottom: 16px; min-width: 0; }
.field label, label.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--text-mid); margin-bottom: 6px; }
.field input, .field select, .field textarea, .search-box, .filter-row select, .sort-bar select,
.deliver-pop input, .coupon-row input, .newsletter input, .nav-search input {
  width: 100%; height: 42px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line-strong); font-size: 14px; color: var(--text-hi);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 88px; padding: 10px 14px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder, .search-box::placeholder { color: #98a2b3; }
.field input:focus, .field select:focus, .field textarea:focus, .search-box:focus,
.filter-row select:focus, .sort-bar select:focus, .deliver-pop input:focus, .coupon-row input:focus,
.newsletter input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { min-height: 0; color: var(--danger); font-size: 13px; font-weight: 500; margin: -4px 0 12px; }
.form-error:empty { display: none; }
.help-text { font-size: 13px; color: var(--text-low); }

.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text-mid); border: 1px solid var(--line); }
.badge-green { background: var(--success-soft); color: var(--success); border-color: #bfe3c9; }
.badge-amber { background: var(--warn-soft); color: var(--warn); border-color: #f3dca8; }
.badge-red   { background: var(--danger-soft); color: var(--danger); border-color: #f2c4bf; }
.badge-blue  { background: var(--info-soft); color: var(--info); border-color: #c4d7f5; }
.badge-grey  { background: var(--surface-2); color: var(--text-mid); }

.empty-mini { text-align: center; padding: 32px 16px; color: var(--text-low); font-size: 14px; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 56px 16px; color: var(--text-mid); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty-icon { margin: 0 auto 14px; opacity: .45; }

/* 4 ── HEADER ─────────────────────────────────────────────────────────────── */
.header { position: sticky; top: 0; z-index: 60; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row1 { display: flex; align-items: center; gap: 16px; height: 72px; }
.header-row2 { display: flex; align-items: center; gap: 4px; height: 44px; border-top: 1px solid var(--line); font-size: 14px; overflow-x: auto; scrollbar-width: none; }
.header-row2::-webkit-scrollbar { display: none; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; letter-spacing: -0.03em; color: var(--ink); flex: none; }
.logo .dot { width: 14px; height: 14px; border-radius: 4px; background: var(--brand); transform: rotate(45deg); box-shadow: 5px 5px 0 -1px var(--accent); }
.hamburger-btn { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); flex: none; }
.all-cats-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line-strong); font-weight: 600; font-size: 14px; flex: none; }
.all-cats-btn:hover { background: var(--line); }
.nav-search { position: relative; flex: 1; min-width: 0; }
.nav-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--text-low); pointer-events: none; }
.nav-search input { padding-left: 42px; height: 44px; background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.header-iconbtn, .cart-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; color: var(--text-hi); white-space: nowrap; transition: background .15s; }
.header-iconbtn:hover { background: var(--surface-2); }
.cart-btn { position: relative; background: var(--brand); color: #fff; padding: 0 16px; }
.cart-btn:hover { background: var(--brand-hover); }
.cart-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; }
.row2-link { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 6px; font-weight: 500; color: var(--text-mid); white-space: nowrap; }
a.row2-link:hover, button.row2-link:hover { background: var(--surface-2); color: var(--text-hi); }
.row2-lead { color: var(--text-hi); font-weight: 600; }
.row2-muted { margin-left: auto; color: var(--brand); font-weight: 600; font-size: 13px; }

.deliver-wrap, .account-menu-wrap { position: relative; }
.deliver-pop, .account-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 80;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-md);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.deliver-pop.open, .account-dropdown.open { opacity: 1; visibility: visible; transform: none; }
.deliver-pop { width: 320px; padding: 16px; }
.deliver-pop label { display: block; font-size: 13px; font-weight: 600; color: var(--text-mid); margin: 14px 0 6px; }
.deliver-pop-row { display: flex; gap: 8px; }
.deliver-pop-row .btn { flex: none; }
.deliver-pop-detect { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--brand); font-weight: 600; font-size: 14px; }
.deliver-pop-detect.busy { opacity: .6; pointer-events: none; }
.account-dropdown { width: 248px; padding: 8px; }
.acc-hello { padding: 8px 10px 10px; font-size: 13px; color: var(--text-low); word-break: break-all; }
.acc-hello b { display: block; font-size: 15px; color: var(--text-hi); }
.acc-divider { height: 1px; background: var(--line); margin: 6px 0; }
.acc-item { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 6px; font-size: 14px; color: var(--text-mid); font-weight: 500; }
.acc-item:hover { background: var(--surface-2); color: var(--text-hi); }

/* 5 ── HERO ───────────────────────────────────────────────────────────────── */
.hero { padding: 48px 0 56px; background: linear-gradient(180deg, var(--brand-soft) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--brand-line); color: var(--brand); font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.eyebrow .n { font-weight: 800; }
.headline { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.08; color: var(--ink); margin-bottom: 18px; }
.headline em { font-style: normal; color: var(--brand); }
.hero .sub { font-size: 17px; line-height: 1.6; color: var(--text-mid); max-width: 520px; margin-bottom: 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.hero-ctas .btn { height: 48px; padding: 0 24px; font-size: 15px; }
.hero-stats { display: flex; gap: 40px; padding-top: 24px; border-top: 1px solid var(--brand-line); }
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1.1; }
.stat span { font-size: 13px; color: var(--text-low); }
.shard-stage { display: grid; gap: 14px; max-width: 420px; margin-left: auto; width: 100%; }
.shard { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto auto; column-gap: 16px; align-items: center; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-md); transition: transform .25s ease-out; }
.shard .icon-well { grid-row: 1 / span 3; width: 56px; height: 56px; }
.shard .s-group { font-size: 12px; font-weight: 700; }
.shard .s-name { font-size: 16px; font-weight: 700; }
.shard .s-meta { font-size: 13px; color: var(--text-low); }
.shard-b { margin-left: 28px; }
.shard-c { margin-left: 56px; }

/* 6 ── SECTIONS ───────────────────────────────────────────────────────────── */
section { padding-block: 40px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(22px, 2.6vw, 28px); }
.section-head p { color: var(--text-low); font-size: 14px; max-width: 460px; }
.section-tag { display: none; }
.hero, .grid-section, .trending-cats-section, .trending-prods-section, .deals-section, .groups { padding-block: 40px; }
.hero { padding-block: 48px 56px; }
.deals-section { background: var(--surface); border-block: 1px solid var(--line); }
.trending-prods-section + .deals-section { margin-top: 8px; }

.carousel-wrap { position: relative; }
.trend-cats-row, .trend-prod-row, .related-row { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 12px; scrollbar-width: none; }
.trend-cats-row::-webkit-scrollbar, .trend-prod-row::-webkit-scrollbar, .related-row::-webkit-scrollbar { display: none; }
.trend-prod-row > .card-carousel, .related-row > .card-carousel { flex: 0 0 236px; scroll-snap-align: start; display: flex; }
.card-carousel > .card { width: 100%; }
.carousel-arrow { position: absolute; top: 45%; z-index: 5; display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--sh-md); }
.carousel-arrow.left { left: -18px; } .carousel-arrow.right { right: -18px; }
.carousel-wrap.has-overflow .carousel-arrow { display: flex; }
.carousel-arrow.at-edge { opacity: 0; pointer-events: none; }
.carousel-arrow:hover { background: var(--surface-2); }

.trend-cat-card { flex: 0 0 200px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 18px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color .15s, box-shadow .15s; }
.trend-cat-card:hover { border-color: var(--brand-line); box-shadow: var(--sh-md); }
.trend-cat-card .icon-well { margin-bottom: 10px; }
.tc-name { font-weight: 600; font-size: 15px; line-height: 1.3; min-height: 40px; }
.tc-group { font-size: 13px; color: var(--text-low); }
.trend-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 600; }
.trend-badge svg { width: 14px; height: 14px; }

/* 7 ── CARDS ──────────────────────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--line-strong); box-shadow: var(--sh-md); }
.card-top { position: relative; margin-bottom: 12px; }
.icon-well { --glow: var(--brand); display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--r-md); background: color-mix(in srgb, var(--glow) 10%, #fff); border: 1px solid color-mix(in srgb, var(--glow) 20%, #fff); flex: none; }
.card .icon-well { width: 100%; height: 148px; border-radius: var(--r-sm); }
.card .icon-well svg { width: 52px; height: 52px; }
.icon-well.media-well { padding: 0; overflow: hidden; background: var(--surface-2); }
.icon-well.media-well img { width: 100%; height: 100%; object-fit: cover; }
.group-tag { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--tag); background: #fff; border: 1px solid color-mix(in srgb, var(--tag) 35%, #fff); }
.wish-btn { position: absolute; top: 22px; right: 22px; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--text-low); box-shadow: var(--sh-sm); }
.wish-btn:hover { color: var(--danger); }
.wish-btn.active { color: var(--danger); }
.wish-btn svg { width: 16px; height: 16px; }
.trend-ribbon, .deal-badge { position: absolute; top: 22px; left: 22px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.trend-ribbon { background: var(--ink); color: #fff; }
.trend-ribbon svg { width: 12px; height: 12px; }
.deal-badge { background: var(--accent); color: #fff; }
.cat-name { font-size: 12px; color: var(--text-low); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-name { font-size: 15px; font-weight: 600; line-height: 1.35; min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px; }
.stars { display: inline-flex; gap: 2px; color: var(--accent); }
.stars svg { width: 14px; height: 14px; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 14px; flex-wrap: wrap; }
.price { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.price-old { font-size: 13px; color: var(--text-low); text-decoration: line-through; }
.card-action { margin-top: auto; }
.add-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 40px; border-radius: var(--r-sm); background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand); font-size: 14px; font-weight: 600; transition: background .15s, color .15s; }
.add-btn:hover:not(:disabled) { background: var(--brand); border-color: var(--brand); color: #fff; }
.add-btn:disabled { background: var(--surface-2); border-color: var(--line); color: var(--text-low); }
.qty-row { display: flex; align-items: center; justify-content: space-between; height: 40px; border: 1px solid var(--brand-line); border-radius: var(--r-sm); background: var(--brand-soft); overflow: hidden; }
.qty-row button { width: 44px; height: 100%; font-size: 18px; font-weight: 600; color: var(--brand); }
.qty-row button:hover { background: var(--brand-line); }
.qty-row span { font-weight: 700; font-variant-numeric: tabular-nums; }
.card.is-soldout .icon-well { opacity: .55; }

/* Deals: always fill complete rows (6 items → 6, 3 or 2 columns) */
.deals-section .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1180px) { .deals-section .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .deals-section .card { padding: 12px; } .deals-section .card .icon-well { height: 124px; } }
@media (max-width: 640px) { .deals-section .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 8 ── FILTERS & CATALOG ──────────────────────────────────────────────────── */
.group-row, .cat-row { display: flex; flex-wrap: wrap; gap: 8px; }
.group-row { margin-bottom: 14px; }
.cat-row { margin-bottom: 10px; }
.group-chip, .cat-chip, .price-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text-mid); background: var(--surface); border: 1px solid var(--line-strong);
  transition: background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.group-chip:hover, .cat-chip:hover, .price-chip:hover { border-color: #98a2b3; color: var(--text-hi); }
.group-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gc, var(--text-low)); }
.group-chip .dot-all { background: var(--text-low); }
.group-chip.active, .cat-chip.active, .price-chip.active { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.group-chip.active .dot { box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.cat-chip { height: 34px; font-size: 13px; padding: 0 12px; }
.cat-chip.soon { color: var(--text-low); background: var(--surface-2); border-style: dashed; }
.soon-tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--text-mid); }
.sub-row { padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; margin-bottom: 14px; color: var(--text-low); }
.breadcrumb:empty { display: none; }
.bc-link { color: var(--brand); font-weight: 500; } .bc-link:hover { text-decoration: underline; }
.bc-current { color: var(--text-hi); font-weight: 600; }
.sort-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding: 12px 16px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.sort-bar-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sort-bar-group label { font-size: 14px; font-weight: 600; color: var(--text-mid); }
.sort-bar select { width: auto; min-width: 200px; height: 38px; }
.price-chip { height: 34px; font-size: 13px; padding: 0 12px; }

/* 9 ── FOOTER ─────────────────────────────────────────────────────────────── */
footer { padding: 24px 0 32px; }
.foot-panel { background: var(--ink); color: #cbd5e1; border-radius: var(--r-lg); padding: 40px 32px 20px; }
.foot-top { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 32px; }
.foot-brand .logo { color: #fff; margin-bottom: 14px; }
.foot-brand p { font-size: 14px; line-height: 1.6; color: #94a3b8; max-width: 320px; margin-bottom: 18px; }
.newsletter { display: flex; gap: 8px; max-width: 340px; }
.newsletter input { background: #1b2a41; border-color: #2c3e5a; color: #fff; }
.newsletter input::placeholder { color: #8094b1; }
.newsletter button { flex: none; height: 42px; padding: 0 16px; border-radius: var(--r-sm); background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; }
.foot-panel .form-error { color: #fda29b; max-width: 340px; }
.foot-col h4 { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.foot-col a { display: block; font-size: 14px; color: #94a3b8; padding: 4px 0; }
.foot-col a:hover { color: #fff; }
.foot-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid #25364f; font-size: 13px; color: #8094b1; }

/* 10 ── DRAWERS & OVERLAYS ────────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(16, 24, 40, .5); opacity: 0; pointer-events: none; transition: opacity .2s; }
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer, .cat-drawer, .mobile-menu-drawer {
  position: fixed; top: 0; bottom: 0; z-index: 95; display: flex; flex-direction: column;
  width: min(400px, 100vw); background: var(--surface); box-shadow: none;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.drawer { right: 0; transform: translateX(100%); }
.cat-drawer, .mobile-menu-drawer { left: 0; transform: translateX(-100%); width: min(340px, 90vw); }
.drawer.open, .cat-drawer.open, .mobile-menu-drawer.open { transform: none; box-shadow: var(--sh-lg); }
.mobile-menu-drawer { z-index: 96; padding: 20px; }
.cat-drawer { padding: 20px; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.drawer .drawer-head { padding: 20px 20px 16px; margin: 0; }
.drawer-head h3 { font-size: 18px; }
.drawer-items { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.drawer-item .icon-well { width: 56px; height: 56px; }
.drawer-item .icon-well svg { width: 24px; height: 24px; }
.di-info .n { font-size: 14px; font-weight: 600; line-height: 1.35; }
.di-size { color: var(--text-low); font-weight: 500; }
.di-info .p { font-size: 13px; color: var(--text-low); margin-top: 2px; font-variant-numeric: tabular-nums; }
.di-actions { display: flex; align-items: center; gap: 6px; }
.di-actions button { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line-strong); font-size: 15px; font-weight: 600; background: var(--surface); }
.di-actions button:hover { background: var(--surface-2); }
.di-actions .di-remove { border-color: transparent; color: var(--text-low); font-size: 13px; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.subtotal-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; font-size: 15px; }
.subtotal-row b { font-size: 20px; font-variant-numeric: tabular-nums; }
.drawer-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 64px 16px; color: var(--text-low); }
.drawer-empty-icon { opacity: .45; }
.cat-drawer-body { flex: 1; overflow-y: auto; }
.cd-group { margin-bottom: 20px; }
.cd-group-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--gc); margin-bottom: 6px; }
.cd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gc); }
.cd-cat-link { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; padding: 9px 10px; border-radius: 6px; font-size: 14px; color: var(--text-mid); }
.cd-cat-link:hover { background: var(--surface-2); color: var(--text-hi); }
.cd-cat-link.soon { color: var(--text-low); opacity: .7; }
.mobile-menu-link { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 10px; border-radius: var(--r-sm); font-size: 15px; font-weight: 500; color: var(--text-hi); }
.mobile-menu-link:hover { background: var(--surface-2); }
.mobile-menu-divider { height: 1px; background: var(--line); margin: 8px 0; }
.mobile-menu-note { margin-top: auto; padding: 12px; border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 600; }

/* 11 ── MODALS & FORMS ────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(16, 24, 40, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-panel { position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 24px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-lg); transform: translateY(12px) scale(.985); transition: transform .22s ease-out; }
.modal-overlay.show .modal-panel { transform: none; }
.modal-panel.wide { max-width: 880px; }
.modal-panel.xl { max-width: 980px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-head h3 { font-size: 20px; }
.modal-sub { color: var(--text-mid); font-size: 14px; margin: -8px 0 18px; }
.tab-switch, .role-select, .pay-tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 18px; }
.tab-switch button, .role-opt, .pay-tab { flex: 1; height: 36px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--text-mid); }
.tab-switch button.active, .role-opt.active, .pay-tab.active { background: var(--surface); color: var(--brand); box-shadow: var(--sh-sm); }
.pay-tabs { flex-wrap: wrap; }
.pay-tab { min-width: 120px; }
.auth-success { text-align: center; padding: 8px 0 4px; }
.auth-success-lead { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.auth-success-note { font-size: 14px; color: var(--text-low); margin-bottom: 22px; }
.confirm-icon { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; background: var(--success-soft); color: var(--success); }
.confirm-icon svg { width: 30px; height: 30px; }

/* 12 ── CHECKOUT & ACCOUNT ────────────────────────────────────────────────── */
.stepper { display: flex; align-items: center; margin-bottom: 22px; }
.step { display: flex; align-items: center; gap: 8px; color: var(--text-low); font-size: 13px; font-weight: 600; }
.s-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line-strong); font-size: 13px; }
.step.active { color: var(--text-hi); } .step.active .s-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.step.done { color: var(--brand); } .step.done .s-num { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.step-line { flex: 1; height: 2px; min-width: 16px; margin: 0 10px; background: var(--line); }
.addr-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer; }
.addr-card.selected { border-color: var(--brand); background: var(--brand-soft); }
.addr-card input[type=radio] { margin-top: 4px; accent-color: var(--brand); }
.a-body { flex: 1; min-width: 0; }
.a-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.a-detail { font-size: 13px; color: var(--text-mid); line-height: 1.55; }
.addr-remove { color: var(--text-low); width: 28px; height: 28px; border-radius: 6px; } .addr-remove:hover { background: var(--danger-soft); color: var(--danger); }
.addr-form { display: none; margin-top: 16px; }
.add-addr-btn { margin: 4px 0 14px; }
.checkout-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.review-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.review-row .r-label { color: var(--text-mid); }
.review-row.total { font-weight: 700; font-size: 17px; border-bottom: 0; }
.review-row.discount { color: var(--success); }
.coupon-row { display: flex; gap: 10px; margin: 16px 0 6px; }
.confirm-wrap { text-align: center; padding: 8px 0; }
.confirm-wrap h3 { font-size: 22px; margin-bottom: 6px; }
.confirm-wrap p { color: var(--text-mid); margin-bottom: 20px; }
.confirm-meta { display: grid; gap: 8px; text-align: left; padding: 16px; margin-bottom: 20px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 14px; }
.confirm-meta span { display: flex; justify-content: space-between; gap: 16px; color: var(--text-mid); }
.confirm-meta b { color: var(--text-hi); text-align: right; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.acc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; background: var(--surface); }
.acc-tabs::-webkit-scrollbar { display: none; }
.acc-tab { flex: none; padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--text-low); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.acc-tab:hover { color: var(--text-hi); }
.acc-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
#pdTabs { position: sticky; top: -24px; z-index: 3; margin-top: 28px; padding-top: 4px; }
.order-card { padding: 16px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.o-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-low); font-weight: 600; margin-bottom: 8px; }
.o-items { font-size: 14px; line-height: 1.6; margin-bottom: 8px; }
.o-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.order-status { font-size: 13px; font-weight: 600; color: var(--brand); }
.o-total { font-weight: 700; }
.order-terminal { font-size: 13px; font-weight: 600; color: var(--danger); margin-top: 6px; }
.order-tracker { display: flex; align-items: flex-start; margin: 14px 0 4px; overflow-x: auto; padding-bottom: 4px; }
.ot-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; width: 68px; text-align: center; }
.ot-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); }
.ot-step.done .ot-dot { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.ot-label { font-size: 11px; line-height: 1.25; color: var(--text-low); }
.ot-step.done .ot-label { color: var(--text-hi); font-weight: 600; }
.ot-line { flex: 1; min-width: 12px; height: 2px; margin-top: 5px; background: var(--line-strong); }
.ot-line.done { background: var(--brand); }
.delivery-card { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 12px 14px; background: var(--info-soft); border: 1px solid #c4d7f5; border-radius: var(--r-md); }
.dc-icon { width: 40px; height: 40px; color: var(--info); flex: none; } .dc-icon svg { width: 100%; height: 100%; }
.dc-name { font-weight: 600; font-size: 14px; } .dc-tracking { font-size: 13px; color: var(--text-mid); font-variant-numeric: tabular-nums; }

/* 13 ── PRODUCT DETAIL ────────────────────────────────────────────────────── */
.pd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
.pd-media { --glow: var(--brand); display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border-radius: var(--r-lg); overflow: hidden; background: color-mix(in srgb, var(--glow) 8%, #fff); border: 1px solid var(--line); }
.pd-media img { width: 100%; height: 100%; object-fit: cover; }
.pd-media svg { width: 96px; height: 96px; }
.pd-eyebrow { font-size: 13px; color: var(--text-low); margin-bottom: 6px; }
.pd-title { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 12px; }
.pd-rating-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pd-rating-text { font-size: 13px; color: var(--text-low); }
.pd-price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pd-price { font-size: 28px; }
.pd-deal { font-size: 13px; font-weight: 700; color: var(--success); }
.pd-desc { font-size: 14px; color: var(--text-mid); line-height: 1.65; margin-bottom: 18px; }
.pd-action { max-width: 280px; margin-bottom: 16px; }
.pd-delivery { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-mid); }
.pd-delivery svg { color: var(--success); flex: none; }
.size-section { margin-bottom: 4px; }
.size-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.size-label { font-size: 14px; font-weight: 600; }
.size-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.size-chip { min-width: 48px; height: 40px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; font-weight: 600; }
.size-chip:hover:not(:disabled) { border-color: var(--ink); }
.size-chip-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.size-chip-oos { color: #98a2b3; background: var(--surface-2); text-decoration: line-through; }
.size-hint { font-size: 13px; color: var(--danger); font-weight: 500; margin-bottom: 12px; }
.pd-sections { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.pd-grid > *, .pd-info { min-width: 0; }
.pd-section { padding: 0; scroll-margin-top: 64px; }
.overview-text { font-size: 15px; color: var(--text-mid); line-height: 1.7; }
.rating-summary { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding: 18px 20px; margin-bottom: 8px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.rating-big { font-size: 36px; font-weight: 800; line-height: 1; }
.rating-sub { font-size: 13px; color: var(--text-low); margin-top: 6px; }
.review-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.review-item-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.review-name { font-weight: 600; font-size: 14px; } .review-date { font-size: 13px; color: var(--text-low); }
.review-text { font-size: 14px; color: var(--text-mid); margin-top: 6px; }
.sg-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(16, 24, 40, .55); }
.sg-panel { width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; padding: 24px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-lg); }
.sg-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sg-title { font-size: 18px; } .sg-sub { font-size: 13px; color: var(--text-low); margin-top: 4px; }
.sg-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sg-table th { padding: 10px 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--text-low); border-bottom: 2px solid var(--line-strong); }
.sg-table td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); }
.sg-note { margin-top: 18px; padding: 14px; border-radius: var(--r-md); background: var(--brand-soft); border: 1px solid var(--brand-line); font-size: 13px; color: var(--text-mid); line-height: 1.55; }
.sg-note b { display: block; color: var(--brand); margin-bottom: 2px; }

/* 14 ── TOASTS ────────────────────────────────────────────────────────────── */
.toast-stack { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; align-items: center; gap: 8px; width: calc(100% - 32px); max-width: 420px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; border-radius: var(--r-md); background: var(--ink); color: #fff; font-size: 14px; font-weight: 500; box-shadow: var(--sh-lg); animation: toast-in .22s ease-out; }
.toast svg { width: 18px; height: 18px; flex: none; color: #6ee7b7; }
.toast-error svg { color: #fda29b; } .toast-info svg { color: #93c5fd; }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 15 ── DASHBOARDS ────────────────────────────────────────────────────────── */
.dash-shell { display: flex; min-height: 100vh; background: var(--bg); }
.dash-sidebar { position: sticky; top: 0; flex: none; display: flex; flex-direction: column; width: 248px; height: 100vh; padding: 20px 14px; overflow-y: auto; background: var(--ink); color: #cbd5e1; }
.dash-logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; color: #fff; }
.dash-logo .dot { width: 13px; height: 13px; border-radius: 4px; background: var(--brand); transform: rotate(45deg); box-shadow: 5px 5px 0 -1px var(--accent); background: #2bb59d; }
.dash-logo-sub { padding: 2px 10px 24px; font-size: 13px; color: #8094b1; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.dash-nav-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; padding: 0 12px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500; color: #b4c0d4; text-align: left; transition: background .15s, color .15s; }
.dash-nav-item svg { width: 18px; height: 18px; flex: none; }
.dash-nav-item:hover { background: #1b2a41; color: #fff; }
.dash-nav-item.active { background: var(--brand); color: #fff; }
.dash-back { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: var(--r-sm); font-size: 14px; color: #8094b1; }
.dash-back:hover { background: #1b2a41; color: #fff; }
.dash-main { flex: 1; min-width: 0; }
.dash-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 32px; background: var(--surface); border-bottom: 1px solid var(--line); }
.dash-topbar h1 { font-size: 20px; flex: 1; }
.dash-hamburger { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); flex: none; }
.dash-sidebar-overlay { position: fixed; inset: 0; z-index: 45; background: rgba(16, 24, 40, .5); opacity: 0; pointer-events: none; transition: opacity .2s; }
.dash-sidebar-overlay.open { opacity: 1; pointer-events: auto; }
.store-chip, .admin-chip, .user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.store-chip span, .admin-chip span, .user-chip .u-meta span { display: block; }
.store-avatar, .admin-avatar, .user-avatar { display: flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; }
.st-name, .ad-name, .u-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.st-status { font-size: 12px; color: var(--success); font-weight: 500; }
.ad-role, .u-email { font-size: 12px; color: var(--text-low); }
.dash-content { max-width: 1200px; padding: 28px 32px 64px; }
.dash-section { display: none; } .dash-section.active { display: block; }
.demo-banner { padding: 12px 16px; margin-bottom: 20px; border-radius: var(--r-md); background: var(--info-soft); border: 1px solid #c4d7f5; color: var(--info); font-size: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 20px; }
.glass, .stat-card, .panel, .wl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.stat-card { padding: 20px; }
.sc-label { font-size: 13px; color: var(--text-low); font-weight: 500; margin-bottom: 8px; }
.sc-value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.sc-delta, .sc-sub { font-size: 13px; margin-top: 8px; color: var(--success); font-weight: 600; }
.panel { padding: 20px 24px; margin-bottom: 20px; }
.panel > h3 { font-size: 17px; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.panel-head h3 { font-size: 17px; }
.panel-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.two-col > .panel { margin-bottom: 20px; }
.chart-wrap { display: flex; align-items: flex-end; gap: 12px; height: 190px; padding-top: 10px; }
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; }
.chart-bar { width: 100%; max-width: 40px; border-radius: 6px 6px 2px 2px; background: var(--brand); }
.chart-label { font-size: 12px; color: var(--text-low); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-inline: -4px; padding-inline: 4px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.data-table th { text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--text-low); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th:first-child { border-top-left-radius: var(--r-sm); } .data-table th:last-child { border-top-right-radius: var(--r-sm); }
.data-table td { padding: 12px; font-size: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td, .data-table tr:hover td { background: #fcfcfd; }
.status-select { height: 34px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.filter-row select { width: auto; min-width: 180px; height: 38px; }
.search-box { width: auto; min-width: 240px; height: 38px; }
.top-cat-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.top-cat-row:last-child { border-bottom: 0; }
.top-cat-row > span:first-child { flex: 0 0 38%; }
.tc-bar { flex: 1; height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.tc-fill { height: 100%; background: var(--brand); border-radius: 4px; }
.toggle { position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); transition: background .15s; }
.toggle.on { background: var(--brand); }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-sm); transition: left .15s; }
.toggle.on::after { left: 21px; }
.order-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 0; border-bottom: 1px solid var(--line); }
.order-row:last-child { border-bottom: 0; }
.order-row .o-id { font-size: 13px; color: var(--text-low); font-weight: 600; font-variant-numeric: tabular-nums; }
.order-row .o-items { font-size: 14px; margin: 3px 0 0; }
.grid-wishlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.wl-card { padding: 16px; }
.wl-icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; margin-bottom: 12px; border-radius: var(--r-md); background: var(--brand-soft); color: var(--brand); }
.wl-icon svg { width: 22px; height: 22px; }
.wl-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; } .wl-price { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wl-remove { margin-top: 8px; font-size: 13px; color: var(--danger); font-weight: 500; }
.dash-content .field, .dash-content .field-row { max-width: 520px; }
.dash-content .panel .field input[type=checkbox] { width: auto; height: auto; }
.dash-content .addr-card { cursor: default; }
.chip-set { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.mono { font-variant-numeric: tabular-nums; }
.subtle { font-size: 13px; color: var(--text-low); }
.text-right { text-align: right; }

/* ── Excel / CSV import (sellers & admins) ── */
.import-modal .modal-panel, .modal-panel.import { max-width: 860px; }
.import-steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.import-step { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-low); }
.import-step .s-num { width: 24px; height: 24px; font-size: 12px; }
.import-step.active { color: var(--text-hi); } .import-step.active .s-num { background: var(--brand); border-color: var(--brand); color: #fff; }
.import-step.done .s-num { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 36px 20px; text-align: center; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone svg { width: 36px; height: 36px; color: var(--brand); }
.dropzone b { font-size: 15px; } .dropzone span { font-size: 13px; color: var(--text-low); }
.import-help { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 16px; border-radius: var(--r-md); background: var(--brand-soft); border: 1px solid var(--brand-line); font-size: 14px; color: var(--text-mid); }
.import-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.import-summary .badge { height: 28px; font-size: 13px; }
.import-table-wrap { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 14px; }
.import-table-wrap .data-table { min-width: 720px; }
.import-table-wrap tr.bad td { background: var(--danger-soft); }
.import-table-wrap td.msg { color: var(--danger); font-size: 13px; }
.import-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.import-owner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.import-owner select { width: auto; min-width: 220px; height: 38px; }
.import-progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 18px 0; }
.import-progress > div { height: 100%; width: 40%; background: var(--brand); border-radius: 99px; animation: slide 1s ease-in-out infinite alternate; }
@keyframes slide { from { margin-left: 0; } to { margin-left: 60%; } }

/* 16 ── RESPONSIVE ────────────────────────────────────────────────────────── */
@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1100px) { :root { --gutter: 32px; } }

@media (max-width: 1100px) {
  .foot-top { grid-template-columns: repeat(3, 1fr); }
  .foot-brand { grid-column: 1 / -1; }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 120px; }
  .hamburger-btn { display: inline-flex; }
  .header-row1 { flex-wrap: wrap; height: auto; padding-block: 12px; gap: 10px 12px; }
  .logo { margin-right: auto; }
  .all-cats-btn { display: none; }
  .nav-search { order: 5; flex: 1 1 100%; }
  .header-row2 { display: none; }
  .header-iconbtn .ib-text, .deliver-wrap { display: none; }
  .cart-btn { padding: 0 12px; }
  .cart-btn .ib-text { display: none; }
  .hero { padding-block: 32px 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .shard-stage { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shard, .shard-b, .shard-c { margin-left: 0; grid-template-columns: 1fr; padding: 14px; }
  .shard .icon-well { grid-row: auto; margin-bottom: 8px; }
  .carousel-arrow { display: none !important; }
  .dash-sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .25s; width: 264px; }
  .dash-sidebar.open { transform: none; box-shadow: var(--sh-lg); }
  .dash-hamburger { display: inline-flex; }
  .dash-topbar { padding: 10px 16px; min-height: 60px; }
  .dash-content { padding: 20px 16px 48px; }
  .pd-grid { grid-template-columns: 1fr; gap: 20px; }
  .modal-panel.wide { max-width: 100%; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  section, .hero, .grid-section, .trending-cats-section, .trending-prods-section, .deals-section, .groups { padding-block: 28px; }
  .hero { padding-block: 24px 32px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 16px; }
  .hero .sub { font-size: 15px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .hero-stats { gap: 24px; }
  .shard-stage { display: none; } .shard { grid-template-columns: 48px 1fr; grid-template-rows: auto auto auto; padding: 12px 14px; }
  .shard .icon-well { grid-row: 1 / span 3; margin: 0; width: 48px; height: 48px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card { padding: 10px; }
  .card .icon-well { height: 112px; } .card .icon-well svg { width: 40px; height: 40px; }
  .wish-btn, .trend-ribbon, .deal-badge { top: 16px; } .wish-btn { right: 16px; } .trend-ribbon, .deal-badge { left: 16px; }
  .p-name { font-size: 14px; min-height: 38px; }
  .price { font-size: 16px; }
  .trend-prod-row > .card-carousel, .related-row > .card-carousel { flex-basis: 70%; }
  .trend-cat-card { flex-basis: 160px; padding: 14px; }
  .group-row, .cat-row { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .group-row::-webkit-scrollbar, .cat-row::-webkit-scrollbar { display: none; }
  .sort-bar { padding: 12px; } .sort-bar-group { width: 100%; } .sort-bar select { flex: 1; min-width: 0; }
  .price-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; padding-inline: 4px; }
  .foot-panel { padding: 28px 20px 16px; border-radius: var(--r-md); }
  .foot-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-panel, .modal-panel.wide { max-width: 100%; max-height: 94vh; max-height: 94dvh; padding: 20px 16px; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  #pdTabs { top: -20px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .checkout-foot { flex-direction: column-reverse; } .checkout-foot .btn { width: 100%; }
  .coupon-row { flex-direction: column; }
  .stepper .s-label { display: none; } .step.active .s-label { display: block; }
  .drawer { width: 100vw; }
  .deliver-pop { position: fixed; left: 12px; right: 12px; top: 130px; width: auto; }
  .account-dropdown { right: -8px; }
  .dash-topbar h1 { font-size: 17px; }
  .store-chip > div:last-child, .admin-chip > div:last-child, .user-chip .u-meta { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .stat-card { padding: 14px; } .sc-value { font-size: 22px; }
  .panel { padding: 16px; }
  .search-box, .filter-row select { width: 100%; min-width: 0; }
  .panel-actions { width: 100%; } .panel-actions .btn { flex: 1; }
  .top-cat-row > span:first-child { flex-basis: 45%; }
  .import-actions .btn { flex: 1; }
  .toast-stack { bottom: 12px; }
}
@media (max-width: 380px) { .stat-grid { grid-template-columns: 1fr; } .foot-top { grid-template-columns: 1fr; } }
