/* Mobile-first: base rules target phones; min-width queries scale up. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --tint: #f4f6fa;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e5e9f0;
  --blue: #1262f5;
  --blue-dark: #0a49c2;
  --blue-soft: #eaf1ff;
  --green: #15803d;
  --green-soft: #dcfce7;
  --red: #b91c1c;
  --radius: 12px;
  --header-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, 'Helvetica Neue', Arial, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font: 15px/1.5 var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.has-cart-bar.cart-bar-on .site-footer { padding-bottom: calc(26px + 76px + var(--safe-bottom)); }
body.panel-open { overflow: hidden; }
main { flex: 1 0 auto; width: 100%; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.2; }
button, input, select, textarea { font: inherit; color: inherit; }
form { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--blue); color: #fff; padding: 10px 16px; }
.skip-link:focus { left: 12px; top: 12px; border-radius: 8px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 14px; }
.narrow { max-width: 640px; margin-left: max(0px, calc(50% - 600px)); }
.muted { color: var(--muted); }
.text-green { color: var(--green); }
.center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  touch-action: manipulation;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-lg { min-height: 50px; font-size: 16px; padding: 12px 22px; }
.btn-full { width: 100%; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #1e293b; }
.btn-outline { border-color: #cbd5e1; }
.btn-outline:hover:not(:disabled) { border-color: var(--ink); }

.icon-btn {
  position: relative; flex-shrink: 0;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { background: var(--tint); }

/* Announcement + header */
.announce {
  background: var(--ink); color: #f8fafc; text-align: center;
  font-size: 12px; font-weight: 600; padding: 6px 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(10px);
}
.header-row {
  max-width: 1200px; margin: 0 auto; height: var(--header-h);
  padding: 0 8px 0 14px;
  display: flex; align-items: center; gap: 6px;
}
.brand { flex-shrink: 0; display: grid; place-items: center; min-width: 44px; min-height: 44px; }
.brand img { height: 40px; width: auto; }

.search { position: relative; flex: 1; min-width: 0; display: flex; margin-left: 4px; }
.search input {
  width: 100%; min-width: 0; height: 44px;
  padding: 0 40px 0 12px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--tint);
  font-size: 16px; /* prevents iOS zoom on focus */
  -webkit-appearance: none; appearance: none;
}
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search input:focus { outline: none; border-color: var(--blue); background: #fff; }
.search-btn {
  position: absolute; right: 0; top: 0; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
}
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(15, 23, 42, .14); overflow: hidden;
}
.suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: 52px; font-size: 14px; }
.suggest a:hover, .suggest a.is-active { background: var(--tint); }
.suggest img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.suggest strong { display: block; font-weight: 600; line-height: 1.3; }
.suggest small { color: var(--muted); }
.suggest-empty { margin: 0; padding: 10px; font-size: 14px; color: var(--muted); }
.link-btn { padding: 12px 0; min-height: 44px; border: 0; background: none; color: var(--blue); font-size: 13px; font-weight: 600; cursor: pointer; }
.line-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.suggest .suggest-all { justify-content: center; color: var(--blue); font-weight: 600; border-top: 1px solid var(--line); }

.desktop-nav { display: none; }
.count-badge {
  position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* Hero */
.hero { padding: 16px 0 6px; }
.hero h1 { font-size: 22px; max-width: 26ch; }
.hero-sub { display: none; }
.perks {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none;
  font-size: 12px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
}
.perks::-webkit-scrollbar { display: none; }
.perks li::before { content: '✓'; color: var(--green); margin-right: 4px; }

/* Product grid + toolbar */
.grid-section { padding: 8px 0 28px; }
.grid-head { padding: 12px 0 2px; }
.grid-title { font-size: 22px; }
.grid-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.toolbar { position: relative; padding: 10px 0 0; margin-bottom: 4px; }
.chips {
  display: flex; gap: 8px; min-width: 0;
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
  margin: 0 -14px; padding: 2px 14px; scroll-padding: 0 14px;
}
.toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 4px; }
.result-count { font-size: 14px; color: var(--muted); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 16px 0 7px;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--tint); }
.chip.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.chips-plain { margin: 12px 0 8px; padding-left: 0; }
.chips-plain .chip { padding: 0 16px; }
.sort { flex-shrink: 0; }
.sort select {
  height: 44px; padding: 0 34px 0 16px;
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
  font-size: 16px; font-weight: 600; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 19px) 19px, calc(100% - 14px) 19px;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.search-status { font-size: 14px; color: var(--muted); padding: 2px 0 10px; }
