/* Biz Edge hosted shop: the base every theme shares. Framework-free and small on purpose: fast first
   paint on mobile data.
   - Merchant colours arrive as --sf-primary / --sf-secondary (set inline by _ShopLayout, ShopColors).
     Text ON a colour uses --sf-on-*; a colour used AS text on white uses --sf-*-ink (darkened if too
     light to read), so any pick stays legible.
   - Themes: the layout loads this file and one of shop/themes/{classic,modern,minimal}.css, which
     sets the tokens below and styles the theme's own header, home and footer markup
     (Views/Themes/{Theme}, else Views/Shared for classic).
   - Spacing: every row and stack has an explicit gap or margin, and every panel (drawer, menu,
     search, summary) pads all four edges. Phones are max-width 720px, tablets 1024px. */

:root {
    --sf-primary: #1F6FEB;
    --sf-secondary: #0B1F33;
    --sf-on-primary: #fff;
    --sf-on-secondary: #fff;
    --sf-on-hero: #fff;
    --sf-on-secondary-soft: rgba(255,255,255,.85);
    --sf-on-secondary-line: rgba(255,255,255,.15);
    --sf-primary-ink: #1F6FEB;
    --sf-secondary-ink: #0B1F33;

    --sf-bg: #ffffff;
    --sf-paper: #ffffff;
    --sf-surface: #f6f7f9;
    --sf-surface-hover: #eceef2;
    --sf-photo: #f3f4f6;
    --sf-text: #1f2933;
    --sf-muted: #5f6b7a;
    --sf-border: #e3e7ec;
    --sf-border-strong: #c5ccd6;
    --sf-shadow: 0 1px 3px rgba(16, 24, 40, .08);

    --sf-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --sf-font-display: var(--sf-font);
    --sf-display-weight: 700;
    --sf-radius: 6px;          /* buttons, chips */
    --sf-radius-field: 6px;    /* inputs, options */
    --sf-radius-photo: 6px;    /* product photos */
    --sf-radius-card: 8px;     /* summary panels */
    --sf-photo-ratio: 1 / 1;
    --sf-max: 1240px;
    --sf-gutter: 32px;
    --sf-ease: ease;
    --sf-dur: 200ms;
}
@media (max-width: 720px) {
    html:root { --sf-gutter: 16px; }
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
html:has(dialog[open]) { overflow: hidden; }
body { margin: 0; font-family: var(--sf-font); color: var(--sf-text); background: var(--sf-bg); line-height: 1.5; font-size: 16px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sf-primary-ink); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; font-family: var(--sf-font-display); font-weight: var(--sf-display-weight); }
h1 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); }
h2 { font-size: 1.4rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
address { font-style: normal; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--sf-primary-ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── Layout and utilities ────────────────────────────── */
.sf-container { width: 100%; max-width: var(--sf-max); margin: 0 auto; padding-left: var(--sf-gutter); padding-right: var(--sf-gutter); }
.sf-main { min-height: 40vh; }
.sf-section { padding-top: 72px; }
.sf-narrow { max-width: 760px; }
.sf-section.sf-narrow { padding-top: 40px; }
.sf-center { text-align: center; padding-top: 15vh; }
.sf-muted { color: var(--sf-muted); }
.sf-small { font-size: .875rem; }
.sf-visually-hidden, .sf-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sf-skip { position: absolute; left: -9999px; }
.sf-skip:focus { left: 16px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; }
.sf-js .sf-nojs { display: none !important; }
.sf-announcement { padding: 9px 16px; text-align: center; font-size: 13px; background: var(--sf-secondary); color: var(--sf-on-secondary); }
.sf-header { position: sticky; top: 0; z-index: 30; }

/* ── Buttons ─────────────────────────────────────────── */
.sf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 1px solid transparent; border-radius: var(--sf-radius);
    background: var(--sf-primary); color: var(--sf-on-primary); font-weight: 600; font-size: 15px; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer;
    transition: filter var(--sf-dur), transform var(--sf-dur) var(--sf-ease), opacity var(--sf-dur), background var(--sf-dur), border-color var(--sf-dur); }
.sf-btn:hover { filter: brightness(.92); }
.sf-btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.sf-btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.sf-btn-lg { min-height: 54px; padding: 0 32px; font-size: 16px; }
.sf-btn-block { width: 100%; }
.sf-btn-ghost { background: transparent; color: var(--sf-text); border-color: var(--sf-border-strong); }
.sf-btn-ghost:hover { filter: none; border-color: var(--sf-text); }
.sf-btn-soft { background: var(--sf-surface); color: var(--sf-text); }
.sf-btn-soft:hover { filter: none; background: var(--sf-surface-hover); }
.sf-btn-line { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 32px; border: 1px solid currentColor; color: inherit; font-weight: 600; text-decoration: none; transition: background var(--sf-dur), color var(--sf-dur); }
.sf-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--sf-text); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sf-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--sf-radius); background: none; color: inherit; text-decoration: none; cursor: pointer; flex-shrink: 0; }
.sf-text-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: inherit; font-size: 13px; text-decoration: none; white-space: nowrap; cursor: pointer; }

