/* Anthony Stores: shared styles.
   Layout idea: a calm white-and-ink retail look with one trust blue for buttons. Big clear prices, a warm orange used only for sale signals.
   Light + dark are both defined as tokens, so every other stylesheet should use var(--token) and never raw colours. */

:root {
  --font-display: 'Bricolage Grotesque', 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-2: #F0F2F5;
  --surface-3: #E5E8EC;
  --line: #E3E6EB;
  --line-strong: #CBD0D8;
  --ink: #0F1720;
  --ink-2: #444D5A;
  --ink-3: #667080;

  --brand: #1D4ED8;
  --brand-strong: #1E40AF;
  --brand-ink: #FFFFFF;
  --brand-soft: #E8EEFD;
  --accent: #C2410C;
  --accent-ink: #FFFFFF;
  --accent-soft: #FFE9DD;
  --logo-dot: #FF8A3D;

  --ok: #17803D;      --ok-soft: #DDF3E5;
  --warn: #9A6200;    --warn-soft: #FFF0CF;
  --bad: #C42B2B;     --bad-soft: #FCE2E2;
  --info: #1D4ED8;    --info-soft: #E1EAFF;

  --media-bg: linear-gradient(160deg, #F7F9FC 0%, #E8ECF2 100%);
  --shadow-1: 0 1px 2px rgba(15, 23, 32, .06), 0 1px 3px rgba(15, 23, 32, .05);
  --shadow-2: 0 10px 30px -10px rgba(15, 23, 32, .22), 0 2px 6px rgba(15, 23, 32, .06);
  --shadow-3: 0 24px 60px -16px rgba(15, 23, 32, .35);
  --ring: 0 0 0 3px rgba(29, 78, 216, .28);

  --r-s: 6px; --r: 10px; --r-l: 16px; --r-xl: 22px;
  --fs-xs: .75rem; --fs-sm: .8438rem; --fs: .9375rem; --fs-lg: 1.0625rem; --fs-xl: 1.25rem;
  --fs-2xl: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); --fs-3xl: clamp(1.9rem, 1.3rem + 2vw, 2.75rem); --fs-4xl: clamp(2.3rem, 1.4rem + 3.4vw, 4rem);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --maxw: 1280px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0D10; --surface: #12151A; --surface-2: #181C22; --surface-3: #20252D;
    --line: #232831; --line-strong: #343B46;
    --ink: #ECEFF3; --ink-2: #AAB2BF; --ink-3: #7C8593;
    --brand: #5B8CFF; --brand-strong: #8FB0FF; --brand-ink: #06122E; --brand-soft: #16213D;
    --accent: #FF9A5C; --accent-ink: #2A1000; --accent-soft: #3A2111; --logo-dot: #FF8A3D;
    --ok: #4ADE80; --ok-soft: #12351F; --warn: #FBBF24; --warn-soft: #3A2D0A; --bad: #FF7A7A; --bad-soft: #3D1717; --info: #8AB0FF; --info-soft: #172B57;
    --media-bg: linear-gradient(160deg, #1D222B 0%, #12151A 100%);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 12px 30px -10px rgba(0, 0, 0, .6); --shadow-3: 0 24px 60px -16px rgba(0, 0, 0, .7);
    --ring: 0 0 0 3px rgba(91, 140, 255, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0D10; --surface: #12151A; --surface-2: #181C22; --surface-3: #20252D;
  --line: #232831; --line-strong: #343B46;
  --ink: #ECEFF3; --ink-2: #AAB2BF; --ink-3: #7C8593;
  --brand: #5B8CFF; --brand-strong: #8FB0FF; --brand-ink: #06122E; --brand-soft: #16213D;
  --accent: #FF9A5C; --accent-ink: #2A1000; --accent-soft: #3A2111; --logo-dot: #FF8A3D;
  --ok: #4ADE80; --ok-soft: #12351F; --warn: #FBBF24; --warn-soft: #3A2D0A; --bad: #FF7A7A; --bad-soft: #3D1717; --info: #8AB0FF; --info-soft: #172B57;
  --media-bg: linear-gradient(160deg, #1D222B 0%, #12151A 100%);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 12px 30px -10px rgba(0, 0, 0, .6); --shadow-3: 0 24px 60px -16px rgba(0, 0, 0, .7);
  --ring: 0 0 0 3px rgba(91, 140, 255, .35);
  color-scheme: dark;
}

/* ---------- reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.no-scroll, html.no-scroll-nav { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: var(--fs); line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--surface); z-index: 90; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: var(--fs-3xl); font-weight: 800; }
h2 { font-size: var(--fs-2xl); font-weight: 700; }
h3 { font-size: var(--fs-lg); font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand); color: var(--brand-ink); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.ico { flex: none; vertical-align: middle; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.view { flex: 1; min-width: 0; }
.view-in { animation: viewIn .28s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: var(--r); border: 1px solid transparent; background: var(--surface-2); color: var(--ink);
  font-weight: 600; font-size: var(--fs); line-height: 1; white-space: nowrap; transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn:hover { background: var(--surface-3); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-strong); color: var(--brand-ink); }
.btn-ghost { background: transparent; border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--brand-soft); color: var(--brand-strong); }
.btn-soft:hover { background: var(--brand-soft); filter: brightness(.96); color: var(--brand-strong); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(1.08); color: var(--accent-ink); background: var(--accent); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); background: var(--bad); color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--bad); border-color: var(--line-strong); }
.btn-danger-ghost:hover { background: var(--bad-soft); color: var(--bad); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: var(--fs-sm); border-radius: 8px; gap: 6px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: var(--fs-lg); border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink-2); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn[aria-pressed="true"][data-act="wish"] { color: var(--accent); }
.icon-btn[aria-pressed="true"][data-act="wish"] svg { fill: currentColor; }
.icon-btn[aria-pressed="true"][data-act="compare"] { color: var(--brand); background: var(--brand-soft); }
.count {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; line-height: 1;
}
.link { color: var(--brand); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { color: var(--brand-strong); text-decoration: underline; }

/* ---------- badges, chips, stars ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; background: var(--surface-2); color: var(--ink-2);
}
.badge-sale { background: var(--accent); color: var(--accent-ink); }
.badge-used { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.badge-new { background: var(--brand); color: var(--brand-ink); }
.badge-dark { background: var(--ink); color: var(--bg); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-brand { background: var(--brand-soft); color: var(--brand-strong); }
.badge-muted { background: var(--surface-2); color: var(--ink-3); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 12px; border-radius: 999px; background: var(--surface-2); font-size: var(--fs-sm); font-weight: 500; }
.chip button { display: grid; place-items: center; border: 0; background: none; width: 18px; height: 18px; padding: 0; border-radius: 50%; color: var(--ink-3); }
.chip button:hover { background: var(--surface-3); color: var(--ink); }
.stars { display: inline-flex; gap: 1px; color: var(--line-strong); vertical-align: middle; }
.stars .on, .stars .half { color: #F2A900; }
.stars .on svg { fill: currentColor; }
.stars .half svg { fill: currentColor; opacity: .55; }
.stars-num { margin-left: 6px; font-size: var(--fs-sm); font-weight: 600; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: var(--fs-xs); color: var(--ink-3); }
.field .err { font-size: var(--fs-xs); color: var(--bad); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s;
}
.textarea { padding: 10px 12px; min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2386A0A7' stroke-width='2.4' 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 12px center; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.input.is-bad, .select.is-bad, .textarea.is-bad { border-color: var(--bad); }
.input-group { display: flex; align-items: stretch; }
.input-group .pre { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r) 0 0 var(--r); background: var(--surface-2); color: var(--ink-2); font-weight: 600; }
.input-group .pre + .input { border-radius: 0 var(--r) var(--r) 0; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 17px; height: 17px; margin: 0; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--fs); }
.switch { position: relative; display: inline-flex; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); }
.qty button { width: 38px; height: 40px; border: 0; background: none; display: grid; place-items: center; color: var(--ink-2); }
.qty button:hover { color: var(--brand); }
.qty button:disabled { opacity: .35; }
.qty input { width: 44px; height: 40px; border: 0; text-align: center; background: none; color: var(--ink); font: inherit; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm button { width: 30px; height: 32px; } .qty-sm input { width: 34px; height: 32px; }

/* ---------- surfaces ---------- */
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.panel { padding: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h3 { font-size: var(--fs-lg); }
.panel-head .sub { color: var(--ink-3); font-size: var(--fs-sm); }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.section { padding-block: 40px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.section-head p { color: var(--ink-3); margin-top: 4px; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-weight: 600; text-align: right; }
.kv { margin: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-3); padding-block: 18px 6px; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs .sep { opacity: .5; }
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 20px; color: var(--ink-3); }
.empty h3 { color: var(--ink); } .empty p { max-width: 42ch; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 14px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.page-btn { min-width: 38px; height: 38px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); display: inline-grid; place-items: center; font-weight: 600; }
.page-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.page-btn.is-current { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.page-btn:disabled { opacity: .4; cursor: default; }
.page-gap { color: var(--ink-3); padding: 0 2px; }
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width .3s; }
.spark { display: block; color: var(--brand); }

/* vertical timeline, shared by order tracking and the admin order drawer */
.tl { display: grid; gap: 0; }
.tl li { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding-bottom: 18px; color: var(--ink-3); }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; z-index: 1; }
.tl li.done { color: var(--ink); }
.tl li.done::before { background: var(--brand); }
.tl li.done .tl-dot { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.tl li.current .tl-dot { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.tl li b { display: block; font-weight: 700; } .tl li small { display: block; color: var(--ink-3); font-size: var(--fs-sm); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs); }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 12px 16px; background: var(--surface-2); white-space: nowrap; border-bottom: 1px solid var(--line); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table th.num { text-align: right; }
.table .cell-prod { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.table .thumb { width: 48px; height: 48px; flex: none; border-radius: 9px; background: var(--media-bg); overflow: hidden; position: relative; }
.thumb .pimg-art, .thumb .pimg-photo { position: absolute; inset: 0; padding: 4px; }
.table .cell-prod b { display: block; font-weight: 600; }
.table .cell-prod small { color: var(--ink-3); }
.table a.row-link:hover { color: var(--brand); }

/* ---------- admin page scaffolding shared by admin views ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: var(--fs-2xl); }
.page-head .sub { color: var(--ink-3); margin-top: 4px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; }
.toolbar .grow { flex: 1; min-width: 200px; position: relative; }
.toolbar .grow .input { width: 100%; padding-left: 38px; }
.toolbar .grow .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.kpi { display: grid; gap: 6px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); }
.kpi-label { font-size: var(--fs-sm); color: var(--ink-3); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.kpi-value { font-family: var(--font-display); font-size: 1.85rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-delta { font-size: var(--fs-sm); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.kpi-delta.up { color: var(--ok); } .kpi-delta.down { color: var(--bad); }

/* ---------- product media + product card ---------- */
.pimg-art { position: absolute; inset: 0; display: grid; place-items: center; padding: 6% 9%; }
.pimg-art svg { display: block; width: 100%; height: 100%; }
.pimg-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8px; background: #fff; }
.pimg-fallback { color: var(--ink-3); }
.pcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s; min-width: 0; }
.pcard:hover { box-shadow: var(--shadow-2); border-color: var(--line-strong); transform: translateY(-2px); }
.pcard-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--media-bg); overflow: hidden; }
.pcard-media .pimg-art { transition: transform .35s ease; }
.pcard:hover .pcard-media .pimg-art { transform: scale(1.04); }
.pcard-badges { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 5px; max-width: calc(100% - 60px); z-index: 1; }
.pcard-tools { position: absolute; right: 8px; top: 8px; display: grid; gap: 4px; z-index: 2; }
@media (hover: hover) { .pcard-tools .icon-btn:not([aria-pressed="true"]) { opacity: 0; transform: translateY(-3px); transition: opacity .15s, transform .15s, background .15s; } .pcard:hover .pcard-tools .icon-btn, .pcard:focus-within .pcard-tools .icon-btn { opacity: 1; transform: none; } }
.pcard-tools .icon-btn { width: 34px; height: 34px; background: color-mix(in srgb, var(--surface) 88%, transparent); box-shadow: var(--shadow-1); backdrop-filter: blur(6px); }
.pcard-tools .icon-btn:hover { background: var(--surface); }
.pcard-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 14px; flex: 1; }
.pcard-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.pcard-brand { text-transform: uppercase; letter-spacing: .06em; }
.pcard-cond { color: var(--ink-3); white-space: nowrap; } .pcard-cond.is-new { color: var(--brand); }
.pcard-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pcard-title:hover { color: var(--brand); }
.pcard-hl { color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.price { display: flex; flex-direction: column; line-height: 1.15; }
.price strong { font-family: var(--font-display); font-size: 1.18rem; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.price s { color: var(--ink-3); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.pcard.is-out .pcard-media { filter: grayscale(.85); opacity: .75; }
.pcard-row { flex-direction: row; } .pcard-row .pcard-media { width: 220px; aspect-ratio: auto; flex: none; }
@media (max-width: 560px) { .pcard-row { flex-direction: column; } .pcard-row .pcard-media { width: auto; aspect-ratio: 4/3; } }
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 18px; }
@media (max-width: 520px) { .pcard-cmp { display: none; } .grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard-body { padding: 10px; } .pcard-hl { display: none; } .pcard-title { min-height: 0; }
  .pcard-foot { flex-direction: column; align-items: stretch; gap: 8px; } .pcard-foot .btn { width: 100%; min-height: 40px; }
  .pcard-foot .price { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 0 8px; } .price strong { font-size: 1rem; } .pcard-foot .btn { padding: 0 10px; } .pcard-tools .icon-btn { width: 30px; height: 30px; } }

/* ---------- overlays ---------- */
.layer { position: fixed; inset: 0; z-index: 200; display: flex; }
.layer-backdrop { position: absolute; inset: 0; background: rgba(5, 14, 17, .55); backdrop-filter: blur(2px); opacity: 0; transition: opacity .2s; }
.layer.in .layer-backdrop { opacity: 1; }
.modal { position: relative; margin: auto; width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-3); transform: translateY(14px) scale(.98); opacity: 0; transition: transform .22s, opacity .22s; outline: none; }
.layer.in .modal { transform: none; opacity: 1; }
.modal-sm { width: min(420px, calc(100% - 24px)); } .modal-lg { width: min(820px, calc(100% - 24px)); } .modal-xl { width: min(1040px, calc(100% - 24px)); }
.modal-head, .drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 14px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2, .drawer-head h2 { font-size: var(--fs-xl); }
.modal-body, .drawer-body { padding: 20px 22px; overflow: auto; flex: 1; min-height: 0; }
.modal-foot, .drawer-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; background: var(--surface); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.confirm-msg { color: var(--ink-2); line-height: 1.55; }
.drawer { position: relative; display: flex; flex-direction: column; height: 100%; width: min(460px, 100%); background: var(--surface); box-shadow: var(--shadow-3); outline: none; transition: transform .25s ease; }
.drawer-right { margin-left: auto; transform: translateX(100%); } .drawer-left { margin-right: auto; transform: translateX(-100%); }
.layer.in .drawer { transform: none; }
.drawer-foot { border-radius: 0; }
#toast-host { position: fixed; z-index: 400; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-2); font-weight: 500; opacity: 0; transform: translateY(10px); transition: opacity .2s, transform .2s; }
.toast.in { opacity: 1; transform: none; }
.toast .ico:first-child { color: #5EE0A0; } .toast-error .ico:first-child { color: #FF8F8F; } .toast-info .ico:first-child { color: #8AB0FF; }
.toast-msg { flex: 1; min-width: 0; }
.toast-action { border: 0; background: none; color: var(--bg); font-weight: 700; text-decoration: underline; padding: 4px; }
.toast-x { border: 0; background: none; color: inherit; opacity: .6; display: grid; place-items: center; padding: 4px; }
.toast-x:hover { opacity: 1; }

/* ---------- storefront chrome ---------- */
.ribbon { background: var(--ink); color: var(--bg); font-size: var(--fs-xs); }
.ribbon-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding-block: 6px; }
.ribbon span { display: inline-flex; align-items: center; gap: 8px; } .ribbon b { font-weight: 700; }
.ribbon a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--bg); white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.ribbon a:hover { color: var(--logo-dot); }
.announce { background: var(--brand-soft); color: var(--brand-strong); font-size: var(--fs-xs); font-weight: 600; }
.announce-row { display: flex; gap: 28px; align-items: center; min-height: 34px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.announce-row::-webkit-scrollbar { display: none; }
.announce span { display: inline-flex; align-items: center; gap: 7px; } .announce-phone { margin-left: auto; }
.hdr { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 80; background: var(--surface); border-bottom: 1px solid var(--line); }
.hdr-row { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--brand); flex: none; }
.logo:hover { color: var(--brand); }
.logo-mark { width: 34px; height: 34px; }
.logo-word { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: -.03em; color: var(--ink); }
.hdr-search { position: relative; flex: 1; max-width: 640px; display: flex; align-items: center; background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: 4px 4px 4px 12px; gap: 8px; transition: border-color .15s, background .15s, box-shadow .15s; }
.hdr-search:focus-within { background: var(--surface); border-color: var(--brand); box-shadow: var(--ring); }
.hdr-search-ico { color: var(--ink-3); display: grid; }
.hdr-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; height: 36px; }
.hdr-search input::-webkit-search-cancel-button { display: none; }
.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.hdr-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); }
.hdr-link:hover { background: var(--surface-2); color: var(--ink); }
.hdr-cart { position: relative; display: inline-flex; align-items: center; gap: 10px; margin-left: 6px; padding: 7px 14px 7px 12px; border-radius: 12px; border: 0; background: var(--brand); color: var(--brand-ink); }
.hdr-cart:hover { background: var(--brand-strong); }
.hdr-cart-text { display: grid; line-height: 1.1; text-align: left; } .hdr-cart-text small { font-size: 10.5px; opacity: .85; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; } .hdr-cart-text b { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.hdr-cart .count { top: -6px; right: -6px; border: 2px solid var(--surface); }
.hdr-cart.bump { animation: bump .45s; } @keyframes bump { 30% { transform: scale(1.08); } 60% { transform: scale(.97); } }
.hdr-menu { display: none; }
.catnav { border-top: 1px solid var(--line); background: var(--surface); }
.catnav-row { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.catnav-row::-webkit-scrollbar { display: none; }
.catnav-link { display: inline-flex; align-items: center; gap: 7px; padding: 12px 13px; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap; border-bottom: 2px solid transparent; }
.catnav-link:hover { color: var(--brand); }
.catnav-link.active { color: var(--brand); border-bottom-color: var(--brand); }
.catnav-all { color: var(--ink); } .catnav-deal { color: var(--accent); margin-left: auto; }
.catnav-deal:hover { color: var(--accent); filter: brightness(.9); }
.suggest { position: absolute; z-index: 90; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-3); padding: 6px; max-height: 70vh; overflow: auto; }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; } .suggest-item:hover, .suggest-item.hot { background: var(--surface-2); color: inherit; }
.suggest-thumb, .suggest-ico { width: 44px; height: 44px; flex: none; border-radius: 9px; background: var(--media-bg); position: relative; overflow: hidden; display: grid; place-items: center; color: var(--ink-3); }
.suggest-thumb .pimg-art { padding: 3px; }
.suggest-t { display: grid; font-weight: 600; line-height: 1.3; min-width: 0; } .suggest-t small { color: var(--ink-3); font-weight: 500; font-size: var(--fs-sm); }
.suggest-h { padding: 8px 10px 4px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.suggest-all { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px; margin-top: 4px; border-radius: 10px; font-weight: 700; color: var(--brand); border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.suggest-all:hover { background: var(--brand-soft); } .suggest-none { padding: 18px; text-align: center; color: var(--ink-3); }
.hdr-slim .hdr-row { min-height: 64px; } .secure { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-weight: 600; font-size: var(--fs-sm); color: var(--ok); } .hdr-slim .hdr-link { margin-left: 8px; }

.ftr { background: var(--surface); border-top: 1px solid var(--line); margin-top: 60px; }
.ftr-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-block: 48px 32px; }
.ftr-about p { color: var(--ink-3); margin: 14px 0; max-width: 40ch; }
.ftr-contact { display: grid; gap: 8px; color: var(--ink-2); font-size: var(--fs-sm); } .ftr-contact li { display: flex; gap: 10px; align-items: flex-start; } .ftr-contact .ico { margin-top: 2px; color: var(--brand); }
.ftr h4 { font-size: var(--fs); margin-bottom: 14px; } .ftr li + li { margin-top: 9px; } .ftr-grid ul a { color: var(--ink-3); } .ftr-grid ul a:hover { color: var(--brand); }
.ftr-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-block: 20px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-sm); }
.ftr-pay { display: flex; gap: 8px; flex-wrap: wrap; } .ftr-pay i { font-style: normal; font-weight: 700; font-size: 11px; padding: 4px 9px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink-2); }
.ftr-slim { margin-top: 0; } .ftr-slim .ftr-bottom { border-top: 0; }
.compare-tray { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--surface); border-top: 1px solid var(--line-strong); box-shadow: 0 -10px 30px -12px rgba(15, 23, 32, .3); }
.compare-row { display: flex; align-items: center; gap: 16px; min-height: 62px; flex-wrap: wrap; padding-block: 8px; }
.compare-chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; } .compare-go { display: flex; gap: 8px; margin-left: auto; }
.wa-fab { position: fixed; z-index: 60; right: max(18px, env(safe-area-inset-right, 0px)); bottom: max(18px, env(safe-area-inset-bottom, 0px)); display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px; border-radius: 999px; background: #1FA855; color: #fff; font-weight: 700; box-shadow: var(--shadow-2); transition: transform .15s; }
.wa-fab:hover { color: #fff; transform: translateY(-2px); }
.compare-tray:not([hidden]) ~ .wa-fab { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
.mobile-nav { position: fixed; inset: 0; z-index: 150; visibility: hidden; }
.mobile-nav.open { visibility: visible; }
.mobile-nav-backdrop { position: absolute; inset: 0; background: rgba(5, 14, 17, .55); opacity: 0; transition: opacity .2s; } .mobile-nav.open .mobile-nav-backdrop { opacity: 1; }
.mobile-nav-panel { position: absolute; left: 0; top: 0; bottom: 0; width: min(330px, 86%); background: var(--surface); transform: translateX(-100%); transition: transform .25s; overflow-y: auto; padding-bottom: 30px; }
.mobile-nav.open .mobile-nav-panel { transform: none; }
.mobile-nav-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); }
.mobile-nav-link { display: flex; align-items: center; gap: 12px; padding: 14px 20px; font-weight: 600; } .mobile-nav-link:hover { background: var(--surface-2); }
.mobile-nav hr { margin: 8px 20px; }

/* ---------- admin chrome ---------- */
.shell-admin { flex-direction: row; background: var(--bg); }
.adm-side { position: sticky; top: 0; height: 100vh; width: 248px; flex: none; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); padding: 14px 12px; gap: 6px; z-index: 100; }
.adm-side-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 16px; }
.adm-tag { margin-left: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: var(--brand-soft); color: var(--brand-strong); }
.adm-close { display: none; }
.adm-nav { display: grid; gap: 2px; }
.adm-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-weight: 600; color: var(--ink-2); position: relative; }
.adm-link:hover { background: var(--surface-2); color: var(--ink); }
.adm-link.active { background: var(--brand-soft); color: var(--brand-strong); }
.adm-link .adm-ext { margin-left: auto; opacity: .55; }
.adm-badge { margin-left: auto; font-style: normal; min-width: 22px; height: 20px; padding: 0 7px; display: grid; place-items: center; border-radius: 10px; font-size: 11px; font-weight: 700; background: var(--accent); color: var(--accent-ink); }
.adm-side-foot { margin-top: auto; display: grid; gap: 10px; }
.adm-help { padding: 14px; border-radius: 12px; background: var(--surface-2); font-size: var(--fs-sm); color: var(--ink-2); } .adm-help b { color: var(--ink); } .adm-help p { margin-top: 4px; }
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-top { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 10px max(22px, env(safe-area-inset-right, 0px)) 10px 22px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.adm-burger { display: none; }
.adm-search { position: relative; flex: 1; min-width: 0; max-width: 520px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.adm-search:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.adm-search input { flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; }
.adm-top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.adm-avatar { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-family: var(--font-display); }
.adm-pop-wrap { position: relative; }
.adm-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-3); padding: 6px; z-index: 120; }
.adm-pop-h { padding: 8px 10px 6px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.adm-pop-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 10px; width: 100%; border: 0; background: none; text-align: left; } .adm-pop-item:hover { background: var(--surface-2); color: inherit; } .adm-pop-item small { display: block; color: var(--ink-3); } .adm-pop-item .ico { margin-top: 2px; color: var(--ink-3); }
.adm-pop-user { padding: 4px 10px 10px; display: grid; } .adm-pop-user small { color: var(--ink-3); } .adm-pop-empty { padding: 18px; text-align: center; color: var(--ink-3); }
.adm-content { padding: 26px max(22px, env(safe-area-inset-right, 0px)) 60px 22px; max-width: 1440px; width: 100%; }
.adm-backdrop { display: none; }