.search-status a { color: var(--blue); font-weight: 600; margin-left: 6px; display: inline-block; padding: 10px 6px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
.grid-empty { text-align: center; padding: 40px 0; display: grid; gap: 14px; justify-items: center; color: var(--muted); }

/* Product card */
.card { display: flex; flex-direction: column; min-width: 0; }
.card-media {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius); background: var(--tint);
}
.card-media picture, .card-img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  padding: 3px 8px; border-radius: 999px; background: #fff;
  font-size: 11px; font-weight: 700; box-shadow: 0 1px 4px rgba(15, 23, 42, .12);
}
.badge-out { left: auto; right: 8px; background: var(--ink); color: #fff; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; flex: 1; }
.card-title {
  font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.price-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; }
.price-line strong { font-size: 17px; font-weight: 700; }
.price-line s { font-size: 13px; color: var(--muted); }
.price-lg strong { font-size: 26px; }

.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 32px; height: 32px; padding: 0;
  border: 2px solid transparent; border-radius: 999px; background: none; cursor: pointer;
  touch-action: manipulation;
}
.swatch-color .swatch-dot { width: 22px; height: 22px; }
.swatches-sm { gap: 8px; }
.swatches-sm .swatch { min-width: 44px; height: 44px; padding: 4px; border: 2px solid transparent; }
.swatches-sm .swatch-color .swatch-dot { width: 34px; height: 34px; }
.swatches-sm .swatch-text { height: 40px; padding: 0 12px; font-size: 13px; }
.swatches-sm .swatch[aria-checked='true'] { border-color: var(--ink); }
.swatch-dot { display: inline-block; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .18); flex-shrink: 0; }
.swatch[aria-checked='true'] { border-color: var(--ink); }
.swatch-text { padding: 0 10px; border: 1.5px solid var(--line); font-size: 12px; font-weight: 600; }
.swatch-text[aria-checked='true'] { border-color: var(--ink); background: var(--tint); }
.swatch.is-out { opacity: .4; cursor: not-allowed; }
.swatch.is-out .swatch-label { text-decoration: line-through; }
.swatch-name { font-size: 12px; color: var(--muted); margin-top: -2px; }

.swatches-lg { gap: 8px; }
.swatches-lg .swatch {
  height: 44px; padding: 0 14px 0 8px;
  border: 1.5px solid var(--line); background: #fff; font-size: 14px; font-weight: 600;
}
.swatches-lg .swatch-text { padding: 0 14px; }
.swatches-lg .swatch[aria-checked='true'] { border: 2px solid var(--ink); }
.swatches-lg .swatch-dot { width: 24px; height: 24px; }

.cta { margin-top: auto; padding-top: 4px; }
.cta-lg { margin-top: 0; padding-top: 0; }
.cta-sm .btn { min-height: 44px; font-size: 14px; padding: 6px 10px; }
.cta-lg .btn { min-height: 50px; font-size: 16px; }
.stepper {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 44px; border: 1.5px solid var(--blue); border-radius: 999px;
  background: var(--blue-soft); color: var(--blue-dark); font-weight: 700; font-size: 14px;
}
.cta-lg .stepper { min-height: 50px; font-size: 16px; }
.stepper span { min-width: 28px; text-align: center; }
.stepper button {
  width: 44px; align-self: stretch; border: 0; background: none; color: inherit;
  font-size: 20px; font-weight: 600; cursor: pointer; touch-action: manipulation;
}
.cta-lg .stepper button { width: 54px; font-size: 22px; }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }

@media (max-width: 359px) {
  .swatches-sm { gap: 2px; }
  .swatches-sm .swatch { min-width: 40px; height: 40px; }
  .swatches-sm .swatch-color .swatch-dot { width: 30px; height: 30px; }
}

/* Maker strip */
.maker { background: var(--tint); padding: 20px 0; }
.maker-inner { display: flex; align-items: center; gap: 14px; }
.maker-inner img { width: 48px; height: 48px; flex-shrink: 0; }
.maker h2 { font-size: 16px; }
.maker a { display: inline-flex; align-items: center; min-height: 44px; color: var(--blue); font-weight: 600; font-size: 14px; }

/* Breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; padding: 0; font-size: 13px; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs a:hover { color: var(--blue); }

/* PDP */
.pdp { padding-bottom: 28px; }
.pdp-grid { display: grid; gap: 14px; }
.pdp-gallery { position: relative; margin: 0 -14px; }
.gallery-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  background: var(--tint);
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1; max-height: 62vh; max-height: 46svh; }
.gallery-slide picture, .gallery-img { width: 100%; height: 100%; object-fit: cover; }
.gallery-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.gallery-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(15, 23, 42, .25); }
.gallery-dots span.is-active { background: var(--ink); }
.pdp-buy { display: grid; gap: 12px; align-content: start; }
.pdp-buy h1 { font-size: 22px; }
.pdp-tagline { color: var(--ink-soft); font-size: 15px; margin-top: -6px; }
.pdp-options { display: grid; gap: 8px; }
.pdp-perks { margin: 0; font-size: 13px; color: var(--ink-soft); }
.pdp-safety { margin: 0; font-size: 12px; color: var(--muted); }

.accordions { border-top: 1px solid var(--line); }
.accordions details { border-bottom: 1px solid var(--line); }
.accordions summary {
  list-style: none; cursor: pointer; padding: 14px 0; min-height: 52px;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 15px;
}
.accordions summary::-webkit-details-marker { display: none; }
.accordions summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--muted); }
.accordions details[open] summary::after { content: '−'; }
.accordions details > p, .accordions details > ul { color: var(--ink-soft); font-size: 14px; margin: 0 0 14px; }
.accordions details > p + p { margin-top: -6px; }
.accordions ul { padding-left: 18px; display: grid; gap: 4px; }
.accordions a { color: var(--blue); text-decoration: underline; }