/* ── Quantity stepper: −/+ around the number (shop.js shows the buttons) ── */
.sf-qty { display: inline-flex; align-items: center; height: 54px; border: 1px solid var(--sf-border-strong); border-radius: var(--sf-radius); background: var(--sf-paper); flex-shrink: 0; }
.sf-qty button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 100%; padding: 0; border: 0; border-radius: var(--sf-radius); background: none; color: var(--sf-text); cursor: pointer; }
.sf-qty button[hidden] { display: none; }
.sf-qty button:hover { color: var(--sf-primary-ink); }
.sf-qty button:disabled { opacity: .35; cursor: default; }
.sf-qty input { width: 72px; height: 100%; padding: 0 12px; border: 0; border-radius: var(--sf-radius); background: transparent; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.sf-js .sf-qty input { width: 40px; padding: 0; -moz-appearance: textfield; appearance: textfield; }
.sf-js .sf-qty input::-webkit-inner-spin-button, .sf-js .sf-qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sf-qty-sm { height: 44px; }
.sf-qty-sm button { width: 40px; }
.sf-js .sf-qty-sm input { width: 34px; font-size: 14px; }

/* ── Product photos: one box everywhere, white photo backgrounds blend into the tile ── */
.sf-card-img, .sf-thumb, .sf-pd-img, .sf-tile-img { position: relative; display: block; overflow: hidden; aspect-ratio: var(--sf-photo-ratio); background: var(--sf-photo); border-radius: var(--sf-radius-photo); }
.sf-card-img img, .sf-thumb img, .sf-pd-img img, .sf-tile-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .5s var(--sf-ease), opacity var(--sf-dur); }
.sf-thumb { border-radius: calc(var(--sf-radius-photo) * .6); }

/* ── Search suggestions (header dropdown or search sheet) ── */
.sf-suggest { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; width: max(100%, 380px); max-width: calc(100vw - 32px); margin: 0; padding: 6px; list-style: none;
    background: var(--sf-paper); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-field); box-shadow: 0 16px 40px rgba(20, 16, 10, .14); }