/* ---------- responsive shell ---------- */
@media (max-width: 1100px) { .hdr-link span { display: none; } .ftr-grid { grid-template-columns: 1fr 1fr; } .hdr-cart-text { display: none; } .hdr-cart { padding: 10px 12px; } }
@media (max-width: 860px) {
  .hdr-menu { display: inline-grid; } .hdr-row { flex-wrap: wrap; gap: 8px 10px; min-height: 0; padding-block: 10px; }
  .hdr-search { order: 5; flex-basis: 100%; max-width: none; } .hdr-actions { margin-left: auto; }
  .hdr-search .btn { display: none; } .catnav { display: none; } .announce-phone { display: none; }
  .ribbon span { font-size: 11px; } .wa-fab span { display: none; } .wa-fab { padding: 14px; }
  .shell-admin { display: block; }
  .adm-side { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .25s, box-shadow .25s; box-shadow: none; width: min(290px, 86vw); }
  .adm-nav-open .adm-side { transform: none; box-shadow: var(--shadow-3); } .adm-close, .adm-burger { display: inline-grid; }
  .adm-nav-open .adm-backdrop { display: block; position: fixed; inset: 0; z-index: 95; background: rgba(5, 14, 17, .55); }
  .adm-viewstore, .adm-top-actions .btn span { display: none; } .adm-top { padding-inline: 14px; gap: 8px; } .adm-content { padding-inline: 14px; }
  .adm-search { max-width: none; }
}
@media (max-width: 560px) { .adm-top-actions > .btn-primary { display: none; } .adm-top-actions { gap: 2px; } .adm-search input { width: 100%; } .ftr-grid { grid-template-columns: 1fr; gap: 28px; } .modal-head, .drawer-head { padding-left: 16px; } .modal-body, .drawer-body { padding: 16px; } .compare-row { gap: 8px; } .compare-chips { display: none; } .page-head h1 { font-size: 1.4rem; } .ribbon a { font-size: 11px; } }

/* the front page has its own big search, so the header one steps aside */
.shell[data-view="home"] .hdr-search { display: none; }
@media (max-width: 860px) { .shell[data-view="home"] .hdr-row { flex-wrap: nowrap; } }
.shell[data-view="home"] .wa-fab { display: none; }
.logo-sub { font-weight: 500; color: var(--ink-3); }