/* Horizontal product rail */
/* Share */
.pdp-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pdp-title-row h1 { flex: 1; min-width: 0; }
.share { position: relative; flex: none; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; touch-action: manipulation;
}
.share-btn:hover { border-color: var(--ink); }
.share-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 220px; padding: 8px;
  display: grid; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
}
.share-menu[hidden] { display: none; }
.share-menu-title { margin: 0; padding: 6px 10px 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.share-menu a, .share-menu button {
  display: block; width: 100%; padding: 14px 10px; border: 0; border-radius: 8px; background: none;
  color: var(--ink); font: inherit; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer;
}
.share-menu a:hover, .share-menu button:hover { background: var(--tint); }

/* Ratings and reviews */
:root { --star: #f5a623; }
.stars {
  display: inline-block; font-size: 15px; line-height: 1; letter-spacing: 1px; white-space: nowrap;
  background: linear-gradient(90deg, var(--star) var(--pct, 0%), #d5dae3 var(--pct, 0%));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.card-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); padding: 6px 0; margin: -6px 0 -6px auto; align-self: center; }
.card-rating .stars { font-size: 13px; }
.pdp-rating { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); padding: 10px 0; margin: -10px 0; }
.pdp-rating .stars { font-size: 17px; }
.reviews { margin-top: 32px; margin-bottom: 12px; display: grid; gap: 16px; }
.reviews > * { max-width: 760px; }
.reviews-title { font-size: 20px; }
.reviews-empty { margin: 0; color: var(--muted); font-size: 15px; }
.reviews-head { display: grid; gap: 14px; }
.rating-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rating-big { font-size: 34px; line-height: 1; }
.rating-summary .stars { font-size: 20px; }
.rating-summary small { color: var(--muted); font-size: 14px; }
.rating-bars { display: grid; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 28px 1fr 24px; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--star); border-radius: 99px; }
.review-write summary { list-style: none; cursor: pointer; text-align: center; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.review-write summary::-webkit-details-marker { display: none; }
.review-write[open] summary { margin-bottom: 14px; }
.field-label { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.star-input { position: relative; display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input input[type='radio'] { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.star-input label { padding: 2px 4px; font-size: 36px; line-height: 1; color: #d5dae3; cursor: pointer; touch-action: manipulation; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--star); }
.star-input input:focus-visible + label { outline: 2px solid var(--blue); border-radius: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.review-list { display: grid; }
.review { display: grid; gap: 6px; padding: 16px 0; border-top: 1px solid var(--line); }
.review-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-body { margin: 0; color: var(--ink-soft); line-height: 1.6; white-space: pre-line; }
.review-meta { color: var(--muted); font-size: 13px; }
.review-meta .verified { color: var(--green); font-weight: 600; }

.rail-section { padding: 8px 0 32px; border-top: 1px solid var(--line); }
.rail-title { font-size: 18px; padding: 18px 0 12px; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 44%; gap: 10px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  max-width: 1200px; margin: 0 auto; padding: 0 14px; scroll-padding: 0 14px;
}
.rail::-webkit-scrollbar { display: none; }
.rail .card { scroll-snap-align: start; }

/* Content pages */
.page { padding: 18px 14px 40px; display: grid; gap: 14px; align-content: start; }
.page h1 { font-size: 24px; }
.page.center { justify-items: center; }
.about-mark { width: 56px; height: 56px; }
.prose { display: grid; gap: 12px; color: var(--ink-soft); font-size: 16px; line-height: 1.7; }
.page > .btn { justify-self: start; }
.page.center > .btn { justify-self: center; }
.page-foot-note { color: var(--muted); font-size: 14px; }
.page-foot-note a, .page a.inline { color: var(--blue); font-weight: 600; }
.page p.muted a { color: var(--blue); }
.notice { padding: 10px 14px; border-radius: 10px; background: #fef3c7; color: #92400e; font-size: 14px; font-weight: 600; }

.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 14px; font-weight: 600; }
.form label .muted { font-weight: 400; }
.form input, .form textarea, .promo-form input, .subscribe input {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff;
  font-size: 16px; font-weight: 400;
}
.form input:focus, .form textarea:focus, .promo-form input:focus, .subscribe input:focus { outline: none; border-color: var(--blue); }
.form-feedback { font-size: 14px; font-weight: 600; min-height: 1em; }
.form-feedback:empty { display: none; }
.form-feedback.ok { color: var(--green); }
.form-feedback.error { color: var(--red); }

.policy { padding: 16px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.policy h2 { font-size: 18px; }
.legal-updated { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.legal-intro { margin: 12px 0 8px; font-size: 16px; color: var(--ink); }
.legal .policy { margin-top: 12px; }
.legal .policy p, .legal .policy li { color: var(--ink-soft); line-height: 1.65; font-size: 15px; }
.legal .policy ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.legal a { color: var(--blue); text-decoration: underline; }
.legal-hub { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.legal-hub a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.legal-hub a:hover { border-color: var(--blue); }
.legal-hub span { font-size: 14px; color: var(--muted); }

.track-result { display: grid; gap: 12px; }
.card-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; gap: 8px; }
.card-box ul { margin: 0; padding-left: 18px; }
.track-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.track-step { padding: 8px; border-radius: 8px; background: var(--tint); color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; }
.track-step.done { background: var(--green-soft); color: var(--green); }
.alert { padding: 10px 14px; border-radius: 10px; background: #fee2e2; color: var(--red); font-weight: 600; font-size: 14px; }

.success { display: grid; gap: 12px; justify-items: center; text-align: center; padding-top: 16px; }
.success-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 26px; font-weight: 700; display: grid; place-items: center; }
.success-details { width: 100%; text-align: left; }
.success-actions { width: 100%; display: grid; gap: 8px; margin-top: 6px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--tint); padding: 22px 0 26px; }
.footer-inner { display: grid; gap: 16px; }
.subscribe label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.subscribe-row { display: flex; gap: 8px; }
.subscribe-row .btn { flex-shrink: 0; min-height: 48px; }
.subscribe .form-feedback { margin-top: 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 18px; font-size: 14px; font-weight: 600; }
.footer-links a, .footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-links a:hover { color: var(--blue); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: 13px; color: var(--muted); }
.footer-legal a:hover { color: var(--blue); }
.footer-copy { color: var(--muted); font-size: 12px; }

/* Overlay + side panels (menu and cart both slide in from the right, next to their triggers) */
.overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 42, .45);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s;
}
body.panel-open .overlay { opacity: 1; visibility: visible; transition: opacity .2s; }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: min(86vw, 380px);
  background: #fff; display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(15, 23, 42, .18);
  transform: translateX(100%); visibility: hidden;
  transition: transform .25s ease, visibility 0s .25s;
}
.panel.is-open { transform: none; visibility: visible; transition: transform .25s ease; }
.cart-panel { width: min(100vw, 420px); overflow-y: auto; }
.panel-scroll { flex: 1 1 auto; min-height: 150px; overflow-y: auto; overscroll-behavior: contain; }
.panel-scroll .panel-body { flex: none; overflow: visible; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: var(--header-h); padding: 0 6px 0 16px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.panel-title { font-size: 18px; font-weight: 700; }
.panel-title span { color: var(--muted); font-weight: 600; }
.panel-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px; }
.panel-foot {
  border-top: 1px solid var(--line); padding: 12px 16px calc(14px + var(--safe-bottom));
  display: grid; gap: 10px; flex-shrink: 0;
}

.menu-links { display: flex; flex-direction: column; align-items: stretch; text-align: left; padding: 8px 16px 24px; overflow-y: auto; }
.menu-links a { display: block; width: 100%; padding: 12px 0; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--tint); }
.menu-links a.is-active { color: var(--blue); }
.menu-label { width: 100%; margin-top: 16px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.ship-meter { padding: 10px 16px; background: var(--blue-soft); flex-shrink: 0; }
.ship-meter p { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.ship-track { height: 6px; border-radius: 999px; background: #cfe0ff; overflow: hidden; }
.ship-fill { height: 100%; width: 0; background: var(--blue); transition: width .3s ease; }
.ship-meter.is-done { background: var(--green-soft); }
.ship-meter.is-done .ship-fill { background: var(--green); }

.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--tint); }
.line:last-child { border-bottom: 0; }
.line img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--tint); }
.line-title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.line-meta { font-size: 13px; color: var(--muted); }
.line-price { font-weight: 700; font-size: 14px; }
.line .stepper { display: inline-flex; min-height: 44px; margin-top: 6px; font-size: 14px; gap: 2px; }
.line .stepper button { width: 44px; font-size: 20px; }
.line .stepper span { min-width: 22px; text-align: center; }
.empty-cart { text-align: center; padding: 40px 0; display: grid; gap: 14px; justify-items: center; color: var(--muted); }

.upsells { padding: 10px 16px; border-top: 1px solid var(--line); }
.upsells-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.upsell-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.upsell-row::-webkit-scrollbar { display: none; }
.upsell {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 6px; border: 1px solid var(--line); border-radius: 12px; max-width: 240px;
}
.upsell img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.upsell-text { font-size: 12px; line-height: 1.3; min-width: 0; }
.upsell-text strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.upsell .btn { min-height: 44px; padding: 4px 14px; font-size: 14px; }

.promo summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--blue); list-style: none; min-height: 44px; display: flex; align-items: center; }
.promo summary::-webkit-details-marker { display: none; }
.promo-form { display: flex; gap: 8px; margin-top: 8px; }
.promo-form input { min-height: 44px; }
.promo-msg { font-size: 13px; margin-top: 4px; color: var(--muted); }
.promo-msg:empty { display: none; }
.promo-msg.ok { color: var(--green); }
.promo-msg.error { color: var(--red); }

.totals { margin: 0; display: grid; gap: 4px; font-size: 14px; }
.totals > div { display: flex; justify-content: space-between; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; }
.totals .total-row { font-size: 17px; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 2px; }
.totals .total-row dt { color: var(--ink); font-weight: 700; }
.totals .total-row dd { font-weight: 800; }
.checkout-msg { font-size: 13px; color: var(--red); }
.checkout-msg:empty { display: none; }
.fine-print { font-size: 12px; color: var(--muted); text-align: center; }
.fine-print a { text-decoration: underline; padding: 12px 0; }

.cart-page { display: grid; gap: 12px; }
.cart-page .ship-meter { border-radius: var(--radius); }
.cart-summary { display: grid; gap: 10px; padding-top: 6px; }

/* Sticky cart bar: the one-tap path from browsing to Stripe */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .08);
  animation: bar-in .25s ease;
}
@keyframes bar-in { from { transform: translateY(100%); } to { transform: none; } }
.cart-bar.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: translateY(-4px); } }
.cart-bar-summary {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  border: 0; background: none; padding: 4px; text-align: left; cursor: pointer;
}
.cart-bar-count {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.cart-bar-text { min-width: 0; display: grid; line-height: 1.25; }
.cart-bar-text strong { font-size: 16px; }
.cart-bar-text small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-bar .btn { min-height: 46px; padding: 0 24px; font-size: 16px; flex-shrink: 0; }
body.no-cart-bar .cart-bar { display: none !important; }

.toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-bottom)); z-index: 95;
  transform: translate(-50%, 8px); max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 25px rgba(15, 23, 42, .25);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ≥ 768px: tablet */