.sf-suggest[hidden] { display: none; }
.sf-suggest a { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px; border-radius: var(--sf-radius-field); color: var(--sf-text); text-decoration: none; }
.sf-suggest a:hover, .sf-suggest a:focus-visible { background: var(--sf-surface); }
.sf-suggest img { width: 44px; height: 44px; object-fit: contain; border-radius: calc(var(--sf-radius-photo) * .5); background: var(--sf-photo); }
.sf-suggest-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.sf-suggest-price { font-size: 13px; color: var(--sf-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Sections, chips, empty states ───────────────────── */
.sf-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.sf-section-head h2 { margin: 0; }
.sf-orn { display: none; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sf-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid var(--sf-border-strong); border-radius: var(--sf-radius);
    color: var(--sf-text); text-decoration: none; font-size: 14px; white-space: nowrap; transition: background var(--sf-dur), border-color var(--sf-dur), color var(--sf-dur); }
.sf-chip:hover { border-color: var(--sf-text); }
.sf-chip[aria-current] { background: var(--sf-text); border-color: var(--sf-text); color: var(--sf-bg); }
.sf-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 64px 16px; text-align: center; }
.sf-empty h1, .sf-empty p { margin: 0; }
.sf-empty > p:first-of-type { font-size: 18px; }
.sf-empty-ic { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: var(--sf-surface); color: var(--sf-muted); }

/* ── Product grid and card ───────────────────────────── */
.sf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 24px; }
.sf-grid-few { grid-template-columns: repeat(auto-fit, minmax(220px, 340px)); justify-content: center; }
.sf-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; min-width: 0; }
.sf-card-img { grid-area: 1 / 1; }
.sf-card-out .sf-card-img img { filter: grayscale(.9); opacity: .55; }
.sf-badge { grid-area: 1 / 1; align-self: start; justify-self: start; z-index: 2; margin: 12px; padding: 7px 10px; background: var(--sf-paper); color: var(--sf-text); font-size: 12px; font-weight: 600; line-height: 1; pointer-events: none; }
.sf-badge-low { color: #9A3412; }
.sf-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-top: 14px; }
.sf-card-title { margin: 0; font-family: var(--sf-font); font-size: 15px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sf-card-title a { color: inherit; text-decoration: none; }
.sf-card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sf-price { font-variant-numeric: tabular-nums; }
.sf-card .sf-price { font-size: 15px; }
.sf-card-add { margin: 0; }
.sf-card-btn { cursor: pointer; }
.sf-card-btn .sf-i-check, .sf-card-btn.is-added .sf-i-plus { display: none; }
.sf-card-btn.is-added .sf-i-check { display: block; }

/* ── Listing, breadcrumbs, pager ─────────────────────── */
.sf-breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 20px; font-size: 13px; color: var(--sf-muted); }
.sf-breadcrumbs a { color: inherit; text-decoration: none; }
.sf-breadcrumbs a:hover { color: var(--sf-text); text-decoration: underline; }
.sf-listing { padding-top: 32px; }
.sf-listing-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: 24px; }
.sf-listing-title h1 { margin: 0; }
.sf-listing-intro { max-width: 40em; margin: 8px 0 0; color: var(--sf-muted); }
.sf-listing-count { margin: 6px 0 0; font-size: 14px; color: var(--sf-muted); }
.sf-sort { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sf-sort select { min-height: 44px; padding: 0 12px; border: 1px solid var(--sf-border-strong); border-radius: var(--sf-radius-field); background: var(--sf-paper); }
.sf-listing-cats { margin-bottom: 36px; }
.sf-page-search { display: flex; gap: 10px; max-width: 560px; margin-bottom: 36px; }
.sf-page-search input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border: 1px solid var(--sf-border-strong); border-radius: var(--sf-radius-field); background: var(--sf-paper); }
.sf-pager { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 24px; margin-top: 56px; font-size: 14px; }
.sf-pager a { display: inline-flex; align-items: center; min-height: 44px; color: var(--sf-text); }

