/* ==========================================================================
   Fabulous AI demo stores (/demo/<store>): store pages, cart and AI assistant.
   Each store sets its accent colours with a .theme-<name> class on <body>.
   No inline styles anywhere (the CSP blocks them): colours are classes here.
   ========================================================================== */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --soft: #f4f5f7;
  --soft-2: #eceef2;
  --line: #e3e5ea;
  --line-strong: #cdd1d9;
  --text: #111318;
  --muted: #5b616e;
  --ok: #157a3c;
  --warn: #9a5b00;
  --bad: #b42318;
  --sale: #c4320a;

  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-ink: #ffffff;
  --accent-soft: #eaf0ff;
  --accent-softer: #f4f7ff;
  --hero-from: #eef3ff;
  --hero-to: #f8f9fc;

  --fa-green: #0f3b2e;
  --fa-cream: #f6f4ee;
  --fa-lime: #c8f169;

  --font: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 1px 2px rgba(17, 19, 24, 0.06), 0 8px 24px rgba(17, 19, 24, 0.08);
  --shadow-lg: 0 24px 64px rgba(17, 19, 24, 0.22);
  --header-h: 64px;
}

.theme-electronics {
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft: #e8efff;
  --accent-softer: #f3f6ff;
  --hero-from: #e9f0ff;
  --hero-to: #f7f9ff;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px;
  background: var(--text); color: #fff; border-radius: var(--r-sm); text-decoration: none;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.s-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .s-container { padding: 0 24px; } }

/* ---------- Buttons, chips, links ---------- */
.s-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
  white-space: nowrap;
}
.s-btn:hover { border-color: var(--text); }
.s-btn:active { transform: translateY(1px); }
.s-btn:disabled { opacity: .55; cursor: not-allowed; }
.s-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.s-btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.s-btn--light { background: rgba(255,255,255,.85); border-color: var(--line); }
.s-btn--ghost { background: transparent; }
.s-btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.s-btn--block { width: 100%; }
.s-btn--grow { flex: 1; }
.s-btn svg { flex: none; }
.s-btn--ghost svg, .s-btn--light svg { color: var(--accent); }

.s-icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px;
  border: 0; background: transparent; color: var(--text); position: relative;
}
.s-icon-btn:hover { background: var(--soft); }

.s-chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff; font-size: 14px; line-height: 1.3; text-align: left;
  transition: border-color .15s, background-color .15s;
}
.s-chip:hover { border-color: var(--accent); background: var(--accent-softer); }
.s-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.s-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.s-link:hover { text-decoration: underline; }
.s-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
}

/* ---------- Demo ribbon (Fabulous AI) ---------- */
.s-ribbon { background: var(--fa-green); color: var(--fa-cream); font-size: 13px; }
.s-ribbon-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
.s-ribbon p { display: flex; align-items: center; gap: 8px; line-height: 1.35; }
.s-ribbon-mark { flex: none; border-radius: 5px; }
.s-ribbon strong { color: var(--fa-lime); font-weight: 600; }
.s-ribbon-long { display: none; }
.s-ribbon-link { display: inline-flex; align-items: center; gap: 4px; color: var(--fa-cream); font-weight: 600; text-decoration: none; white-space: nowrap; }
.s-ribbon-link:hover { text-decoration: underline; }
@media (min-width: 900px) { .s-ribbon-long { display: inline; } .s-ribbon-short { display: none; } }
@media (max-width: 420px) { .s-ribbon-link { font-size: 0; } .s-ribbon-link svg { width: 18px; height: 18px; } }

/* ---------- Header ---------- */
.s-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); }
.s-header-inner {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "menu logo cart" "search search search";
  align-items: center; gap: 8px 6px; padding-top: 8px; padding-bottom: 10px;
}
.s-menu-btn { grid-area: menu; margin-left: -10px; }
.s-logo { grid-area: logo; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.s-logo-mark { color: var(--accent); flex: none; }
.s-cart-btn { grid-area: cart; margin-right: -8px; }
.s-cart-count {
  position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center;
}
.s-cart-count.is-bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.3); } }
.s-search { grid-area: search; position: relative; }
.s-search input {
  width: 100%; height: 44px; padding: 0 48px 0 16px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--soft); font-size: 15px;
}
.s-search input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.s-search > button { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; }

