/* ==========================================================================
   Storefront (buyer-facing shop) — loaded after app.css, only on /s/:slug pages.
   Each shop keeps its own brand: the whole primary scale below is derived from
   the tenant's accent (--color-primary-500, set inline in <head> together with
   --sf-on-brand, the readable text colour on that accent). Shared components
   from app.css — buttons, focus rings, badges, links — follow automatically.
   ========================================================================== */

:root {
  --sf-brand: var(--color-primary-500);
  --sf-on-brand: #fff;
  /* Fallback for browsers without color-mix(): a flat, still-legible scale. */
  --color-primary-600: var(--sf-brand);
  --color-primary-700: var(--sf-brand);
  --color-primary-800: var(--sf-brand);
  --color-primary-25: #fafbfc;
  --color-primary-50: #f5f7fa;
  --color-primary-100: #eceff4;
  --color-primary-200: #dde2ea;
  --color-link: var(--gray-900);
  --sf-radius: 20px;
}
@supports (color: color-mix(in oklab, red, blue)) {
  :root {
    --color-primary-25: color-mix(in oklab, var(--sf-brand) 4%, #fff);
    --color-primary-50: color-mix(in oklab, var(--sf-brand) 8%, #fff);
    --color-primary-100: color-mix(in oklab, var(--sf-brand) 16%, #fff);
    --color-primary-200: color-mix(in oklab, var(--sf-brand) 30%, #fff);
    --color-primary-300: color-mix(in oklab, var(--sf-brand) 50%, #fff);
    --color-primary-400: color-mix(in oklab, var(--sf-brand) 76%, #fff);
    --color-primary-600: color-mix(in oklch, var(--sf-brand) 90%, #000);
    --color-primary-700: color-mix(in oklch, var(--sf-brand) 76%, #000);
    --color-primary-800: color-mix(in oklch, var(--sf-brand) 62%, #000);
    --color-primary-900: color-mix(in oklch, var(--sf-brand) 50%, #000);
    --color-primary-wash: color-mix(in srgb, var(--sf-brand) 18%, transparent);
    --color-link: color-mix(in oklch, var(--sf-brand) 58%, #000);
    --ring: 0 0 0 4px color-mix(in srgb, var(--sf-brand) 22%, transparent);
  }
}

.store-body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background-color: #fff; background-repeat: no-repeat; }
@supports (color: color-mix(in srgb, red, blue)) {
  .store-body {
    background-image:
      radial-gradient(ellipse 70% 560px at 0% 0%, color-mix(in srgb, var(--sf-brand) 18%, #fff), transparent),
      radial-gradient(ellipse 60% 520px at 100% 140px, color-mix(in srgb, var(--sf-brand) 10%, #fff), transparent);
  }
}
.store-body .btn:not(.btn-secondary):not(.btn-ghost):not(.btn-soft):not(.btn-danger):not(.btn-white):not(.btn-dark) { --btn-fg: var(--sf-on-brand); }
.store-body .btn-soft { --btn-fg: var(--color-primary-800); }
.sf-icon { flex: none; }
/* max() keeps content clear of the iPhone notch / rounded corners in landscape (viewport-fit=cover). */
.sf-wrap { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: max(24px, env(safe-area-inset-left), env(safe-area-inset-right)); }
.store-container { flex: 1 0 auto; width: 100%; max-width: var(--container); margin: 0 auto; padding: 24px 24px 96px; }

/* ---------------------------------------------------------------- Header */

.sf-header {
  position: sticky; top: 0; z-index: 40;
  background: rgb(255 255 255 / 0.84);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--color-border-subtle);
}
.sf-header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.sf-brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; color: var(--gray-900); }
.sf-brand:hover { color: var(--gray-900); }
.store-logo { width: 38px; height: 38px; flex: none; border-radius: 11px; object-fit: cover; box-shadow: 0 0 0 1px var(--color-line); }
.sf-logo-fallback { display: grid; place-items: center; font-size: 1.0625rem; font-weight: 750; color: var(--sf-on-brand); background: var(--sf-brand); }
.store-name { font-size: 1.0625rem; font-weight: 720; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-nav { display: flex; align-items: center; gap: 2px; }
.sf-nav a { padding: 8px 12px; border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 550; color: var(--gray-600); }
.sf-nav a:hover { color: var(--gray-900); background: var(--gray-100); }
.sf-header-search {
  display: flex; align-items: center; gap: 8px; flex: 0 1 260px; height: 40px; margin-left: auto; padding: 0 14px;
  border-radius: 999px; background: var(--gray-100); color: var(--gray-500);
  transition: background-color var(--dur-2) ease, box-shadow var(--dur-2) ease, flex-basis var(--dur-3) var(--ease-out);
}
.sf-header-search:focus-within { flex-basis: 320px; background: #fff; box-shadow: 0 0 0 1px var(--color-primary-400), var(--ring); color: var(--gray-700); }
.sf-header-search input { flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; border: 0; box-shadow: none !important; background: transparent; font-size: var(--text-sm); }
.sf-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.sf-header-search + .sf-actions { margin-left: 0; }
.sf-nav + .sf-header-search { margin-left: auto; }
.sf-header-link { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: var(--radius-sm); font-size: var(--text-sm); font-weight: 600; color: var(--gray-600); }
.sf-header-link:hover { color: var(--gray-900); background: var(--gray-100); }
.sf-menu-btn { display: none; }
.sf-sheet { display: none; }

/* ---------------------------------------------------------------- Hero */

.sf-hero {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 32px; color: var(--sf-on-brand);
  background: var(--sf-brand);
  background: linear-gradient(135deg, var(--sf-brand) 0%, color-mix(in oklch, var(--sf-brand) 84%, #fff) 100%);
  box-shadow: 0 28px 56px -32px color-mix(in srgb, var(--sf-brand) 80%, transparent);
}
/* Banner pictures are cropped to 16:5 (phones: 2:1) when uploaded, so the box below matches them exactly. */
.sf-hero.has-banner { aspect-ratio: 16 / 5; background: var(--gray-100); box-shadow: 0 24px 48px -30px rgb(16 24 40 / 0.45); }
/* No min-height next to aspect-ratio: browsers turn it into a minimum *width* and the page overflows. */
.sf-hero.is-plain { min-height: 352px; }
/* No banner uploaded: a colour field in the shop's accent carries the picks. */
.sf-hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sf-hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 110% at 100% 0%, color-mix(in srgb, var(--sf-on-brand) 24%, transparent), transparent 70%);
}
.sf-hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--sf-on-brand) 30%, transparent) 1.2px, transparent 1.7px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(110deg, transparent 40%, #000 100%); mask-image: linear-gradient(110deg, transparent 40%, #000 100%);
}

.sf-banners { position: absolute; inset: 0; }
/* Two galleries: the desktop one is hidden on phones, the phone one everywhere else. */
.sf-banners--phone { display: none; }
/* A hero only has something to show on the screens its galleries (or picks) are for. */
.sf-hero:not(.show-pc) { display: none; }
.sf-banner-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.sf-banner-track::-webkit-scrollbar { display: none; }
.sf-banner-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.sf-banner-slide picture { display: block; width: 100%; height: 100%; }
.sf-banner-slide img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.sf-banner-dots { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 999px; background: rgb(16 24 40 / 0.38); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sf-banner-dot { position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgb(255 255 255 / 0.55); cursor: pointer; transition: width var(--dur-3) var(--ease-out), background-color var(--dur-2) ease; }
.sf-banner-dot::after { content: ""; position: absolute; inset: -9px -3px; }
.sf-banner-dot.is-active { width: 22px; background: #fff; }

/* "Picked for you" floats over the picture (desktop only). */
.sf-showcase { position: absolute; z-index: 2; top: 50%; right: 28px; transform: translateY(-50%); width: min(360px, 38%); display: grid; gap: 10px; }
.sf-showcase-label { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 0.71875rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: rgb(16 24 40 / 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sf-mini {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border-radius: 16px;
  color: var(--gray-900); background: rgb(255 255 255 / 0.96); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.5), 0 14px 28px -14px rgb(16 24 40 / 0.35);
  transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) ease;
}
.sf-mini:hover { color: var(--gray-900); transform: translateX(-4px); box-shadow: 0 0 0 1px var(--color-primary-200), var(--shadow-lg); }
.sf-mini-thumb { width: 52px; height: 52px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: var(--color-primary-50); }
.sf-mini-thumb img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.sf-mini-thumb .product-initial { width: 100%; height: 100%; border-radius: 0; background: transparent; box-shadow: none; font-size: 1.25rem; }
.sf-mini-info { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.sf-mini-info b { font-size: var(--text-sm); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-mini-info small { font-size: var(--text-xs); color: var(--gray-500); }
.sf-mini-price { font-size: var(--text-sm); font-weight: 720; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Trust strip */

.sf-trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--color-line); }
.sf-trust-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 18px 20px; min-width: 0; }
.sf-trust-item + .sf-trust-item::before { content: ""; position: absolute; left: 0; top: 24%; bottom: 24%; width: 1px; background: var(--color-border-subtle); }
.sf-trust-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; color: var(--color-primary-700); background: var(--color-primary-50); }
.sf-trust-item b { display: block; font-size: var(--text-sm); font-weight: 680; line-height: 1.3; }
.sf-trust-item small { display: block; font-size: var(--text-xs); line-height: 1.4; color: var(--gray-500); }

/* ---------------------------------------------------------------- Section heads & categories */

.sf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 56px 0 20px; }
.sf-head h2 { margin: 6px 0 0; font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2rem); font-weight: 760; letter-spacing: -0.03em; }
.sf-head-sub { margin: 6px 0 0; font-size: var(--text-sm); color: var(--gray-500); }
.sf-head-center { justify-content: center; text-align: center; }
.sf-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-primary-700); }
.sf-cats { display: flex; gap: 8px; overflow-x: auto; margin: -4px 0 20px; padding: 4px 2px 6px; scrollbar-width: none; }
.sf-cats::-webkit-scrollbar { display: none; }
.sf-cat { flex: none; min-height: 38px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; font-size: var(--text-sm); font-weight: 600; color: var(--gray-700); background: #fff; box-shadow: inset 0 0 0 1px var(--color-border); transition: background-color var(--dur-2) ease, color var(--dur-2) ease, box-shadow var(--dur-2) ease; }
.sf-cat:hover { color: var(--gray-900); box-shadow: inset 0 0 0 1px var(--color-border-strong); }
.sf-cat.active { color: var(--sf-on-brand); background: var(--sf-brand); box-shadow: none; }

/* ---------------------------------------------------------------- Product cards */

.sf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.sf-card {
  display: flex; flex-direction: column; min-width: 0; padding: 8px; border-radius: var(--sf-radius);
  color: inherit; background: #fff; box-shadow: 0 0 0 1px var(--color-line), var(--shadow-card);
  transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) ease;
}
.sf-card:hover { color: inherit; transform: translateY(-4px); box-shadow: 0 0 0 1px var(--color-primary-200), var(--shadow-lg); }
.sf-card:focus-visible { outline-offset: 3px; }
/* The picture sits in its own rounded tile inside the card, like a product shot on a soft stage. */
.sf-card-media { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; border-radius: calc(var(--sf-radius) - 8px); background: var(--color-primary-50); }
.sf-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform 0.6s var(--ease-out); }
.sf-card:hover .sf-card-media img { transform: scale(1.05); }
.sf-card-media .product-initial { width: 72px; height: 72px; border-radius: 22px; font-size: 1.875rem; }
.sf-card-soldout { position: absolute; inset: 0; display: grid; place-items: center; background: rgb(255 255 255 / 0.62); backdrop-filter: grayscale(1); -webkit-backdrop-filter: grayscale(1); }
.sf-card-soldout span { padding: 6px 14px; border-radius: 999px; font-size: var(--text-xs); font-weight: 700; color: #fff; background: rgb(16 24 40 / 0.82); }
.sf-card.is-out .sf-card-name { color: var(--gray-500); }
.sf-card-body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 12px 8px 6px; }
.sf-card-tags { position: absolute; top: 8px; left: 8px; z-index: 1; display: flex; flex-wrap: wrap; gap: 4px; max-width: calc(100% - 16px); }
.sf-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 0.6875rem; font-weight: 700; box-shadow: 0 2px 8px -2px rgb(16 24 40 / 0.18); }
.sf-tag-hot { color: #b93815; background: #fef3f2; box-shadow: inset 0 0 0 1px #fecdca, 0 2px 8px -2px rgb(16 24 40 / 0.18); }
.sf-tag-low { color: var(--color-warning); background: var(--color-warning-bg); box-shadow: inset 0 0 0 1px var(--color-warning-border), 0 2px 8px -2px rgb(16 24 40 / 0.18); }
/* Flash sale: the struck-through normal price and the "ends in" countdown. */
.sf-price small s, .variant-price s { color: var(--gray-400); font-weight: 500; }
.variant-price s { display: block; font-size: 0.75rem; text-align: right; }
.sf-eyebrow-flash { color: #b93815; }
.sf-flash-timer { gap: 4px; color: #b93815; font-weight: 600; }
.sf-flash-timer b { font-variant-numeric: tabular-nums; }
.sf-card-flash { box-shadow: 0 0 0 1px #fecdca, var(--shadow-card); }
.variant-flash { color: #b93815; font-weight: 650; }
.sf-card-cat { font-size: 0.71875rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-card-name { margin: 0; font-size: 0.96875rem; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sf-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: var(--text-xs); color: var(--gray-500); }
.sf-auto { display: inline-flex; align-items: center; gap: 3px; font-weight: 650; color: var(--color-success); }
.sf-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.sf-price { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.sf-price small { font-size: 0.6875rem; color: var(--gray-500); }
.sf-price b { font-size: 1.125rem; font-weight: 780; letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--color-link); }
.sf-card-btn {
  display: inline-flex; align-items: center; gap: 5px; flex: none; height: 34px; padding: 0 12px;
  border-radius: 999px; font-size: var(--text-xs); font-weight: 700; color: var(--color-primary-800); background: var(--color-primary-50);
  transition: background-color var(--dur-2) ease, color var(--dur-2) ease;
}
.sf-card-btn .sf-icon { transition: transform var(--dur-2) var(--ease-out); }
.sf-card:hover .sf-card-btn { color: var(--sf-on-brand); background: var(--sf-brand); }
.sf-card:hover .sf-card-btn .sf-icon { transform: translateX(2px); }
@media (hover: none) { .sf-card:hover { transform: none; } .sf-card:hover .sf-card-media img { transform: none; } }

.sf-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 56px 20px; border-radius: 24px; background: var(--gray-50); box-shadow: inset 0 0 0 1px var(--color-border-subtle); }
.sf-empty-inline { padding: 28px 16px; margin-top: 20px; }
.sf-empty-icon { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 16px; color: var(--color-primary-700); background: #fff; box-shadow: inset 0 0 0 1px var(--color-border); }
.sf-empty h3 { margin: 0 0 4px; font-size: 1.0625rem; }
.sf-empty p { margin: 0 0 16px; max-width: 42ch; font-size: var(--text-sm); color: var(--gray-500); }

/* ---------------------------------------------------------------- How to buy */

.sf-steps-wrap { margin-top: 32px; }
.sf-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sf-steps li { position: relative; padding: 22px; border-radius: var(--sf-radius); background: #fff; box-shadow: 0 0 0 1px var(--color-line); }
.sf-step-num { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 13px; color: var(--color-primary-700); background: var(--color-primary-50); }
.sf-step-count { position: absolute; top: 22px; right: 22px; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; color: var(--gray-300); }
.sf-steps h3 { margin: 0 0 4px; font-size: 1rem; }
.sf-steps p { margin: 0; font-size: var(--text-sm); line-height: 1.55; color: var(--gray-500); }

/* ---------------------------------------------------------------- Footer & floating chat */

.sf-footer { margin-top: auto; padding: 48px 0 24px; border-top: 1px solid var(--color-border-subtle); background: var(--gray-25); }
.sf-footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.sf-footer-brand p { margin: 14px 0 0; max-width: 36ch; font-size: var(--text-sm); line-height: 1.65; color: var(--gray-500); }
.sf-footer h2 { margin: 0 0 12px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-400); }
.sf-footer nav, .sf-footer-grid > div:last-child { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sf-footer-grid a:not(.sf-brand) { display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; font-size: var(--text-sm); color: var(--gray-600); overflow-wrap: anywhere; }
.sf-footer-grid a:not(.sf-brand):hover { color: var(--gray-900); }
.sf-footer-muted { margin: 0; font-size: var(--text-sm); color: var(--gray-500); }
.sf-footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--color-border-subtle); font-size: var(--text-xs); color: var(--gray-500); }

.sf-fab {
  position: fixed; right: 20px; bottom: calc(20px + var(--safe-b)); z-index: 35;
  display: inline-flex; align-items: center; height: 54px; padding: 0 15px; overflow: hidden;
  border-radius: 999px; color: #fff; background: #25d366; font-size: var(--text-sm); font-weight: 700;
  box-shadow: 0 12px 28px -8px rgb(37 211 102 / 0.6);
  transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) ease;
}
.sf-fab span { max-width: 0; opacity: 0; white-space: nowrap; transition: max-width var(--dur-3) var(--ease-out), opacity var(--dur-2) ease, margin var(--dur-3) var(--ease-out); }
.sf-fab:hover, .sf-fab:focus-visible { color: #fff; transform: translateY(-2px); }
.sf-fab:hover span, .sf-fab:focus-visible span { max-width: 160px; opacity: 1; margin-left: 8px; }

/* Phone-only furniture; the (max-width: 767px) block below switches these on. */
.sf-quick, .sf-tabbar, .pdx-back { display: none; }

/* ---------------------------------------------------------------- Product page */

.sf-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 4px 0 20px; font-size: var(--text-sm); color: var(--gray-500); }
.sf-crumbs a { color: var(--gray-600); }
.sf-crumbs a:hover { color: var(--gray-900); }
.sf-crumbs .sf-icon { color: var(--gray-300); }
.sf-crumbs span { max-width: 36ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gray-900); font-weight: 600; }

.pdx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.pdx-media-col { position: sticky; top: 92px; min-width: 0; }
.pdx-media { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; border-radius: 32px; background: var(--color-primary-50); box-shadow: 0 0 0 1px var(--color-line); }
@supports (color: color-mix(in srgb, red, blue)) { .pdx-media { background: linear-gradient(160deg, color-mix(in srgb, var(--sf-brand) 14%, #fff), var(--color-primary-50)); } }
.pdx-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pdx-media .product-initial { width: 120px; height: 120px; border-radius: 34px; font-size: 3rem; }
.pdx-perks { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; }
.pdx-perks li { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--color-line); min-width: 0; }
.pdx-perks li > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--color-primary-700); background: var(--color-primary-50); }
.pdx-perks b { display: block; font-size: var(--text-sm); line-height: 1.3; }
.pdx-perks small { display: block; font-size: var(--text-xs); line-height: 1.45; color: var(--gray-500); }

/* The purchase controls live in one white card, like a product sheet in a shopping app. */
.pdx-buy { min-width: 0; padding: 32px; border-radius: 32px; background: #fff; box-shadow: 0 0 0 1px var(--color-line), 0 32px 60px -38px rgb(16 24 40 / 0.3); }
.pdx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pdx-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: var(--text-xs); font-weight: 650; color: var(--gray-700); background: var(--gray-100); }
.pdx-chip-hot { color: #b93815; background: #fef3f2; }
.pdx-chip-low { color: var(--color-warning); background: var(--color-warning-bg); }
.pdx-chip-out { color: var(--color-danger); background: var(--color-danger-bg); }
.pdx-chip-ok { color: var(--color-success); background: var(--color-success-bg); }
.pdx-chip-ok i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pdx-buy h1 { margin: 0 0 12px; font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); font-weight: 760; letter-spacing: -0.035em; line-height: 1.1; overflow-wrap: anywhere; }
.pdx-lead { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 16px; font-size: 0.96875rem; line-height: 1.6; white-space: pre-line; color: var(--gray-600); }
.pdx-sub { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 22px; font-size: var(--text-sm); color: var(--gray-600); }
.pdx-sub span { display: inline-flex; align-items: center; gap: 6px; }
.pdx-sub .sf-icon { color: var(--color-primary-600); }
.pdx-price { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--color-border-subtle); }
.pdx-price small { display: block; font-size: var(--text-xs); font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gray-500); }
.pdx-price b { display: block; font-size: clamp(2rem, 1.6rem + 1.2vw, 2.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--color-link); }
.pdx-from { padding: 4px 10px; border-radius: 999px; font-size: var(--text-xs); font-weight: 650; color: var(--color-primary-800); background: var(--color-primary-50); }
.pdx-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.pdx-field-head, .pdx-legend { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 0; margin-bottom: 10px; font-size: var(--text-sm); font-weight: 650; color: var(--gray-800); }
.pdx-legend { margin-bottom: 6px; font-size: 0.8125rem; }

.pdx .variant-list { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 22px; }
.pdx .variant-option { gap: 12px; padding: 13px 14px; border-radius: 14px; }
.pdx .variant-option input { position: absolute; opacity: 0; pointer-events: none; }
.variant-check { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; color: transparent; background: #fff; box-shadow: inset 0 0 0 1.5px var(--gray-300); transition: background-color var(--dur-2) ease, box-shadow var(--dur-2) ease, color var(--dur-2) ease; }
.variant-option.selected .variant-check { color: var(--sf-on-brand); background: var(--sf-brand); box-shadow: none; }
.variant-info { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.variant-name { font-size: 0.9375rem; font-weight: 650; }
.variant-stock { font-size: var(--text-xs); color: var(--gray-500); }
.variant-price { font-size: 0.9375rem; font-weight: 720; white-space: nowrap; font-variant-numeric: tabular-nums; }

.pdx-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; margin-bottom: 20px; }
.pdx-field label { margin-bottom: 6px; }
.pdx-stepper { display: inline-flex; align-items: center; height: 46px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--color-border-strong); }
.pdx-stepper button { width: 44px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--gray-700); cursor: pointer; }
.pdx-stepper button:hover:not(:disabled) { background: var(--gray-100); }
.pdx-stepper button:disabled { color: var(--gray-300); cursor: not-allowed; }
.pdx-stepper input { width: 52px; min-height: 0; height: 46px; padding: 0; border: 0; border-radius: 0; box-shadow: none !important; background: transparent; text-align: center; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.pdx-stepper input::-webkit-outer-spin-button, .pdx-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pdx-seg { display: flex; gap: 3px; height: 46px; padding: 3px; border-radius: 12px; background: var(--gray-100); }
.pdx-seg label { position: relative; flex: 1; margin: 0; min-width: 0; }
.pdx-seg input { position: absolute; opacity: 0; pointer-events: none; }
.pdx-seg span { display: grid; place-items: center; height: 100%; padding: 0 6px; border-radius: 9px; font-size: var(--text-sm); font-weight: 650; color: var(--gray-600); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color var(--dur-2) ease, color var(--dur-2) ease, box-shadow var(--dur-2) ease; }
.pdx-seg input:checked + span { color: var(--gray-900); background: #fff; box-shadow: var(--shadow-sm); }
.pdx-seg input:disabled + span { opacity: 0.4; cursor: not-allowed; }
.pdx-seg input:focus-visible + span { outline: 2px solid var(--sf-brand); outline-offset: -2px; }

.pdx-checkout { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 12px; padding-top: 20px; border-top: 1px solid var(--color-border-subtle); }
.pdx-total { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pdx-total span { font-size: var(--text-xs); font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gray-500); }
.pdx-total b { font-size: 1.875rem; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pdx-checkout .btn { flex: 1; max-width: 280px; min-height: 54px; border-radius: 999px; font-size: 1rem; box-shadow: 0 14px 24px -14px color-mix(in srgb, var(--sf-brand) 90%, transparent); }
.pdx-note { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; font-size: var(--text-sm); color: var(--gray-600); }
.pdx-note .sf-icon { margin-top: 2px; color: var(--color-primary-600); }
.pdx-cta { display: grid; gap: 10px; }
.pdx-cta .btn { border-radius: 999px; }
.pdx-help { margin: 12px 0 0; font-size: var(--text-xs); color: var(--gray-500); text-align: center; }
.pdx .btn:disabled { opacity: 1; background: var(--gray-100); color: var(--gray-400); box-shadow: none; border-color: transparent; }

.pdx-info { margin-top: 48px; padding: 28px 32px 32px; border-radius: 32px; background: #fff; box-shadow: 0 0 0 1px var(--color-line); }
.pdx-tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.pdx-tabbar { display: flex; gap: 2px; width: fit-content; max-width: 100%; padding: 3px; overflow-x: auto; border-radius: 12px; background: var(--gray-100); scrollbar-width: none; }
.pdx-tabbar::-webkit-scrollbar { display: none; }
.pdx-tabbar label { flex: none; margin: 0; padding: 8px 16px; border-radius: 9px; font-size: var(--text-sm); font-weight: 650; white-space: nowrap; color: var(--gray-600); cursor: pointer; transition: background-color var(--dur-2) ease, color var(--dur-2) ease, box-shadow var(--dur-2) ease; }
.pdx-tabbar label:hover { color: var(--gray-900); }
.pdx-tabs:has(#pdx-tab-desc:checked) label[for="pdx-tab-desc"],
.pdx-tabs:has(#pdx-tab-terms:checked) label[for="pdx-tab-terms"],
.pdx-tabs:has(#pdx-tab-how:checked) label[for="pdx-tab-how"] { color: var(--gray-900); background: #fff; box-shadow: var(--shadow-sm); }
.pdx-tabs:has(input:focus-visible) .pdx-tabbar { outline: 2px solid var(--sf-brand); outline-offset: 2px; }
.pdx-panel { display: none; max-width: 780px; padding: 22px 2px 0; }
.pdx-tabs:has(#pdx-tab-desc:checked) .pdx-panel-desc,
.pdx-tabs:has(#pdx-tab-terms:checked) .pdx-panel-terms,
.pdx-tabs:has(#pdx-tab-how:checked) .pdx-panel-how { display: block; }
.prose { margin: 0; font-size: 0.96875rem; line-height: 1.8; white-space: pre-wrap; color: var(--gray-700); }
.terms-box { padding: 16px 18px; border-radius: 14px; background: var(--gray-50); font-size: var(--text-sm); line-height: 1.75; white-space: pre-wrap; color: var(--gray-700); box-shadow: inset 0 0 0 1px var(--color-border-subtle); }
.pdx-panel-title { margin: 22px 0 10px; font-size: 1rem; }
.pdx-how { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin: 0; padding: 0; }
.pdx-how li { display: flex; gap: 12px; align-items: flex-start; }
.pdx-how li > span { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; font-size: var(--text-sm); font-weight: 750; color: var(--color-primary-800); background: var(--color-primary-50); }
.pdx-how b { display: block; font-size: 0.9375rem; }
.pdx-how small { display: block; margin-top: 2px; font-size: var(--text-sm); line-height: 1.55; color: var(--gray-500); }

.buy-bar { display: none; }

/* ---------------------------------------------------------------- Order, account, auth-ish pages */

.sf-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 20px; }
.sf-page-head h1 { margin: 6px 0 0; }
.order-banner { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 16px 20px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--color-line); }
.order-banner > div:not(.order-banner-amount) { flex: 1; min-width: 0; }
.order-banner-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 13px; color: var(--gray-600); background: var(--gray-100); }
.order-banner-title { font-size: 1rem; font-weight: 700; }
.order-banner-body { font-size: var(--text-sm); color: var(--gray-600); }
.order-banner-amount { margin-left: auto; font-size: 1.375rem; font-weight: 780; letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-banner.tone-success { background: var(--color-success-bg); box-shadow: inset 0 0 0 1px var(--color-success-border); }
.order-banner.tone-success .order-banner-icon { color: #fff; background: var(--color-success-solid); }
.order-banner.tone-warning { background: var(--color-warning-bg); box-shadow: inset 0 0 0 1px var(--color-warning-border); }
.order-banner.tone-warning .order-banner-icon { color: #fff; background: var(--color-warning-solid); }
.order-banner.tone-info { background: var(--color-primary-25); box-shadow: inset 0 0 0 1px var(--color-primary-100); }
.order-banner.tone-info .order-banner-icon { color: var(--sf-on-brand); background: var(--sf-brand); }
.sf-order-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sf-order-summary { position: sticky; top: 92px; }
.sf-timer { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 5px 12px; border-radius: 999px; font-size: var(--text-sm); color: var(--color-warning); background: var(--color-warning-bg); }
.sf-timer b { font-variant-numeric: tabular-nums; }
.sf-cred { display: grid; gap: 8px; justify-items: start; }
.sf-cred-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: var(--text-sm); }
.sf-cred-head span { color: var(--gray-500); }
.sf-cred .credential { width: 100%; }
.sf-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sf-lines li { display: flex; justify-content: space-between; gap: 12px; font-size: var(--text-sm); }
.sf-lines li > span { display: flex; flex-direction: column; min-width: 0; }
.sf-lines li small { color: var(--gray-500); }
.sf-lines li > b { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Contents of a bundle, tucked under its package line. */
.sf-lines li.sf-line-sub { margin-top: -8px; padding-left: 4px; }
.sf-total-line { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 8px; padding-top: 14px; border-top: 1px dashed var(--color-border-strong); }
.sf-total-line b { font-size: 1.25rem; font-weight: 780; font-variant-numeric: tabular-nums; }

.buyer-account-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 24px; }
.buyer-account-head h1 { margin: 6px 0 4px; }
.buyer-account-head p { margin: 0; color: var(--gray-600); }
.buyer-account-head form { margin: 0; }
.data-row-icon.is-in { color: var(--color-success); background: var(--color-success-bg); }
.data-row-icon.is-out { color: var(--gray-600); background: var(--gray-100); }

.sf-narrow { width: 100%; max-width: 460px; margin: 24px auto 0; }
.sf-narrow .auth-icon { margin-bottom: 16px; }
.sf-or { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; font-size: var(--text-xs); color: var(--gray-500); }
.sf-or::before, .sf-or::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
.mono-input { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.02em; }
.sf-err-icon { margin: 0 auto 16px; }
.sf-hold-logo { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; font-size: 1.5rem; }

/* ---------------------------------------------------------------- Responsive */

@media (max-width: 1199px) {
  /* Search stays in the header from tablet up; this width range makes room for it. */
  .sf-nav a { white-space: nowrap; padding-inline: 10px; }
  .sf-header-search { flex-basis: 210px; }
  .sf-header-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

@media (max-width: 1023px) {
  .sf-nav, .sf-header-link { display: none; }
  .sf-header-search { flex: 1 1 auto; max-width: 440px; margin-left: auto; }
  .sf-actions { margin-left: 0; }
  .sf-menu-btn { display: inline-grid; }
  .sf-sheet {
    display: block; position: fixed; top: 68px; left: 0; right: 0; bottom: 0; z-index: 39;
    overflow-y: auto; overscroll-behavior: contain; background: rgb(255 255 255 / 0.98);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity var(--dur-2) ease, transform var(--dur-3) var(--ease-out), visibility 0s linear var(--dur-3);
  }
  .sf-sheet.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity var(--dur-2) ease, transform var(--dur-3) var(--ease-out), visibility 0s; }
  .sf-sheet-inner { padding-top: 16px; padding-bottom: calc(24px + var(--safe-b)); }
  .sf-sheet-search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 14px; background: var(--gray-100); color: var(--gray-500); }
  .sf-sheet-search input { flex: 1; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; box-shadow: none !important; background: transparent; }
  .sf-sheet nav { display: flex; flex-direction: column; margin-top: 8px; }
  .sf-sheet nav a { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; border-bottom: 1px solid var(--color-border-subtle); font-size: 1.0625rem; font-weight: 650; color: var(--gray-900); }
  .sf-sheet nav a .sf-icon { color: var(--gray-400); }
  body.sheet-open { overflow: hidden; }
  .sf-hero { border-radius: 28px; }
  .sf-hero.is-plain, .sf-showcase { display: none; }
  .sf-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-trust-item:nth-child(3)::before { display: none; }
  .sf-trust-item:nth-child(n+3) { border-top: 1px solid var(--color-border-subtle); }
  .sf-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdx { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  /* Price and variants come right after the photo; the reassurance cards follow. */
  .pdx-media-col { display: contents; }
  .pdx-media { order: 1; }
  .pdx-buy { order: 2; }
  .pdx-perks { order: 3; margin-top: 0; }
  .pdx-media { max-width: 520px; margin-inline: auto; }
  .sf-order-grid { grid-template-columns: minmax(0, 1fr); }
  .sf-order-summary { position: static; }
}

/* ======================================================================
   Phones — an app-like storefront: soft gradient stage, compact header with
   search, brand banner, round shortcuts, 2-up product tiles, floating tab bar
   and (on a product) a full-bleed photo with a rounded buy panel.
   ====================================================================== */
@media (max-width: 767px) {
  .store-body {
    background-image:
      radial-gradient(ellipse 90% 460px at 0% 0%, color-mix(in srgb, var(--sf-brand) 26%, #fff), transparent),
      radial-gradient(ellipse 80% 420px at 100% 260px, color-mix(in srgb, var(--sf-brand) 16%, #fff), transparent);
  }
  .sf-wrap { padding-inline: max(16px, env(safe-area-inset-left), env(safe-area-inset-right)); }
  .store-container { padding: 8px max(16px, env(safe-area-inset-left), env(safe-area-inset-right)) 24px; }

  /* --- Header: brand + language on one row, a search pill underneath. Not sticky: the tab bar is the navigation. */
  .sf-header { position: static; background: transparent; border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sf-header-inner { height: auto; flex-wrap: wrap; gap: 14px 10px; padding-top: 14px; padding-bottom: 6px; }
  .sf-brand { flex: 1 1 0; min-width: 0; gap: 10px; }
  .store-logo { width: 38px; height: 38px; border-radius: 12px; }
  .store-name { font-size: 1.0625rem; }
  .sf-nav, .sf-header-link, .sf-menu-btn, .sf-account-btn, .sf-sheet { display: none !important; }
  .sf-actions { margin-left: 0; }
  .sf-actions .lang-switch { height: 40px; min-width: 40px; border-radius: 999px; color: var(--gray-700); background: #fff; box-shadow: 0 0 0 1px var(--color-line), var(--shadow-sm); }
  .sf-header-search, .sf-header-search:focus-within {
    display: flex; order: 3; flex: 1 0 100%; max-width: none; height: 50px; margin: 0; padding: 0 18px; gap: 10px;
    border-radius: 18px; color: var(--gray-400); background: #fff;
    box-shadow: 0 0 0 1px var(--color-line), 0 10px 26px -14px rgb(16 24 40 / 0.28);
  }
  .sf-header-search:focus-within { color: var(--gray-700); box-shadow: 0 0 0 1px var(--color-primary-400), var(--ring); }
  .sf-header-search input { font-size: 1rem; }

  /* --- Hero: the banner picture at its phone shape (2:1). */
  .sf-hero:not(.has-phone) { display: none; }
  .sf-hero.has-phone { display: block; aspect-ratio: 2 / 1; min-height: 0; border-radius: 26px; background: var(--gray-100); box-shadow: 0 20px 36px -22px rgb(16 24 40 / 0.5); }
  .sf-banners--pc { display: none; }
  .sf-banners--phone { display: block; }
  .sf-banner-dots { bottom: 10px; }

  /* --- Round shortcuts replace the desktop trust strip. */
  .sf-trust { display: none; }
  .sf-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 22px 0 2px; }
  .sf-quick a { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; color: var(--gray-700); -webkit-tap-highlight-color: transparent; }
  .sf-quick a:hover { color: var(--gray-900); }
  .sf-quick-ico { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; color: var(--color-primary-700); background: #fff; box-shadow: 0 0 0 1px var(--color-line), 0 10px 20px -12px rgb(16 24 40 / 0.35); transition: transform var(--dur-2) var(--ease-out); }
  .sf-quick a:first-child .sf-quick-ico { color: var(--sf-on-brand); background: var(--sf-brand); box-shadow: 0 12px 22px -10px color-mix(in srgb, var(--sf-brand) 80%, transparent); }
  .sf-quick a:active .sf-quick-ico { transform: scale(0.92); }
  .sf-quick b { max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: center; font-size: 0.75rem; font-weight: 650; line-height: 1.25; }

  /* --- Sections */
  .sf-head { flex-wrap: nowrap; align-items: center; margin: 28px 0 14px; }
  .sf-head h2 { margin-top: 2px; font-size: 1.3125rem; }
  .sf-head-sub { display: none; }
  .sf-head-center { text-align: center; }
  .sf-cats { margin: 0 -16px 14px; padding: 2px 16px 6px; }
  .sf-cat { min-height: 40px; padding: 0 18px; box-shadow: 0 0 0 1px var(--color-line); }
  .sf-cat.active { box-shadow: 0 8px 16px -8px color-mix(in srgb, var(--sf-brand) 80%, transparent); }
  .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sf-card { --sf-radius: 24px; padding: 6px; }
  .sf-card:active { transform: scale(0.98); }
  .sf-card-media { aspect-ratio: 1 / 1; border-radius: 19px; }
  .sf-card-media .product-initial { width: 56px; height: 56px; border-radius: 18px; font-size: 1.5rem; }
  .sf-card-tags { top: 6px; left: 6px; max-width: calc(100% - 12px); }
  .sf-card-body { gap: 3px; padding: 10px 8px 6px; }
  .sf-card-cat { font-size: 0.6875rem; letter-spacing: 0.03em; }
  .sf-card-name { font-size: 0.9375rem; }
  .sf-price small { display: none; }
  .sf-price b { font-size: 1.0625rem; }
  .sf-card-btn { width: 34px; height: 34px; padding: 0; justify-content: center; color: var(--sf-on-brand); background: var(--sf-brand); box-shadow: 0 8px 14px -8px color-mix(in srgb, var(--sf-brand) 90%, transparent); }
  .sf-card-btn > span { display: none; }
  .sf-card:hover .sf-card-btn .sf-icon { transform: none; }
  .sf-empty { padding: 40px 20px; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px var(--color-line); }
  .sf-steps-wrap { margin-top: 24px; }
  .sf-steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sf-steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; padding: 16px; border-radius: 22px; }
  .sf-step-num { grid-row: span 2; margin: 0; }
  .sf-step-count { top: 16px; right: 16px; }

  /* --- Footer clears the floating tab bar. */
  .sf-footer { margin-top: 36px; padding: 32px 0 calc(112px + var(--safe-b)); background: transparent; }
  .sf-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .sf-footer-brand { grid-column: 1 / -1; }
  .sf-footer-bottom { flex-direction: column; margin-top: 28px; }
  .sf-fab { display: none; }

  /* --- Floating tab bar */
  .sf-tabbar {
    position: fixed; left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); bottom: calc(12px + var(--safe-b)); z-index: 50;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 6px; border-radius: 28px;
    background: rgb(255 255 255 / 0.9); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
    box-shadow: 0 0 0 1px var(--color-line), 0 18px 40px -14px rgb(16 24 40 / 0.35);
  }
  .sf-tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 54px; padding: 6px 2px; border-radius: 22px; font-size: 0.6875rem; font-weight: 650; color: var(--gray-500); -webkit-tap-highlight-color: transparent; transition: background-color var(--dur-2) ease, color var(--dur-2) ease; }
  .sf-tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sf-tabbar a:hover { color: var(--gray-500); }
  .sf-tabbar a:active { background: var(--gray-100); }
  .sf-tabbar a.is-active, .sf-tabbar a.is-active:hover { color: var(--sf-on-brand); background: var(--sf-brand); }

  /* --- Product page: photo edge to edge, rounded buy panel over its lower edge. */
  body:has(.pdx) .sf-header, body:has(.pdx) .sf-crumbs { display: none; }
  body:has(.pdx) .store-container { padding-top: 0; }
  .pdx { gap: 0; }
  .pdx-media { max-width: none; margin-inline: -16px; aspect-ratio: 1 / 1; border-radius: 0; box-shadow: none; background: linear-gradient(180deg, color-mix(in srgb, var(--sf-brand) 12%, #fff), var(--color-primary-50)); }
  .pdx-media .product-initial { width: 96px; height: 96px; border-radius: 28px; font-size: 2.5rem; }
  .pdx-back {
    position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); left: 16px; z-index: 2;
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
    color: var(--gray-900); background: rgb(255 255 255 / 0.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 18px -8px rgb(16 24 40 / 0.4);
  }
  .pdx-back:hover { color: var(--gray-900); }
  .pdx-buy { position: relative; margin: -34px -16px 0; padding: 22px 16px 20px; border-radius: 30px 30px 0 0; background: #fff; box-shadow: 0 -14px 30px -18px rgb(16 24 40 / 0.28); }
  .pdx-lead { margin-bottom: 12px; font-size: 0.9375rem; }
  .pdx-buy h1 { font-size: 1.5rem; }
  .pdx-sub { margin-bottom: 18px; }
  .pdx-price { margin-bottom: 16px; padding-bottom: 16px; }
  .pdx-price b { font-size: 1.75rem; }
  .pdx-row { grid-template-columns: minmax(0, 1fr); }
  .pdx-stepper { width: 100%; justify-content: space-between; }
  .pdx-stepper input { flex: 1; }
  /* The buy bar carries the total and the main button; the form keeps only the secondary action. */
  .pdx-checkout { display: none; }
  .pdx-perks { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; gap: 8px; }
  .pdx-perks li { flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; text-align: center; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--color-line); }
  .pdx-perks li > span { background: var(--color-primary-50); box-shadow: none; }
  .pdx-perks small { display: none; }
  .pdx-perks b { font-size: 0.75rem; }
  .pdx-info { margin-top: 24px; padding: 18px 16px 22px; border-radius: 26px; }
  .pdx-how { grid-template-columns: minmax(0, 1fr); }
  .pdx-tabbar { width: 100%; }
  .pdx-tabbar label { flex: 1; text-align: center; padding: 9px 10px; }
  .pdx-panel { padding-inline: 2px; }

  .buy-bar {
    position: fixed; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + var(--safe-b)); z-index: 50;
    display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 30px;
    background: rgb(255 255 255 / 0.92); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
    box-shadow: 0 0 0 1px var(--color-line), 0 18px 40px -14px rgb(16 24 40 / 0.35);
  }
  .buy-bar-chat { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #15803d; background: #ecfdf3; }
  .buy-bar-chat:hover { color: #15803d; }
  .buy-bar-copy { display: flex; flex-direction: column; flex: 1; min-width: 0; padding-left: 4px; line-height: 1.2; }
  .buy-bar-copy small { font-size: var(--text-xs); color: var(--gray-500); }
  .buy-bar-copy b { font-size: 1.1875rem; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .buy-bar .btn { flex: none; min-height: 48px; padding: 0 22px; border-radius: 999px; }
  body:has(.buy-bar) .sf-tabbar { display: none; }

  .order-banner { flex-wrap: wrap; }
  .order-banner-amount { flex-basis: 100%; margin-left: 58px; font-size: 1.125rem; }
  .sf-narrow { margin-top: 8px; }
}
@media (min-width: 768px) { .buy-bar-chat { display: none; } }

/* Telegram Mini App: the same shop with lighter chrome — one header row, the shared tab bar for navigation. */
.in-tgapp .sf-nav,
.in-tgapp .sf-header-link,
.in-tgapp .sf-menu-btn,
.in-tgapp .sf-sheet,
.in-tgapp .sf-fab,
.in-tgapp .sf-footer,
.in-tgapp .lang-switch { display: none !important; }
.in-tgapp .sf-header { position: sticky; }
@media (max-width: 767px) {
  .in-tgapp .sf-header { background: rgb(255 255 255 / 0.9); border-bottom: 1px solid var(--color-border-subtle); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); }
  .in-tgapp .sf-header-inner { height: 56px; flex-wrap: nowrap; gap: 12px; padding-block: 0; }
  .in-tgapp .sf-brand { flex: none; }
  .in-tgapp .store-name { display: none; }
  .in-tgapp .sf-header-search, .in-tgapp .sf-header-search:focus-within { order: 0; flex: 1 1 0; height: 40px; padding: 0 14px; border-radius: 999px; background: var(--gray-100); box-shadow: none; }
  .in-tgapp .sf-actions { display: none; }
  .in-tgapp .store-container { padding-bottom: calc(104px + var(--safe-b)); }
  body.in-tgapp:has(.pdx) .sf-header { display: none; }
}

/* Store-home announcement popup: a centred card on desktop, a bottom sheet on phones. */
.sf-ann { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 20px; }
.sf-ann[hidden] { display: none; }
.sf-ann-backdrop { position: absolute; inset: 0; background: rgb(12 17 29 / 0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade-in var(--dur-2) ease both; }
.sf-ann-panel {
  position: relative; display: flex; flex-direction: column; width: min(440px, 100%); max-height: min(92dvh, 760px);
  background: #fff; border-radius: var(--radius-modal); box-shadow: var(--shadow-xl); overflow: hidden;
  animation: modal-rise var(--dur-3) var(--ease-out) both;
}
.sf-ann-x {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; border-radius: 50%; color: #fff; background: rgb(16 24 40 / 0.62); cursor: pointer;
  transition: background-color var(--dur-2) ease;
}
.sf-ann-x:hover { background: rgb(16 24 40 / 0.82); }
.sf-ann-x:focus-visible { outline: none; box-shadow: var(--ring); }
.sf-ann-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 0; }
.sf-ann-media { display: grid; place-items: center; border-radius: 14px; overflow: hidden; background: var(--color-primary-50); }
.sf-ann-media img { display: block; width: 100%; height: auto; max-height: min(52dvh, 420px); object-fit: contain; }
.sf-ann-text { padding: 18px 6px 4px; }
.sf-ann-text h2 { margin: 0 0 8px; font-size: 1.1875rem; line-height: 1.35; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.sf-ann-text p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: var(--text-sm); line-height: 1.65; color: var(--gray-600); }
.sf-ann-scroll:not(:has(.sf-ann-text)) { padding-bottom: 4px; }
.sf-ann-foot { display: flex; flex-direction: column; gap: 10px; padding: 14px 20px 20px; }
.sf-ann-never { display: flex; align-items: center; gap: 10px; margin: 0 0 2px; font-size: var(--text-sm); font-weight: 500; color: var(--gray-600); cursor: pointer; }
.sf-ann-never input { margin: 0; }
.sf-ann-foot .btn { width: 100%; justify-content: center; }
@media (max-width: 640px) {
  .sf-ann { place-items: end center; padding: 12px; padding-bottom: calc(12px + var(--safe-b)); }
  .sf-ann-panel { animation-name: sheet-up; border-radius: var(--radius-lg); }
}
@media (prefers-reduced-motion: reduce) {
  .sf-ann-backdrop, .sf-ann-panel { animation: none; }
}