/* ── Product page ────────────────────────────────────── */
.sf-pd-wrap { padding-top: 28px; }
.sf-pd { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.sf-pd-media { position: sticky; top: 140px; }
.sf-pd-img { cursor: zoom-in; }
.sf-pd-img img { transform-origin: var(--zx, 50%) var(--zy, 50%); transition: transform .25s ease; }
.sf-pd-img.is-magnify img { transform: scale(1.8); }
.sf-pd-zoom-ic { position: absolute; top: 16px; right: 16px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--sf-text); pointer-events: none; }
.sf-pd-info { display: flex; flex-direction: column; min-width: 0; }
.sf-pd-brand { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .16em; color: var(--sf-muted); }
.sf-pd-title { margin: 0 0 14px; font-size: 40px; line-height: 1.1; overflow-wrap: anywhere; }
.sf-pd-price { margin: 0 0 14px; font-size: 22px; }
.sf-pd-stock { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; font-size: 14px; font-weight: 600; }
.sf-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.sf-stock-in { color: #166534; }
.sf-stock-low { color: #9A3412; }
.sf-stock-out { color: #B42318; }
.sf-pd-lead { max-width: 34em; margin: 0 0 28px; line-height: 1.65; color: var(--sf-muted); }
.sf-buy { margin: 0 0 12px; }
.sf-buy-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sf-buy-row { display: flex; gap: 12px; margin-bottom: 12px; }
.sf-buy-btn { flex: 1; }
.sf-pd-wa { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 16px; border: 1px solid var(--sf-border-strong); border-radius: var(--sf-radius);
    color: var(--sf-text); font-weight: 600; font-size: 15px; text-decoration: none; transition: border-color var(--sf-dur), background var(--sf-dur); }
.sf-pd-wa svg { color: #1A9E4B; }
.sf-pd-wa:hover { border-color: var(--sf-text); }
.sf-pd-more { margin-top: 36px; border-top: 1px solid var(--sf-border); }
.sf-acc { border-bottom: 1px solid var(--sf-border); }
.sf-acc summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 60px; cursor: pointer; list-style: none; font-weight: 600; font-size: 15px; }
.sf-acc summary::-webkit-details-marker { display: none; }
.sf-acc summary svg { transition: transform var(--sf-dur); }
.sf-acc[open] summary svg { transform: rotate(180deg); }
.sf-acc-body { padding-bottom: 22px; font-size: 15px; line-height: 1.7; color: var(--sf-muted); }
.sf-acc-body p { margin: 0 0 10px; }
.sf-acc-body p:last-child { margin-bottom: 0; }
.sf-acc-body a { color: var(--sf-text); text-underline-offset: 3px; }
.sf-acc-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.sf-prose p { white-space: pre-line; }
.sf-related { padding-top: 96px; }
.sf-sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 44; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--sf-bg); border-top: 1px solid var(--sf-border); box-shadow: 0 -8px 24px rgba(0, 0, 0, .06); animation: sf-rise var(--sf-dur) cubic-bezier(.2, .8, .2, 1); }
.sf-sticky-buy[hidden] { display: none; }
.sf-sticky-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sf-sticky-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--sf-muted); }
.sf-sticky-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.sf-sticky-buy .sf-btn { flex-shrink: 0; }