@media (min-width: 768px) {
  :root { --header-h: 64px; }
  .container { padding: 0 24px; }
  .header-row { padding: 0 16px 0 24px; gap: 12px; }
  .brand img { height: 46px; }
  .search { max-width: 560px; margin: 0 auto; }
  .hero { padding: 28px 0 8px; }
  .hero h1 { font-size: 30px; }
  .hero-sub { display: block; color: var(--muted); margin-top: 6px; max-width: 60ch; }
  .chips { margin: 0; padding: 2px 0; scroll-padding: 0; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 18px; }
  .card-title { font-size: 15px; }
  .rail { grid-auto-columns: 30%; padding: 0 24px; gap: 18px; }
  .review-write summary { width: auto; justify-self: start; padding: 0 28px; display: inline-flex; }
  .pdp-gallery { margin: 0; }
  .gallery-track { border-radius: 16px; }
  .gallery-slide { max-height: none; }
  .page { padding: 28px 24px 56px; }
  .page h1 { font-size: 30px; }
  .track-steps { grid-template-columns: repeat(4, 1fr); }
  .footer-inner { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 32px; }
  .footer-links a { min-height: 48px; }
  .subscribe-row { max-width: 560px; }
  .footer-copy { grid-column: 1 / -1; }
  .cart-bar {
    left: auto; right: 20px; bottom: 20px; width: 400px;
    border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
  }
  body.has-cart-bar.cart-bar-on .site-footer { padding-bottom: 114px; }
}

/* ≥ 1024px: desktop */
@media (min-width: 1024px) {
  .menu-btn { display: none; }
  .desktop-nav { display: flex; gap: 20px; font-size: 14px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
  .desktop-nav a:hover, .desktop-nav a.is-active { color: var(--blue); }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rail { grid-auto-columns: calc((100% - 54px) / 4); }
  .pdp-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 44px; align-items: start; }
  .pdp-gallery { position: sticky; top: calc(var(--header-h) + 16px); }
  .pdp-buy h1 { font-size: 30px; }
  .card-media img { transition: transform .35s ease; }
  .card:hover .card-media img { transform: scale(1.03); }
}