.s-nav {
  position: fixed; inset: 0 auto 0 0; width: min(86vw, 340px); z-index: 60; background: #fff; overflow-y: auto;
  transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow-lg);
}
.s-nav.is-open { transform: none; }
.s-nav-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 12px 20px; border-bottom: 1px solid var(--line); }
.s-nav-title { font-weight: 700; }
.s-nav .s-container { padding: 8px 8px 24px; }
.s-nav a { display: block; padding: 12px 12px; border-radius: var(--r-sm); text-decoration: none; font-weight: 500; }
.s-nav a:hover, .s-nav a[aria-current] { background: var(--soft); }
.s-nav a[aria-current] { color: var(--accent); font-weight: 600; }
.s-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(17,19,24,.45); }

@media (min-width: 900px) {
  .s-header-inner { grid-template-columns: auto 1fr auto; grid-template-areas: "logo search cart"; gap: 24px; padding-top: 12px; padding-bottom: 12px; }
  .s-menu-btn { display: none; }
  .s-search { max-width: 560px; justify-self: center; width: 100%; }
  .s-nav { position: static; width: auto; transform: none; box-shadow: none; overflow: visible; background: transparent; border-top: 1px solid var(--line); }
  .s-nav-head { display: none; }
  .s-nav .s-container { padding: 0 24px; }
  .s-nav ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .s-nav a { padding: 10px 12px; font-size: 14.5px; white-space: nowrap; border-radius: 0; border-bottom: 2px solid transparent; }
  .s-nav a:hover { background: transparent; color: var(--accent); }
  .s-nav a[aria-current] { background: transparent; border-bottom-color: var(--accent); }
  .s-scrim { display: none !important; }
}

/* ---------- Home ---------- */
.s-hero { background: linear-gradient(160deg, var(--hero-from), var(--hero-to)); border-bottom: 1px solid var(--line); }
.s-hero-inner { display: grid; gap: 24px; padding-top: 28px; padding-bottom: 32px; align-items: center; }
.s-hero h1 { font-size: clamp(32px, 7vw, 56px); font-weight: 700; letter-spacing: -0.03em; margin: 10px 0 12px; }
.s-hero-text { font-size: 17px; color: var(--muted); max-width: 520px; }
.s-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.s-hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow); }
@media (min-width: 900px) {
  .s-hero-inner { grid-template-columns: 1fr 1.05fr; gap: 48px; padding-top: 48px; padding-bottom: 56px; }
}

.s-perks { border-bottom: 1px solid var(--line); }
.s-perks ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; padding: 18px 0; }
.s-perks li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.s-perks li svg { color: var(--accent); flex: none; }
.s-perks strong { display: block; color: var(--text); font-size: 14.5px; }
@media (min-width: 900px) { .s-perks ul { grid-template-columns: repeat(4, 1fr); padding: 22px 0; } }

.s-section { padding: 36px 0 8px; }
.s-section--tight { padding-top: 48px; }
.s-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.s-section-head h2 { font-size: clamp(22px, 4vw, 28px); font-weight: 700; }

.s-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.s-cat { display: grid; gap: 10px; text-decoration: none; }
.s-cat-media { display: block; aspect-ratio: 1; border-radius: var(--r); background: var(--soft); overflow: hidden; }
.s-cat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.s-cat:hover .s-cat-media img { transform: scale(1.04); }
.s-cat-name { font-weight: 600; font-size: 15px; }
@media (min-width: 900px) { .s-cats { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; } }

.s-promo {
  display: grid; gap: 18px; padding: 24px; border-radius: var(--r-lg);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}
.s-promo h2 { font-size: clamp(22px, 4vw, 30px); margin: 8px 0; }
.s-promo p { color: var(--muted); max-width: 520px; }
@media (min-width: 900px) { .s-promo { grid-template-columns: 1fr 1fr; align-items: center; padding: 36px 40px; gap: 40px; } }

/* ---------- Product cards and grid ---------- */
.s-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
@media (min-width: 640px) { .s-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .s-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; } }