/* ── Cart page ───────────────────────────────────────── */
.sf-page { padding-top: 40px; }
.sf-page-title { margin: 0 0 32px; font-size: 40px; line-height: 1.1; }
.sf-cart { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; }
.sf-cart-lines { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--sf-border); }
.sf-cart-line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto 120px auto; grid-template-areas: "img info qty total remove"; align-items: center; gap: 16px 24px; padding: 20px 0; border-bottom: 1px solid var(--sf-border); }
.sf-cart-line .sf-thumb { grid-area: img; }
.sf-cart-line-info { grid-area: info; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.sf-cart-qty { grid-area: qty; display: flex; align-items: center; gap: 12px; margin: 0; }
.sf-cart-line .sf-line-total { grid-area: total; }
.sf-cart-remove { grid-area: remove; margin: 0; }
.sf-line-name { color: var(--sf-text); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.sf-line-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.sf-line-total { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sf-remove { font-size: 13px; color: var(--sf-muted); }
.sf-remove:hover { color: var(--sf-text); }
.sf-summary { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--sf-surface); border-radius: var(--sf-radius-card); }
.sf-summary > p { margin: 0; }
.sf-summary-title { margin: 0; font-size: 18px; }
.sf-row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.sf-row-strong { font-size: 17px; }
.sf-total { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--sf-border); font-size: 18px; }

/* ── Checkout ────────────────────────────────────────── */
.sf-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: start; }
.sf-checkout-main { display: flex; flex-direction: column; gap: 44px; min-width: 0; }
.sf-step legend { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 20px; padding: 0; font-family: var(--sf-font-display); font-weight: var(--sf-display-weight); font-size: 20px; }
.sf-step-n { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sf-field { display: flex; flex-direction: column; flex: 1; gap: 6px; min-width: 0; margin-bottom: 16px; }
.sf-field label { font-size: 14px; font-weight: 600; }
.sf-field input, .sf-field select, .sf-field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--sf-border-strong); border-radius: var(--sf-radius-field); background: var(--sf-paper); color: var(--sf-text); font-size: 16px; }
.sf-field textarea { min-height: 88px; resize: vertical; }
.sf-field input:focus-visible, .sf-field select:focus-visible, .sf-field textarea:focus-visible { outline-offset: 0; border-color: var(--sf-primary-ink); }
.sf-field-row { display: flex; gap: 16px; }
.sf-phone { display: flex; gap: 8px; align-items: stretch; }
.sf-field .sf-phone .sf-phone-code { flex: 0 0 auto; width: 11rem; max-width: 45%; }
.sf-field .sf-phone input { flex: 1; min-width: 0; }
.sf-phone-prefix { display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--sf-border-strong); border-radius: var(--sf-radius-field); background: var(--sf-surface); white-space: nowrap; }
.sf-error, .field-validation-error { color: #b42318; font-size: .875rem; }
.input-validation-error { border-color: #b42318 !important; }
.sf-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.sf-option { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--sf-border-strong); border-radius: var(--sf-radius-field); background: var(--sf-paper); cursor: pointer;
    transition: border-color var(--sf-dur), box-shadow var(--sf-dur), background var(--sf-dur); }
.sf-option:has(input:checked) { border-color: var(--sf-primary-ink); box-shadow: inset 0 0 0 1px var(--sf-primary-ink); }
.sf-option input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--sf-primary-ink); }
.sf-option-text { display: flex; flex-direction: column; flex: 1; gap: 2px; min-width: 0; }
.sf-option-text .sf-muted { font-size: 14px; }
.sf-option-fee { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sf-summary-lines { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0 0 16px; list-style: none; border-bottom: 1px solid var(--sf-border); }
.sf-summary-lines li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.sf-summary-name { flex: 1; min-width: 0; }
.sf-summary-lines li > :last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sf-summary-ph { position: relative; flex: 0 0 56px; width: 56px; height: 56px; border-radius: calc(var(--sf-radius-photo) * .5); background: var(--sf-photo); }
.sf-summary-ph img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; mix-blend-mode: multiply; }
.sf-summary-q { position: absolute; top: -7px; right: -7px; display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
    background: var(--sf-text); color: var(--sf-bg); font-size: 11px; font-weight: 700; }
.sf-summary-bar { display: none; }
.sf-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; padding: 16px; background: var(--sf-surface); border-radius: var(--sf-radius-card); }
.sf-status div { display: flex; flex-direction: column; gap: 2px; }
/* Order confirmation, tracking, contact, info pages: one narrow column, rows outside a panel. */
.sf-narrow > h2 { margin: 36px 0 12px; font-size: 1.25rem; }
.sf-narrow > .sf-summary-lines { margin: 8px 0 8px; }
.sf-narrow > .sf-row { padding: 6px 0; }
.sf-narrow > .sf-row.sf-total { margin-top: 6px; padding-top: 14px; }
.sf-narrow > p:last-child { margin-top: 32px; }
.sf-narrow form .sf-btn { margin-top: 8px; }
.sf-pay-now { margin: 24px 0 32px; }
.sf-contact-info { margin-bottom: 28px; }
.sf-contact-info p { margin: 0 0 6px; }

/* ── Alerts ──────────────────────────────────────────── */
.sf-alert { margin: 16px 0; padding: 12px 16px; border-radius: var(--sf-radius-field); }
.sf-alert:empty, .validation-summary-valid { display: none; }
.sf-alert-error { background: #fef3f2; color: #912018; border: 1px solid #fecdca; }
.sf-alert-ok { background: #ecfdf3; color: #05603a; border: 1px solid #abefc6; }
.sf-alert ul { margin: 0; padding-left: 18px; }

/* ── Footer base (each theme styles its own) ─────────── */
.sf-footer ul { margin: 0; padding: 0; list-style: none; }
.sf-footer a { color: inherit; text-decoration: none; }
.sf-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ── Floating: WhatsApp, toast ───────────────────────── */
.sf-whatsapp { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 42; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%;
    background: #25D366; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); transition: transform var(--sf-dur) var(--sf-ease), bottom var(--sf-dur); }
.sf-whatsapp:hover { transform: scale(1.06); }
.sf-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 80; display: flex; align-items: center; gap: 16px; max-width: calc(100vw - 32px); min-height: 52px; padding: 8px 8px 8px 18px;
    transform: translateX(-50%); border-radius: var(--sf-radius); background: var(--sf-text); color: var(--sf-bg); box-shadow: 0 12px 32px rgba(0, 0, 0, .2); font-size: 14px; font-weight: 600; animation: sf-toast calc(var(--sf-dur) + 80ms) var(--sf-ease); }
.sf-toast:not(:has(a)) { padding-right: 18px; }
.sf-toast-msg { display: inline-flex; align-items: center; gap: 8px; }
.sf-toast a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--sf-radius); background: rgba(255, 255, 255, .16); color: inherit; font-weight: 700; text-decoration: none; white-space: nowrap; }
[data-cart-count].sf-bump { animation: sf-bump .4s var(--sf-ease); }

/* ── Dialogs: cart drawer, menu, search sheet, zoom (top layer, opened by shop.js) ── */
.sf-drawer, .sf-menu, .sf-sheet, .sf-zoom { margin: 0; padding: 0; border: 0; max-width: none; max-height: none; background: var(--sf-bg); color: var(--sf-text); }
.sf-drawer::backdrop, .sf-menu::backdrop, .sf-sheet::backdrop { background: rgba(15, 12, 8, .42); animation: sf-fade var(--sf-dur) ease; }
.sf-panel { height: 100%; }

/* Cart drawer: a strip of the page stays visible on phones, so it reads as a panel and the strip closes it. */
.sf-drawer { --sf-pad: 24px; position: fixed; inset: 0 0 0 auto; width: min(440px, 100vw - 40px); height: 100%; border-left: 1px solid var(--sf-border); box-shadow: -20px 0 60px rgba(0, 0, 0, .14); }
.sf-drawer[open] { animation: sf-in-r calc(var(--sf-dur) + 120ms) cubic-bezier(.2, .8, .2, 1); }
.sf-drawer .sf-panel { display: flex; flex-direction: column; }
.sf-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 14px 14px var(--sf-pad); border-bottom: 1px solid var(--sf-border); flex-shrink: 0; }
.sf-drawer-head h2 { margin: 0; font-size: 18px; }
.sf-drawer-n { color: var(--sf-muted); font-weight: 400; }
.sf-drawer-added { display: flex; align-items: center; gap: 10px; margin: 16px var(--sf-pad) 0; padding: 12px 14px; border-radius: var(--sf-radius-field); flex-shrink: 0;
    background: var(--sf-surface); background: color-mix(in srgb, var(--sf-primary) 10%, var(--sf-bg)); font-size: 14px; }
.sf-drawer-added svg { color: var(--sf-primary-ink); }
.sf-drawer-alert { margin: 16px var(--sf-pad) 0; flex-shrink: 0; }
.sf-drawer-lines { flex: 1; min-height: 0; margin: 0; padding: 0 var(--sf-pad); overflow-y: auto; overscroll-behavior: contain; list-style: none; }
.sf-drawer-line { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--sf-border); }
.sf-drawer-line:last-child { border-bottom: 0; }
.sf-drawer-info { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.sf-drawer-info form { margin: 8px 0 0; }
.sf-drawer-side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.sf-drawer-side form { margin: 0; }
.sf-drawer-foot { display: flex; flex-direction: column; gap: 12px; padding: 20px var(--sf-pad) calc(var(--sf-pad) + env(safe-area-inset-bottom)); border-top: 1px solid var(--sf-border); background: var(--sf-bg); flex-shrink: 0; }
.sf-drawer-foot p { margin: 0; }
.sf-drawer-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 32px var(--sf-pad); text-align: center; }
.sf-drawer-empty p { margin: 0; font-size: 18px; }