.s-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.s-card-media { position: relative; display: block; aspect-ratio: 1; border-radius: var(--r); background: var(--soft); overflow: hidden; }
.s-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.s-card:hover .s-card-media img { transform: scale(1.035); }
.s-img-missing { display: grid; place-items: center; width: 100%; height: 100%; color: var(--line-strong); }
.s-card-body { display: grid; gap: 4px; flex: 1; align-content: start; }
.s-card-brand { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.s-card-title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.s-card-title a { text-decoration: none; }
.s-card-title a:hover { color: var(--accent); }
.s-card-add {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: #fff; font-weight: 600; font-size: 14px;
}
.s-card-add:hover:not(:disabled) { background: var(--text); border-color: var(--text); color: #fff; }
.s-card-add:disabled { color: var(--muted); background: var(--soft); border-color: var(--soft); cursor: not-allowed; }
.s-card-add.is-added { background: var(--ok); border-color: var(--ok); color: #fff; }

.s-badge {
  position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.s-badge.is-sale { background: var(--sale); color: #fff; }
.s-badge.is-out { background: var(--text); color: #fff; }

.s-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: 15.5px; }
.s-price-now { font-weight: 700; }
.s-price-now.is-sale { color: var(--sale); }
.s-price-was { color: var(--muted); font-size: .9em; }
.s-price--lg { font-size: 26px; }

.s-swatches { display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.s-sw { display: inline-block; width: 14px; height: 14px; border-radius: 999px; border: 1px solid rgba(0,0,0,.18); flex: none; }
.s-sw--lg { width: 30px; height: 30px; }
.s-sw-more { font-size: 12px; color: var(--muted); }

/* Swatch colours (names in demo/catalogue.js) */
.sw-black { background: #16181d; } .sw-white { background: #fff; } .sw-gray { background: #9aa0a9; }
.sw-charcoal { background: #3d4148; } .sw-silver { background: linear-gradient(135deg, #e9ebee, #b9bec6); }
.sw-space-gray { background: #5c6068; } .sw-gold { background: linear-gradient(135deg, #f1dca4, #c9a24f); }
.sw-rose-gold { background: linear-gradient(135deg, #f4d3c8, #d49a8a); } .sw-navy { background: #1f2a4d; }
.sw-blue { background: #2f6fde; } .sw-sky-blue { background: #8cc3f0; } .sw-teal { background: #138a8a; }
.sw-green { background: #2f8a4c; } .sw-sage { background: #a7b9a1; } .sw-olive { background: #6f7244; }
.sw-red { background: #d23a32; } .sw-burgundy { background: #6e1f2f; } .sw-coral { background: #f27a63; }
.sw-pink { background: #f3a9c0; } .sw-purple { background: #7347b8; } .sw-lavender { background: #c7b8ea; }
.sw-orange { background: #f08a24; } .sw-yellow { background: #f4d23c; } .sw-beige { background: #e4d6bd; }
.sw-cream { background: #f5efdf; } .sw-tan { background: #c9a27a; } .sw-brown { background: #6e4a2f; }
.sw-khaki { background: #b8a978; } .sw-denim { background: #4f6d95; }
.sw-clear { background: repeating-linear-gradient(45deg, #fff 0 4px, #e6e9ee 4px 8px); }
.sw-multicolor { background: conic-gradient(#d23a32, #f4d23c, #2f8a4c, #2f6fde, #7347b8, #d23a32); }

/* ---------- Listing pages ---------- */
.s-page { padding-top: 16px; padding-bottom: 48px; }
.s-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--muted); }
.s-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.s-crumbs a { text-decoration: none; }
.s-crumbs a:hover { color: var(--accent); }
.s-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 14px 0 22px; }
.s-page-head h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 700; letter-spacing: -0.02em; }
.s-page-head p { color: var(--muted); margin-top: 6px; max-width: 620px; }

.s-listing { display: grid; gap: 24px; }
.s-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.s-count { color: var(--muted); font-size: 14.5px; margin-right: auto; }
.s-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.s-sort select { height: 38px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 12px; background: #fff; color: var(--text); }

.s-filters {
  position: fixed; inset: auto 0 0 0; z-index: 60; max-height: 86vh; overflow-y: auto; background: #fff;
  border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: var(--shadow-lg); transform: translateY(105%); transition: transform .25s ease;
}
.s-filters.is-open { transform: none; }
.s-filter-form { padding: 6px 20px 20px; }
.s-filters-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 10px 0; background: #fff; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.s-filters-head h2 { font-size: 18px; }
.s-fset { border: 0; padding: 14px 0; margin: 0; border-bottom: 1px solid var(--line); }
.s-fset legend { font-weight: 700; font-size: 14.5px; padding: 0; margin-bottom: 8px; }
.s-check { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14.5px; cursor: pointer; }
.s-check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
.s-color-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.s-price-range { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.s-price-range label { display: flex; align-items: center; gap: 4px; flex: 1; border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 10px; background: #fff; }
.s-price-range input { width: 100%; height: 38px; border: 0; background: transparent; min-width: 0; }
.s-price-range input:focus { outline: none; }
.s-filter-actions { display: grid; gap: 12px; justify-items: center; padding-top: 16px; }
.s-filter-toggle { display: inline-flex; }

@media (min-width: 900px) {
  .s-listing { grid-template-columns: 240px minmax(0, 1fr); gap: 36px; align-items: start; }
  .s-filters { position: sticky; top: 140px; inset: auto; z-index: 1; max-height: calc(100vh - 160px); transform: none; box-shadow: none; border-radius: 0; background: transparent; }
  .s-filter-form { padding: 0; }
  .s-filters-head { position: static; background: transparent; padding-top: 0; }
  .s-filters-head .s-icon-btn { display: none; }
  .s-filter-toggle { display: none; }
  .js .s-filter-actions .s-btn { display: none; }
}

.s-empty { display: grid; justify-items: start; gap: 10px; padding: 32px; border-radius: var(--r-lg); background: var(--soft); }
.s-empty h2 { font-size: 20px; }
.s-empty p { color: var(--muted); }
.s-empty--page { justify-items: center; text-align: center; padding: 72px 24px; margin-top: 24px; }
.s-empty--page h1 { font-size: clamp(26px, 5vw, 36px); }

.s-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 36px; }
.s-pg { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 14px; }
.s-pg:hover { border-color: var(--text); }
.s-pg.is-current { background: var(--text); color: #fff; border-color: var(--text); }

/* ---------- Product page ---------- */
.s-product { display: grid; gap: 24px; margin-top: 16px; }
.s-gallery { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--soft); align-self: start; }
.s-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.s-gallery .s-badge { top: 16px; left: 16px; font-size: 13px; }
.s-buybox { display: grid; gap: 14px; align-content: start; }
.s-buy-brand { font-weight: 700; color: var(--accent); font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.s-buybox h1 { font-size: clamp(26px, 4.4vw, 36px); font-weight: 700; letter-spacing: -0.02em; }
.s-summary { color: var(--muted); font-size: 16.5px; }
.s-pick-color { border: 0; padding: 0; margin: 0; }
.s-pick-color legend { font-size: 14.5px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.s-pick-color legend span { font-weight: 400; color: var(--muted); }
.s-pick-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.s-pick { position: relative; cursor: pointer; }
.s-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.s-pick .s-sw { box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--line-strong); }
.s-pick input:checked + .s-sw { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--text); }
.s-pick input:focus-visible + .s-sw { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--accent); }
.s-buy-row { display: flex; gap: 10px; }
.s-qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; height: 46px; }
.s-qty button { width: 40px; height: 100%; border: 0; background: transparent; display: grid; place-items: center; border-radius: 999px; }
.s-qty button:hover { background: var(--soft); }
.s-qty input { width: 36px; border: 0; text-align: center; font-weight: 600; background: transparent; -moz-appearance: textfield; }
.s-qty input::-webkit-outer-spin-button, .s-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.s-stock { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ok); font-weight: 600; }
.s-stock.is-low { color: var(--warn); }
.s-stock.is-out { color: var(--bad); }
.s-assure { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }
.s-assure li { display: flex; align-items: center; gap: 10px; }
.s-assure svg { color: var(--text); flex: none; }
.s-ask-box { display: grid; gap: 12px; justify-items: start; padding: 18px; border-radius: var(--r); background: var(--accent-softer); border: 1px solid var(--accent-soft); font-size: 14.5px; }
.s-ask-box .s-btn { background: #fff; }

.s-details { display: grid; gap: 8px; margin-top: 36px; }
.s-detail { padding: 20px 0; border-top: 1px solid var(--line); }
.s-detail h2 { font-size: 20px; margin-bottom: 14px; }
.s-detail p + p { margin-top: 12px; }
.s-detail p { color: #2c3039; }
.s-features { display: grid; gap: 10px; }
.s-features li { display: flex; gap: 10px; }
.s-features svg { color: var(--accent); flex: none; margin-top: 3px; }
.s-specs { margin: 0; display: grid; }
.s-specs div { display: grid; grid-template-columns: 42% 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.s-specs dt { color: var(--muted); }
.s-specs dd { margin: 0; font-weight: 500; }
.s-compat { padding-top: 18px; }
.s-compat h3 { font-size: 16px; margin-bottom: 10px; }
.s-compat ul { display: flex; flex-wrap: wrap; gap: 8px; }
.s-compat li { padding: 5px 12px; border-radius: 999px; background: var(--soft); font-size: 13.5px; font-weight: 500; }

@media (min-width: 900px) {
  .s-product { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; }
  .s-buybox { position: sticky; top: 140px; }
  .s-details { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; }
}

.s-prose { max-width: 900px; }
.s-prose h1 { font-size: clamp(28px, 5vw, 40px); margin: 16px 0 12px; }
.s-prose p { color: var(--muted); margin-bottom: 18px; }
.s-prose a { color: var(--accent); }
.s-table-wrap { overflow-x: auto; }
.s-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.s-table th, .s-table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.s-table th { color: var(--muted); font-weight: 600; }

/* ---------- Footer ---------- */
.s-footer { margin-top: 56px; background: #0f1115; color: #c9cdd5; font-size: 14.5px; }
.s-footer-grid { display: grid; gap: 28px; padding-top: 44px; padding-bottom: 32px; }
.s-footer .s-logo { color: #fff; }
.s-footer .s-logo-mark { color: var(--accent); }
.s-footer-brand p { margin-top: 12px; max-width: 280px; }
.s-footer h2 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.s-footer-col ul { display: grid; gap: 8px; }
.s-footer-col a { text-decoration: none; }
.s-footer-col a:hover { color: #fff; text-decoration: underline; }
.s-footer-col p + p { margin-top: 10px; }
.s-footer-help strong { color: #fff; font-weight: 600; }
.s-footer .s-link { color: #fff; }
.s-footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 18px; padding-bottom: 96px; border-top: 1px solid #262a33; font-size: 13.5px; color: #8b919c; }
.s-footer-bottom a { color: #fff; }
@media (min-width: 900px) {
  .s-footer-grid { grid-template-columns: 1.1fr .8fr 1.4fr 1.2fr; gap: 40px; }
  .s-footer-bottom { padding-bottom: 28px; }
}

/* ---------- Cart drawer, checkout note, toast ---------- */
.s-drawer { position: fixed; inset: 0; z-index: 90; background: rgba(17,19,24,.45); display: flex; justify-content: flex-end; }
.s-drawer-panel { width: min(100%, 420px); height: 100%; background: #fff; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slide-in .22s ease; }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.s-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 14px 20px; border-bottom: 1px solid var(--line); }
.s-drawer-head h2 { font-size: 19px; }
.s-cart-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.s-cart-items li { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.s-cart-items img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-sm); background: var(--soft); }
.s-cart-name { font-weight: 600; font-size: 14.5px; line-height: 1.3; text-decoration: none; }
.s-cart-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.s-cart-qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; border: 1px solid var(--line-strong); border-radius: 999px; }
.s-cart-qty button { width: 30px; height: 30px; border: 0; background: transparent; border-radius: 999px; display: grid; place-items: center; }
.s-cart-qty span { min-width: 18px; text-align: center; font-size: 14px; font-weight: 600; }
.s-cart-line { display: grid; justify-items: end; gap: 6px; font-weight: 700; font-size: 14.5px; }
.s-cart-remove { border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; padding: 0; }
.s-cart-empty { display: grid; justify-items: center; gap: 12px; padding: 48px 12px; text-align: center; color: var(--muted); }
.s-cart-empty svg { color: var(--line-strong); }
.s-drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.s-ship-note { font-size: 13.5px; color: var(--muted); }
.s-ship-note strong { color: var(--ok); }
.s-cart-total { display: flex; justify-content: space-between; font-size: 17px; }

.s-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(17,19,24,.55); }
.s-modal-card { position: relative; width: min(100%, 460px); background: #fff; border-radius: var(--r-lg); padding: 32px 28px 28px; display: grid; gap: 12px; box-shadow: var(--shadow-lg); animation: pop .2s ease; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.s-modal-close { position: absolute; top: 10px; right: 10px; }
.s-modal-mark { border-radius: 12px; }
.s-modal h2 { font-size: 24px; }
.s-modal p { color: #3a3f4a; }
.s-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.s-toast {
  position: fixed; left: 50%; bottom: 88px; z-index: 96; transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 999px; background: var(--text); color: #fff; font-size: 14.5px; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: pop .2s ease; display: flex; align-items: center; gap: 12px;
}
.s-toast button { border: 0; background: none; color: #9cc0ff; font-weight: 700; padding: 0; }
.s-mobile-filters-open, .s-menu-open, .s-dialog-open { overflow: hidden; }

/* ---------- AI shopping assistant ---------- */
.s-assist-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 70; display: inline-flex; align-items: center; gap: 10px;
  min-height: 54px; padding: 0 20px 0 16px; border-radius: 999px; border: 0; background: var(--text); color: #fff;
  font-weight: 600; font-size: 15.5px; box-shadow: 0 10px 30px rgba(17,19,24,.3); transition: transform .15s;
}
.s-assist-fab svg { color: var(--fa-lime); }
.s-assist-fab:hover { transform: translateY(-2px); }
.s-assist-fab::before {
  content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid var(--accent); opacity: 0;
  animation: ring 2.6s ease-out 1.2s 3;
}
@keyframes ring { 0% { opacity: .7; transform: scale(.96); } 100% { opacity: 0; transform: scale(1.18); } }
.is-assistant-open .s-assist-fab, .s-dialog-open .s-assist-fab { display: none; }

.s-assistant {
  position: fixed; inset: 0; z-index: 85; background: #fff; display: flex; flex-direction: column;
}
/* Tablets and laptops: a full-height sidebar sliding over the right side of the page */
@media (min-width: 700px) {
  .s-assistant {
    inset: 0 0 0 auto; width: 420px; border-left: 1px solid var(--line);
    box-shadow: -12px 0 40px rgba(17, 19, 24, 0.14); animation: slide-in-right .25s ease;
  }
}
@keyframes slide-in-right { from { transform: translateX(48px); opacity: 0; } }
/* Wide screens: the page moves aside to make room, so the chat never covers it */
@media (min-width: 1100px) {
  body { transition: padding-right .25s ease; }
  body.is-assistant-open { padding-right: 420px; }
  .s-assistant { box-shadow: none; }
  .is-assistant-open .s-toast { left: calc((100% - 420px) / 2); }
}
.s-assistant-head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.s-assistant-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--text); color: var(--fa-lime); flex: none; }
.s-assistant-id { flex: 1; min-width: 0; }
.s-assistant-id h2 { font-size: 16px; }
.s-assistant-id p { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.s-live-dot { width: 7px; height: 7px; border-radius: 999px; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.s-assistant-head .s-icon-btn { width: 38px; height: 38px; flex: none; }
.s-assistant-head .s-icon-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }

.s-assistant-history { flex: 1; overflow-y: auto; padding: 16px 14px; background: var(--soft); }
.is-history .s-assistant-log, .is-history .s-assistant-chips, .is-history .s-assistant-form { display: none !important; }
.s-history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.s-history-head h3 { font-size: 15px; }
.s-link-btn { border: 0; background: none; padding: 4px; color: var(--accent); font-size: 13.5px; font-weight: 600; }
.s-link-btn:hover { text-decoration: underline; }
.s-history-list { display: grid; gap: 8px; }
.s-history-item { display: flex; align-items: center; gap: 4px; padding-right: 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.s-history-item.is-current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.s-history-open { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 10px 12px; border: 0; background: none; text-align: left; border-radius: 12px; }
.s-history-open:hover .s-history-title { color: var(--accent); }
.s-history-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 600; }
.s-history-meta { font-size: 12px; color: var(--muted); }
.s-history-del { width: 34px !important; height: 34px !important; color: var(--muted); }
.s-history-del:hover { color: var(--bad); }
.s-history-empty, .s-history-note { margin-top: 12px; font-size: 13px; color: var(--muted); }

.s-assistant-log { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 14px; background: var(--soft); overscroll-behavior: contain; }
.s-msg { display: flex; flex-direction: column; gap: 10px; max-width: 100%; }
.s-msg-text { padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.s-msg--user { align-items: flex-end; }
.s-msg--user .s-msg-text { background: var(--accent); color: #fff; border-bottom-right-radius: 6px; max-width: 85%; }
.s-msg--bot { align-items: flex-start; }
.s-msg--bot .s-msg-text { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; max-width: 92%; }
.s-msg-note { font-size: 12.5px; color: var(--muted); padding: 0 4px; }
.s-msg-text.is-typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: caret .8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.s-rec.is-new { animation: pop-in .3s ease both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px); } }
.s-msg-error .s-msg-text { background: #fff4f2; border-color: #f3c7bf; color: var(--bad); }

.s-recs { display: grid; gap: 8px; width: 100%; }
.s-rec {
  display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 10px; border-radius: 14px; background: #fff;
  border: 1px solid var(--line); align-items: start;
}
.s-rec-img { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; background: var(--soft); }
.s-rec-body { display: grid; gap: 3px; min-width: 0; }
.s-rec-rank { font-size: 11.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.s-rec-name { font-weight: 600; font-size: 14.5px; line-height: 1.3; text-decoration: none; }
.s-rec-name:hover { color: var(--accent); }
.s-rec .s-price { font-size: 14.5px; }
.s-rec-why { font-size: 13.5px; color: #3a3f4a; line-height: 1.4; }
.s-rec-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.s-rec-actions .s-btn { min-height: 34px; padding: 0 12px; font-size: 13.5px; }

.s-trace { width: 100%; font-size: 13px; }
.s-trace summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); font-weight: 600; list-style: none; padding: 2px 4px; }
.s-trace summary::-webkit-details-marker { display: none; }
.s-trace summary svg { transition: transform .15s; }
.s-trace[open] summary svg { transform: rotate(180deg); }
.s-trace ol { margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px dashed var(--line-strong); display: grid; gap: 8px; counter-reset: step; }
.s-trace li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; counter-increment: step; color: #3a3f4a; }
.s-trace li::before { content: counter(step); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 700; }
.s-trace strong { color: var(--text); }
.s-trace-meta { color: var(--muted); font-size: 12px; }

.s-typing { display: inline-flex; align-items: center; gap: 4px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; border-bottom-left-radius: 6px; }
/* The three dots only: the label inside the same bubble is styled separately below */
.s-typing span:not(.s-typing-label) { width: 7px; height: 7px; flex: none; border-radius: 999px; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.s-typing span:nth-child(2) { animation-delay: .15s; }
.s-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.s-typing-label { margin-left: 6px; font-size: 13px; line-height: 1.3; color: var(--muted); white-space: nowrap; }

.s-assistant-chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px 4px; background: var(--soft); scrollbar-width: none; }
.s-assistant-chips::-webkit-scrollbar { display: none; }
.s-assistant-chips .s-chip { flex: none; white-space: nowrap; font-size: 13.5px; min-height: 34px; }
.s-assistant-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.s-assistant-form textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 120px; overflow-y: hidden; padding: 11px 14px; border-radius: 22px; border: 1px solid var(--line-strong);
  background: var(--soft); font-size: 15px; line-height: 1.4;
}
.s-assistant-form textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.s-assistant-form button { width: 44px; height: 44px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.s-assistant-form button:disabled { opacity: .5; }
.s-assistant-foot { padding: 0 14px 10px; font-size: 11.5px; color: var(--muted); background: #fff; text-align: center; }
.s-assistant-foot a { color: inherit; }
@supports (padding: max(0px)) {
  .s-assistant-foot { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}

/* ---------- Phone menu: link back to the main site ---------- */
.s-nav .s-nav-back { display: block; margin: 4px 20px 24px; padding: 10px 0; border-radius: 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-decoration: none; }
.s-nav .s-nav-back:hover { color: var(--accent); background: none; }
@media (min-width: 900px) { .s-nav .s-nav-back { display: none; } }
.s-section-head .s-link { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; white-space: nowrap; }

/* ---------- Live search suggestions ---------- */
.s-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50; max-height: min(70vh, 520px); overflow-y: auto; overflow-x: hidden;
  padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg);
}
.s-suggest-label { padding: 8px 10px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.s-suggest-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px;
  background: none; color: var(--text); text-align: left; text-decoration: none; font-size: 14.5px;
}
.s-suggest-item:hover, .s-suggest-item.is-active { background: var(--soft); }
.s-suggest-item img { width: 44px; height: 44px; flex: none; border-radius: 8px; object-fit: cover; background: var(--soft); }
.s-suggest-text { display: grid; flex: 1; min-width: 0; }
.s-suggest-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; }
.s-suggest-brand { font-size: 12.5px; color: var(--muted); }
.s-suggest-price { flex: none; font-weight: 700; font-size: 14px; }
.s-suggest-price .is-sale { color: var(--sale); }
.s-suggest-price s { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.s-suggest-cat { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.s-suggest-cat svg { color: var(--accent); }
.s-suggest-none { padding: 10px; color: var(--muted); font-size: 14px; }
.s-suggest-foot { display: grid; gap: 2px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.s-suggest-all { color: var(--accent); font-weight: 600; }
.s-suggest-ask { font-weight: 600; }
.s-suggest-ask svg { color: var(--accent); flex: none; }

/* ---------- Checkout ---------- */
.s-steps-bar { display: flex; gap: 8px; margin: 14px 0 6px; font-size: 13.5px; color: var(--muted); }
.s-steps-bar li { display: inline-flex; align-items: center; gap: 8px; }
.s-steps-bar li + li::before { content: ""; width: 24px; height: 1px; background: var(--line-strong); }
.s-steps-bar .is-done { color: var(--ok); font-weight: 600; }
.s-steps-bar .is-current { color: var(--text); font-weight: 700; }
.s-checkout h1 { font-size: clamp(28px, 5vw, 40px); margin: 6px 0 22px; }
.s-checkout-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .s-checkout-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; } }
.s-demo-notice { display: grid; gap: 12px; justify-items: start; padding: 28px; border-radius: var(--r-lg); background: var(--accent-softer); border: 1px solid var(--accent-soft); }
.s-demo-notice h2 { font-size: 24px; }
.s-demo-notice p { color: #3a3f4a; max-width: 60ch; }
.s-demo-mark { border-radius: 12px; }
.s-co-steps { display: grid; gap: 10px; margin-top: 18px; }
.s-co-step { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border: 1px dashed var(--line-strong); border-radius: var(--r); color: var(--muted); }
.s-co-step h3 { font-size: 16px; color: var(--text); opacity: .6; }
.s-co-step p { font-size: 14px; }
.s-co-num { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 999px; background: var(--soft-2); font-weight: 700; font-size: 13.5px; }
.s-summary-box { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
@media (min-width: 900px) { .s-summary-box { position: sticky; top: 140px; } }
.s-summary-box h2 { font-size: 18px; margin-bottom: 12px; }
.s-co-items { display: grid; gap: 12px; }
.s-co-items li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.s-co-thumb { position: relative; display: block; width: 56px; height: 56px; }
.s-co-thumb img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--soft); }
.s-co-qty { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--text); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 20px; text-align: center; }
.s-co-name { display: grid; min-width: 0; font-size: 14.5px; }
.s-co-name a { font-weight: 600; text-decoration: none; }
.s-co-name a:hover { color: var(--accent); }
.s-co-name small { color: var(--muted); }
.s-co-price { font-weight: 600; font-size: 14.5px; }
.s-co-empty { color: var(--muted); }
.s-totals { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 15px; }
.s-totals div { display: flex; justify-content: space-between; }
.s-totals dd { margin: 0; font-weight: 600; }
.s-totals .is-total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 700; }
.s-co-ship-note { margin-top: 10px; font-size: 13.5px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