/* Menu: slides in from the leading edge (classic); minimal makes it full-screen. */
.sf-menu { position: fixed; inset: 0 auto 0 0; width: min(380px, 100vw - 40px); height: 100%; border-right: 1px solid var(--sf-border); box-shadow: 20px 0 60px rgba(0, 0, 0, .14); }
.sf-menu[open] { animation: sf-in-l calc(var(--sf-dur) + 120ms) cubic-bezier(.2, .8, .2, 1); }
.sf-menu .sf-panel { display: flex; flex-direction: column; overflow-y: auto; padding: 8px 24px calc(24px + env(safe-area-inset-bottom)); }
.sf-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; margin: 0 -10px 8px 0; padding-bottom: 8px; border-bottom: 1px solid var(--sf-border); }
.sf-panel-head .sf-wordmark { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-menu-search { display: none; }
.sf-menu-list { margin: 0; padding: 0; list-style: none; }
.sf-menu-list li { border-bottom: 1px solid var(--sf-border); }
.sf-menu-list a { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 8px 0; color: var(--sf-text); text-decoration: none; font-family: var(--sf-font-display); font-size: 20px; line-height: 1.2; }
.sf-menu-num { display: none; }
.sf-menu-util { display: flex; flex-direction: column; margin: 24px 0 0; padding: 0; list-style: none; }
.sf-menu-util a { display: flex; align-items: center; min-height: 44px; color: var(--sf-muted); text-decoration: none; font-size: 14px; }
.sf-menu-util a:hover { color: var(--sf-text); }

/* Search sheet: drops from the top; full screen on phones. */
.sf-sheet { position: fixed; inset: 0 0 auto 0; width: 100%; max-height: 100dvh; border-bottom: 1px solid var(--sf-border); box-shadow: 0 20px 60px rgba(0, 0, 0, .12); }
.sf-sheet[open] { animation: sf-drop calc(var(--sf-dur) + 80ms) cubic-bezier(.2, .8, .2, 1); }
.sf-sheet .sf-panel { max-width: 800px; max-height: 100dvh; margin: 0 auto; padding: 20px var(--sf-gutter) 32px; overflow-y: auto; }
.sf-sheet-form { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 6px 0 18px; border-radius: 999px; background: var(--sf-surface); color: var(--sf-muted); }
.sf-sheet-form:focus-within { box-shadow: 0 0 0 2px var(--sf-primary-ink); }
.sf-sheet-form input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--sf-text); font-size: 17px; outline: none; }
.sf-sheet-close { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--sf-text); font-weight: 700; font-size: 14px; cursor: pointer; }
.sf-sheet .sf-suggest { position: static; width: auto; max-width: none; margin-top: 16px; padding: 0; border: 0; box-shadow: none; background: transparent; }
.sf-sheet .sf-suggest a { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; padding: 8px; }
.sf-sheet .sf-suggest img { width: 56px; height: 56px; }
.sf-sheet-cats { margin-top: 28px; }
.sf-sheet:has(.sf-suggest:not([hidden])) .sf-sheet-cats { display: none; }
.sf-sheet-label { margin: 0 0 12px; font-size: 13px; font-weight: 700; color: var(--sf-muted); }

/* Zoom: the one product photo, full screen (pinch to zoom on phones). */
.sf-zoom { position: fixed; inset: 0; width: 100vw; height: 100dvh; }
.sf-zoom[open] { animation: sf-fade var(--sf-dur) ease; }
.sf-zoom::backdrop { background: var(--sf-bg); }
.sf-zoom .sf-panel { display: flex; align-items: center; justify-content: center; padding: 72px 24px 24px; overflow: auto; touch-action: pinch-zoom; }
.sf-zoom img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.sf-zoom-close { position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; background: var(--sf-bg); border: 1px solid var(--sf-border); box-shadow: 0 4px 14px rgba(0, 0, 0, .1); }

@keyframes sf-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sf-in-r { from { transform: translateX(100%); } to { transform: none; } }
@keyframes sf-in-l { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes sf-rise { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sf-drop { from { transform: translateY(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sf-toast { from { transform: translate(-50%, 16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes sf-bump { 50% { transform: scale(1.25); } }

/* ── Tablet ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sf-pd { gap: 40px; }
    .sf-cart, .sf-checkout { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
}
@media (max-width: 900px) {
    .sf-pd { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .sf-pd-media { position: static; }
    .sf-pd-title { font-size: 30px; }
    .sf-related { padding-top: 64px; }
    .sf-cart, .sf-checkout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .sf-summary { position: static; }
}

/* ── Phone ───────────────────────────────────────────── */
@media (max-width: 720px) {
    .sf-section { padding-top: 48px; }
    .sf-grid, .sf-grid-few { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; justify-content: stretch; }
    .sf-badge { margin: 8px; }
    .sf-listing { padding-top: 20px; }
    .sf-listing-head { margin-bottom: 20px; }
    .sf-listing-cats { margin: 0 calc(-1 * var(--sf-gutter)) 28px; }
    .sf-listing-cats .sf-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 0 var(--sf-gutter) 4px; }
    .sf-listing-cats .sf-chips::-webkit-scrollbar { display: none; }
    .sf-pd-wrap { padding-top: 16px; }
    .sf-pd-title { font-size: 28px; }
    .sf-page { padding-top: 24px; }
    .sf-page-title { margin-bottom: 20px; font-size: 30px; }
    .sf-cart-line { grid-template-columns: 80px minmax(0, 1fr) auto; grid-template-areas: "img info info" "img qty total" "img remove remove"; align-items: center; gap: 10px 16px; }
    .sf-cart-line .sf-thumb { align-self: start; }
    .sf-cart-remove .sf-remove { min-height: 36px; }
    .sf-summary { padding: 24px 20px; }
    .sf-checkout-summary .sf-summary-lines, .sf-checkout-summary .sf-summary-title { display: none; }
    .sf-summary-bar { display: block; margin: 0 calc(-1 * var(--sf-gutter)) 28px; border-top: 1px solid var(--sf-border); border-bottom: 1px solid var(--sf-border); background: var(--sf-surface); }
    .sf-summary-bar summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 0 var(--sf-gutter); list-style: none; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--sf-primary-ink); }
    .sf-summary-bar summary::-webkit-details-marker { display: none; }
    .sf-summary-bar-label { display: inline-flex; align-items: center; gap: 8px; }
    .sf-summary-bar .sf-chev { transition: transform var(--sf-dur); }
    .sf-summary-bar[open] .sf-chev { transform: rotate(180deg); }
    .sf-summary-bar summary strong { color: var(--sf-text); font-size: 16px; font-variant-numeric: tabular-nums; }
    .sf-summary-bar .sf-summary-lines { padding: 8px var(--sf-gutter) 20px; border: 0; }
    .sf-checkout-main { gap: 36px; }
    .sf-field-row { flex-direction: column; gap: 0; }
    .sf-whatsapp { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 52px; height: 52px; }
    body.sf-sticky-on .sf-whatsapp { bottom: calc(88px + env(safe-area-inset-bottom)); }
    .sf-drawer { --sf-pad: 20px; }
    .sf-drawer-head { padding-top: 10px; padding-bottom: 10px; padding-right: 8px; }
    .sf-drawer-line { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; padding: 16px 0; }
    .sf-drawer-foot { padding-top: 16px; }
    .sf-menu .sf-panel { padding: 4px 20px calc(20px + env(safe-area-inset-bottom)); }
    .sf-sheet { inset: 0; height: 100%; }
    .sf-sheet .sf-panel { padding-top: 12px; }
}
@media (min-width: 721px) {
    .sf-sticky-buy { display: none !important; }
}
