/* ==========================================================================
   Братя Лилови — storefront "Order Docket" V2
   Graphite / signal red / steel. Condensed display type (Sofia Sans Extra
   Condensed) over a Cyrillic-native text face (Golos Text).
   Loaded after Bootstrap (resources/sass/app.scss).
   Naming: .sf-* = storefront components. Legacy hook classes used by JS
   (.add_to_cart, .quantity, .add-to-cart, #cart, .cart-trigger …) stay in markup.
   ========================================================================== */

/* 1. Tokens
   ----------------------------------------------------------------------- */
:root {
    --sf-graphite: #24272c;
    --sf-graphite-2: #2d3137;
    --sf-graphite-3: #3b4048;
    --sf-graphite-line: #484e57;
    --sf-ink: #17191c;
    --sf-ink-2: #383d44;
    --sf-muted: #59606a;
    --sf-steel: #a8b0b9;
    --sf-steel-2: #c8ced5;
    --sf-line: #d6dadf;
    --sf-line-2: #b9c0c8;
    --sf-bg: #e8ebee;
    --sf-subtle: #f3f5f6;
    --sf-surface: #ffffff;

    --sf-brand: #e31e24;
    --sf-brand-600: #c9171d;
    --sf-brand-700: #a31217;
    --sf-brand-50: #fdecec;

    --sf-success: #17703f;
    --sf-success-bg: #e4f3ea;
    --sf-warn: #8a4b00;
    --sf-warn-bg: #fff1d9;
    --sf-danger: #b42318;
    --sf-danger-bg: #fdecea;
    --sf-info: #1d4f91;
    --sf-info-bg: #e9f0fb;

    --sf-radius-sm: 2px;
    --sf-radius: 2px;
    --sf-radius-lg: 3px;
    --sf-shadow-sm: 0 1px 0 rgba(23, 25, 28, .06);
    --sf-shadow: 0 2px 0 rgba(23, 25, 28, .06), 0 6px 16px rgba(23, 25, 28, .08);
    --sf-shadow-lg: 0 24px 60px rgba(12, 13, 15, .35);

    --sf-font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --sf-display: "Sofia Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
    --sf-ease: cubic-bezier(.2, .7, .2, 1);
    --sf-header-h: 0px;
    --sf-bottomnav-h: 0px;
    --sf-perf: radial-gradient(circle at 7px 8px, transparent 5px, currentColor 5.5px) 0 0 / 14px 8px repeat-x;

    /* Bootstrap bridge */
    --bs-body-font-family: var(--sf-font);
    --bs-body-color: var(--sf-ink);
    --bs-body-bg: var(--sf-bg);
    --bs-link-color: var(--sf-brand-600);
    --bs-link-hover-color: var(--sf-brand-700);
    --bs-border-color: var(--sf-line);
    --bs-primary: var(--sf-brand);
    --bs-primary-rgb: 227, 30, 36;
    --bs-border-radius: 2px;
}

/* 2. Base
   ----------------------------------------------------------------------- */
body.sf {
    margin: 0;
    font-family: var(--sf-font);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--sf-ink);
    background: var(--sf-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.sf a { color: var(--sf-brand-600); text-decoration: none; }
.sf a:hover { color: var(--sf-brand-700); }
.sf h1, .sf h2, .sf h3, .sf h4 { color: var(--sf-ink); }
.sf h1, .sf h2 { font-family: var(--sf-display); font-weight: 800; letter-spacing: 0; line-height: .95; }
.sf h3, .sf h4 { font-family: var(--sf-font); font-weight: 700; letter-spacing: -.005em; }
.sf img { max-width: 100%; }
.sf :focus-visible { outline: 2px solid var(--sf-brand); outline-offset: 2px; }
.sf main:focus { outline: none; }
.sf kbd { background: var(--sf-graphite); color: #fff; border-radius: 2px; padding: 1px 6px; font-size: .8em; }
.sf .text-right { text-align: right !important; }
.sf-muted { color: var(--sf-muted); }
.sf-small { font-size: .875rem; }
.sf-strong { font-weight: 700; }
.sf-center { text-align: center; }
.sf-divider { height: 1px; background: var(--sf-line); margin: 16px 0; }

.sf-skip {
    position: absolute; left: 12px; top: -60px; z-index: 3000;
    background: var(--sf-brand); color: #fff !important; padding: 10px 16px; font-weight: 700;
    transition: top .2s;
}
.sf-skip:focus { top: 12px; }

.sf .container { max-width: 1360px; padding-left: clamp(16px, 3vw, 28px); padding-right: clamp(16px, 3vw, 28px); }

/* 3. Buttons
   ----------------------------------------------------------------------- */
.sf-btn {
    --_bg: var(--sf-surface); --_fg: var(--sf-ink); --_bd: var(--sf-line-2);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 18px;
    font: 700 .95rem/1.2 var(--sf-font);
    color: var(--_fg) !important; background: var(--_bg);
    border: 2px solid var(--_bd); border-radius: var(--sf-radius-sm);
    cursor: pointer; text-align: center; text-decoration: none; white-space: nowrap;
    transition: background-color .15s, border-color .15s, color .15s;
}
.sf-btn:hover { --_bd: var(--sf-ink); }
.sf-btn:active { transform: translateY(1px); }
.sf-btn[disabled], .sf-btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none; }
.sf-btn--primary { --_bg: var(--sf-brand); --_fg: #fff; --_bd: var(--sf-brand); }
.sf-btn--primary:hover { --_bg: var(--sf-brand-600); --_bd: var(--sf-brand-600); }
.sf-btn--primary.is-disabled { --_bg: var(--sf-warn-bg); --_fg: var(--sf-warn); --_bd: #efd3a2; opacity: 1; white-space: normal; }
.sf-btn--outline { --_bg: transparent; --_fg: var(--sf-ink); --_bd: var(--sf-ink); }
.sf-btn--outline:hover { --_bg: var(--sf-ink); --_fg: #fff; }
.sf-btn--ghost-light { --_bg: transparent; --_fg: #fff; --_bd: rgba(255,255,255,.5); }
.sf-btn--ghost-light:hover { --_bg: #fff; --_fg: var(--sf-ink); --_bd: #fff; }
.sf-btn--text { --_bg: transparent; --_bd: transparent; --_fg: var(--sf-ink-2); padding-left: 8px; padding-right: 8px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sf-line-2); }
.sf-btn--text:hover { --_fg: var(--sf-brand-600); --_bd: transparent; text-decoration-color: currentColor; }
.sf-btn--sm { min-height: 36px; padding: 6px 12px; font-size: .875rem; }
.sf-btn--lg { min-height: 52px; padding: 12px 24px; font-size: 1rem; }
.sf-btn--block { display: flex; width: 100%; }
.sf-btn.loading, .add-to-cart.loading { opacity: .6; pointer-events: none; }

.sf-iconbtn {
    display: inline-grid; place-items: center; width: 44px; height: 44px;
    border: 0; background: transparent; color: inherit; border-radius: var(--sf-radius-sm);
    font-size: 1.2rem; cursor: pointer;
}
.sf-iconbtn:hover { background: rgba(127,127,127,.14); }

.sf-link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }

/* Bootstrap buttons still used by admin tools / legacy screens */
.sf .btn { border-radius: var(--sf-radius-sm); font-weight: 600; }
.sf .btn.btn-primary { background: var(--sf-brand); border-color: var(--sf-brand); color: #fff; }
.sf .btn.btn-primary:hover { background: var(--sf-brand-600); border-color: var(--sf-brand-600); }
.sf .btn-warning { background: #ffb020; border-color: #ffb020; color: var(--sf-ink); padding: .25rem .6rem; margin-top: 0; }
.sf .btn-warning:hover { background: #f29d00; border-color: #f29d00; color: var(--sf-ink); }
.sf .btn-info { background: var(--sf-graphite); border-color: var(--sf-graphite); color: #fff; }
.sf .btn-info:hover { background: var(--sf-brand); border-color: var(--sf-brand); color: #fff; }

/* 4. Forms
   ----------------------------------------------------------------------- */
.sf .form-control, .sf .form-select {
    min-height: 44px; border: 1.5px solid var(--sf-line-2); border-radius: var(--sf-radius-sm);
    font-family: var(--sf-font); font-size: 1rem; color: var(--sf-ink); background-color: var(--sf-surface);
}
.sf .form-control-lg { min-height: 52px; }
.sf .form-control:focus-visible, .sf .form-select:focus-visible, .sf-search__input:focus-visible, .sf-quicksearch__input:focus-visible, .sf-qty__input:focus-visible, .sf-cart__qty:focus-visible, .sf-desk__search input:focus-visible { outline: none; }
.sf .form-control:focus, .sf .form-select:focus { border-color: var(--sf-ink); box-shadow: 0 0 0 3px rgba(23,25,28,.12); }
.sf .form-control.is-invalid { border-color: var(--sf-danger); }
.sf .form-check-input { width: 1.2em; height: 1.2em; border: 1.5px solid var(--sf-line-2); border-radius: 2px; }
.sf .form-check-input:checked { background-color: var(--sf-brand); border-color: var(--sf-brand); }
.sf .form-check-input:focus { box-shadow: 0 0 0 3px rgba(227,30,36,.2); border-color: var(--sf-brand); }

.sf-field { margin-bottom: 16px; }
.sf-field__label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9rem; color: var(--sf-ink-2); }
.sf-field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sf-field__hint { font-size: .85rem; color: var(--sf-muted); }
.sf-field__error { margin: 6px 0 0; color: var(--sf-danger); font-size: .875rem; font-weight: 600; }
.sf-fieldset { border: 0; padding: 0; margin: 0 0 8px; }
.sf-fieldset legend { font: 800 1.35rem/1 var(--sf-display); color: var(--sf-ink); margin-bottom: 12px; }
.sf-formgrid { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
.sf-formgrid__full { grid-column: 1 / -1; }
@media (min-width: 640px) {
    .sf-formgrid { grid-template-columns: 1fr 1fr; }
    .sf-formgrid--4 { grid-template-columns: repeat(4, 1fr); }
}
.sf-check { margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; padding-left: 0; }
.sf-check .form-check-input { margin: 2px 0 0; float: none; flex: none; }
.sf-input-icon { position: relative; flex: 1; }
.sf-input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--sf-muted); pointer-events: none; }
.sf-input-icon > .form-control { padding-left: 40px; }
.sf-input-group { display: flex; gap: 8px; }
.sf-password { position: relative; }
.sf-password .form-control { padding-right: 52px; }
.sf-password__toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--sf-muted); }
.sf-password__toggle:hover { color: var(--sf-ink); }

/* Select2 (Econt checkout) */
.sf .select2-container { width: 100% !important; }
.sf .select2-container--default .select2-selection--single { height: 44px; border: 1.5px solid var(--sf-line-2); border-radius: var(--sf-radius-sm); }
.sf .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 41px; padding-left: 12px; color: var(--sf-ink); }
.sf .select2-container--default .select2-selection--single .select2-selection__arrow { height: 41px; }
.sf .select2-dropdown { border-color: var(--sf-line-2); border-radius: var(--sf-radius-sm); overflow: hidden; }
.sf .select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--sf-graphite); }
.datepicker-dropdown, .datepicker { z-index: 1060 !important; }

/* 5. Alerts / notices / empty states
   ----------------------------------------------------------------------- */
.sf-flash { padding-top: 16px; }
.sf-alert {
    display: flex; gap: 12px; align-items: flex-start;
    border: 0; border-left: 4px solid currentColor; border-radius: var(--sf-radius); padding: 14px 16px; margin-bottom: 16px; font-weight: 500;
}
.sf-alert > i { font-size: 1.15rem; margin-top: 2px; }
.sf-alert > div { flex: 1; }
.sf-alert.alert-dismissible { padding-right: 16px; }
.sf-alert .btn-close { position: static; padding: 6px; }
.sf .alert-success { background: var(--sf-success-bg); color: var(--sf-success); }
.sf .alert-danger { background: var(--sf-danger-bg); color: var(--sf-danger); }
.sf .alert-warning { background: var(--sf-warn-bg); color: var(--sf-warn); }
.sf .alert-info { background: var(--sf-info-bg); color: var(--sf-info); }
.sf-alert a { font-weight: 700; text-decoration: underline; color: inherit; }

.sf-hint { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 20px; background: var(--sf-surface); border: 1px solid var(--sf-line); border-left: 4px solid var(--sf-graphite); color: var(--sf-ink-2); }
.sf-hint a { font-weight: 700; }

.sf-notice {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
    padding: 14px 16px; margin-bottom: 16px;
    background: var(--sf-graphite); color: #e3e6e9;
}
.sf-notice > i { font-size: 1.3rem; color: #ffb020; }
.sf-notice > div { flex: 1 1 220px; display: flex; flex-direction: column; }
.sf-notice strong { color: #fff; }
.sf-notice span { color: var(--sf-steel-2); font-size: .92rem; }
.sf-notice--guest > i { color: var(--sf-brand); }
.sf-notice .sf-btn--outline { --_fg: #fff; --_bd: rgba(255,255,255,.55); }
.sf-notice .sf-btn--outline:hover { --_bg: #fff; --_fg: var(--sf-ink); --_bd: #fff; }
.sf-notice__actions { display: flex; gap: 8px; flex: 0 0 auto !important; flex-direction: row !important; }

.sf-empty {
    text-align: center; padding: clamp(32px, 6vw, 64px) 24px; margin: 8px 0 24px;
    background: var(--sf-surface); border: 1px dashed var(--sf-line-2);
}
.sf-empty > i { font-size: 2.2rem; color: var(--sf-steel); margin-bottom: 12px; display: block; }
.sf-empty__title { font: 800 1.6rem/1.05 var(--sf-display); margin-bottom: 16px; }
.sf-empty p:last-child { margin-bottom: 0; }
.sf-empty--compact { border: 0; background: transparent; padding: 32px 8px; }

.sf-searching { display: flex; align-items: center; gap: 10px; padding: 24px 0; color: var(--sf-muted); }

/* 6. Admin bar (admins only)
   ----------------------------------------------------------------------- */
.adminbar { background: #ffb020; position: relative; z-index: 1040; }
.adminbar .container { display: flex; flex-wrap: wrap; }
.adminbar-block { position: relative; flex: 1 1 auto; }
.adminbar-trigger { display: block; color: var(--sf-ink) !important; font-size: .8rem; font-weight: 700; line-height: 36px; padding: 0 8px; }
.adminbar-block ul { display: none; position: absolute; top: 36px; left: 0; min-width: 240px; z-index: 1041; list-style: none; margin: 0; padding: 8px; background: #fff; box-shadow: var(--sf-shadow); }
.adminbar-block:hover ul, .adminbar-block:focus-within ul { display: block; }
.adminbar-block ul li a { display: block; padding: 6px 8px; color: var(--sf-ink); font-size: .9rem; }
.adminbar-block ul li a:hover { background: var(--sf-bg); }
.sf-admin-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 12px; }
.sf-admin-tools form { margin: 0; }
.sf-admin-tools--inline { padding: 16px 0 0; }
.admin .category-image { max-width: 90px; }

/* 7. Header — graphite bar, slanted logo tab, catalogue rail
   ----------------------------------------------------------------------- */
.sf-topbar { background: #1b1d21; color: var(--sf-steel); font-size: .82rem; }
.sf-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 34px; }
.sf-topbar__note { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-topbar__note b { color: #fff; }
.sf-topbar__note i { color: var(--sf-brand); }
.sf-topbar__right { display: none; align-items: center; gap: 20px; margin-left: auto; }
.sf-topbar a { color: var(--sf-steel-2) !important; }
.sf-topbar a:hover, .sf-topbar a[aria-current] { color: #fff !important; }
.sf-topbar__link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.sf-topbar :focus-visible { outline-color: #fff; }
@media (min-width: 768px) { .sf-topbar__right { display: flex; } }

.sf-header { position: relative; z-index: 1030; background: var(--sf-graphite); color: #fff; }
.sf-header :focus-visible { outline-color: #fff; }
@media (min-width: 768px) { .sf-header { position: sticky; top: 0; } }

.sf-mainbar { overflow-x: clip; }
.sf-mainbar__inner {
    display: grid; align-items: center; gap: 0 12px;
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas:
        "menu brand . actions"
        "search search search search"
        "customer customer customer customer";
}
.sf-mainbar__menu { grid-area: menu; position: relative; z-index: 1; margin-left: -10px; color: var(--sf-ink); }
.sf-header .sf-mainbar__menu:focus-visible { outline-color: var(--sf-ink); outline-offset: -2px; }

/* The logo sits on a white tab that runs off the left edge and ends in a slanted cut with a red stripe. */
.sf-brand {
    grid-area: brand; position: relative; z-index: 0; align-self: stretch;
    display: flex; align-items: center; line-height: 0;
    padding: 10px 40px 10px 4px;
    background: var(--sf-brand);
    clip-path: polygon(-100vw 0, 100% 0, calc(100% - 22px) 100%, -100vw 100%);
}
.sf-brand::before {
    content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -100vw; right: 9px;
    background: #fff;
    clip-path: polygon(0 0, 100% 0, calc(100% - 22px) 100%, 0 100%);
}
.sf-brand img { height: 34px; width: auto; }
.sf-brand:focus-visible { outline-offset: -4px; outline-color: var(--sf-ink); }

.sf-search { grid-area: search; position: relative; display: flex; margin: 10px 0 0; }
.sf-search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--sf-muted); pointer-events: none; }
.sf-search__input {
    flex: 1; min-width: 0; height: 44px; padding: 0 12px 0 40px;
    border: 0; border-radius: var(--sf-radius-sm) 0 0 var(--sf-radius-sm);
    background: #fff; font: 500 1rem var(--sf-font); color: var(--sf-ink);
}
.sf-search__input::placeholder { color: #737a84; }
.sf-search__input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--sf-brand); }
.sf-search__btn {
    height: 44px; padding: 0 18px; border: 0; border-radius: 0 var(--sf-radius-sm) var(--sf-radius-sm) 0;
    background: var(--sf-brand); color: #fff; font: 700 .95rem var(--sf-font); cursor: pointer;
}
.sf-search__btn:hover { background: var(--sf-brand-600); }

/* Customer ("обект") slot */
.sf-customer {
    grid-area: customer; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label change" "name change";
    align-items: center; column-gap: 12px; text-align: left; min-width: 0;
    margin: 10px 0 12px; padding: 8px 12px; border: 1px solid var(--sf-graphite-line); border-left: 4px solid var(--sf-brand);
    background: var(--sf-graphite-2); color: #fff; font: inherit; cursor: pointer; border-radius: var(--sf-radius-sm);
}
.sf-customer:hover { background: var(--sf-graphite-3); }
.sf-customer__label { grid-area: label; font-size: .75rem; color: var(--sf-steel); line-height: 1.2; }
.sf-customer__name { grid-area: name; font: 800 1.2rem/1.05 var(--sf-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-customer__name.is-empty { color: #ffb020; }
.sf-customer__change { grid-area: change; font-size: .82rem; font-weight: 700; color: #fff; text-decoration: underline; text-decoration-color: var(--sf-brand); text-underline-offset: 3px; }

.sf-actions { grid-area: actions; display: flex; align-items: center; gap: 4px; }
.sf-action {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    min-height: 44px; padding: 6px 10px; border: 0; border-radius: var(--sf-radius-sm); background: transparent;
    color: #fff !important; font: 600 .92rem var(--sf-font); cursor: pointer; white-space: nowrap;
}
.sf-action > i { font-size: 1.1rem; color: var(--sf-steel-2); }
.sf-action:hover { background: var(--sf-graphite-3); }
.sf-action[aria-current] { box-shadow: inset 0 -3px 0 var(--sf-brand); }
.sf-action__text { display: none; }
.sf-action--primary { background: var(--sf-brand); }
.sf-action--primary > i { color: #fff; }
.sf-action--primary:hover { background: var(--sf-brand-600); }
.sf-action--ghost { display: none; }
.sf-action--cart { padding: 0 0 0 14px; background: var(--sf-brand); gap: 0; }
.sf-action--cart:hover { background: var(--sf-brand-600); }
.sf-action--cart .sf-action__text { display: inline; margin-right: 12px; font-weight: 700; }
.sf-action__count {
    display: grid; place-items: center; align-self: stretch; min-width: 44px; padding: 0 8px;
    background: rgba(0,0,0,.22); font: 800 1.45rem/1 var(--sf-display); font-variant-numeric: tabular-nums;
}
.sf-action__count.is-idle { font-size: 1rem; }
.cart-count.blink { color: var(--sf-brand-600); }

/* Mobile: auth actions live in the bottom nav */
@media (max-width: 767.98px) {
    .member .sf-actions { display: none; }
    .sf-action--primary .sf-action__text { display: inline; }
}
@media (min-width: 576px) {
    .sf-action--ghost { display: inline-flex; }
    .sf-action--ghost .sf-action__text, .sf-action--primary .sf-action__text { display: inline; }
}
@media (min-width: 768px) {
    .sf-mainbar__inner {
        grid-template-columns: auto auto minmax(200px, 1fr) auto;
        grid-template-areas:
            "menu brand search actions"
            "customer customer customer customer";
        gap: 0 16px;
    }
    .sf-search { margin: 0; }
    .sf-action--ghost { display: none; }
    .sf-brand { min-height: 64px; }
    .sf-brand img { height: 38px; }
    .sf-customer { margin: 0 0 10px; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
    .sf-search__btn { padding: 0 14px; }
    .sf-search__input { padding-left: 36px; }
    .sf-search__icon { left: 12px; }
}
@media (min-width: 992px) {
    .sf-mainbar__inner {
        grid-template-columns: auto minmax(260px, 1fr) minmax(0, 260px) auto;
        grid-template-areas: "brand search customer actions";
        gap: 0 20px;
    }
    .sf-mainbar__menu { display: none; }
    .sf-brand { min-height: 76px; padding-right: 52px; }
    .sf-brand img { height: 46px; }
    .sf-search { max-width: 620px; }
    .sf-customer { margin: 0; align-self: center; }
    .sf-action--ghost { display: inline-flex; }
    .sf-action__text { display: inline; }
    .sf-actions { gap: 8px; }
    .sf-action--cart { min-height: 48px; }
    .sf-action--cart .sf-action__count { min-width: 50px; }
}

/* Catalogue rail */
.sf-nav { display: none; background: var(--sf-graphite-2); border-top: 1px solid var(--sf-graphite-line); position: relative; z-index: 1025; }
@media (min-width: 768px) { .sf-nav { display: block; } }
.sf-nav__inner { display: flex; align-items: stretch; gap: 0; min-height: 46px; }
.sf-rail { flex: 1; min-width: 0; position: relative; }
.sf-rail::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 40px; pointer-events: none; background: linear-gradient(90deg, rgba(45,49,55,0), var(--sf-graphite-2)); }
.sf-rail ul { display: flex; list-style: none; margin: 0; padding: 0 4px; height: 100%; overflow: hidden; }
.sf-rail ul::-webkit-scrollbar { display: none; }
.sf-rail li { flex: none; }
.sf-rail a {
    display: flex; align-items: center; height: 100%; padding: 0 clamp(6px, .7vw, 11px);
    color: var(--sf-steel-2) !important; font: 700 clamp(.88rem, .92vw, 1.05rem)/1 var(--sf-display); letter-spacing: .01em; white-space: nowrap;
    box-shadow: inset 0 -3px 0 transparent; transition: color .15s, box-shadow .15s;
}
.sf-rail a:hover { color: #fff !important; box-shadow: inset 0 -3px 0 var(--sf-steel); }
.sf-rail a[aria-current] { color: #fff !important; box-shadow: inset 0 -3px 0 var(--sf-brand); }
.sf-rail a:focus-visible { outline-offset: -3px; }
.sf-nav__quick {
    flex: none; display: flex; align-items: center; gap: 8px; padding: 0 0 0 16px; margin-left: 8px;
    border-left: 1px solid var(--sf-graphite-line); color: #fff !important; font-weight: 700; font-size: .9rem; white-space: nowrap;
}
.sf-nav__quick i { color: #ffb020; }
.sf-nav__quick:hover, .sf-nav__quick[aria-current] { color: #ffb020 !important; }

.sf-catmenu { position: relative; display: none; }
@media (min-width: 992px) { .sf-catmenu { display: block; } }
.sf-catmenu__toggle {
    display: inline-flex; align-items: center; gap: 10px; height: 100%; min-height: 46px; padding: 0 34px 0 16px; margin-left: calc(-1 * clamp(16px, 3vw, 28px));
    padding-left: clamp(16px, 3vw, 28px);
    border: 0; background: var(--sf-brand); color: #fff; font: 800 1.25rem/1 var(--sf-display); cursor: pointer;
    clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
}
.sf-catmenu__toggle:hover, .sf-catmenu.is-open .sf-catmenu__toggle { background: var(--sf-brand-600); }
.sf-catmenu__toggle:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }
.sf-catmenu__chev { font-size: .7rem; transition: transform .2s; }
.sf-catmenu.is-open .sf-catmenu__chev { transform: rotate(180deg); }
.sf-catmenu__panel {
    position: absolute; top: 100%; left: calc(-1 * clamp(16px, 3vw, 28px)); width: 320px; z-index: 1050;
    background: var(--sf-surface); color: var(--sf-ink); border-top: 3px solid var(--sf-brand); box-shadow: var(--sf-shadow-lg);
}
.sf-catmenu__list { list-style: none; margin: 0; padding: 6px 0; max-height: min(70vh, 640px); overflow-y: auto; }
.sf-catmenu__item > a {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 20px; color: var(--sf-ink) !important; font: 700 1.2rem/1.1 var(--sf-display);
}
.sf-catmenu__item > a i { font-size: .7rem; color: var(--sf-muted); }
.sf-catmenu__item:hover > a, .sf-catmenu__item:focus-within > a { background: var(--sf-graphite); color: #fff !important; }
.sf-catmenu__item:hover > a i, .sf-catmenu__item:focus-within > a i { color: #fff; }
.sf-catmenu__sub {
    display: none; position: absolute; top: -3px; left: 100%; min-height: calc(100% + 3px); width: min(560px, calc(100vw - 380px));
    padding: 20px 28px; background: var(--sf-surface); border-top: 3px solid var(--sf-graphite); box-shadow: var(--sf-shadow-lg);
}
.sf-catmenu__item:hover > .sf-catmenu__sub, .sf-catmenu__item:focus-within > .sf-catmenu__sub { display: block; }
.sf-catmenu__subhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font: 800 1.8rem/1 var(--sf-display); color: var(--sf-ink) !important; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--sf-line); }
.sf-catmenu__subhead span { font: 700 .85rem var(--sf-font); color: var(--sf-brand-600); }
.sf-catmenu__sub ul { list-style: none; margin: 0; padding: 0; columns: 1; }
.sf-catmenu__sub ul.is-columns { columns: 2; column-gap: 28px; }
.sf-catmenu__sub li { break-inside: avoid; }
.sf-catmenu__sub li a { display: block; padding: 6px 0; color: var(--sf-ink-2); }
.sf-catmenu__sub li a:hover { color: var(--sf-brand-600); }

/* Mobile drawer */
.sf-drawer-backdrop { position: fixed; inset: 0; z-index: 1060; background: rgba(15,16,18,.6); }
.sf-drawer {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 1061; width: min(380px, 90vw);
    display: flex; flex-direction: column; background: var(--sf-surface); box-shadow: var(--sf-shadow-lg);
    transform: translateX(-102%); visibility: hidden; transition: transform .28s var(--sf-ease), visibility .28s;
}
.sf-drawer.is-open { transform: none; visibility: visible; transition: transform .28s var(--sf-ease), visibility 0s; }
.sf-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 20px; background: #fff; border-bottom: 3px solid var(--sf-brand); }
.sf-drawer__head img { height: 32px; width: auto; }
.sf-drawer__head .sf-iconbtn { color: var(--sf-ink); }
.sf-drawer__body { flex: 1; overflow-y: auto; padding: 16px 16px 32px; overscroll-behavior: contain; }
.sf-drawer__cta { display: grid; gap: 8px; padding: 0 0 8px; }
.sf-customer--drawer { margin: 0; }
.sf-drawer__title { margin: 20px 0 4px; font: 800 1.6rem/1 var(--sf-display); color: var(--sf-ink); }
.sf-drawer__list, .sf-drawer__sub { list-style: none; margin: 0; padding: 0; }
.sf-drawer__row { display: flex; align-items: center; }
.sf-drawer__row > a { flex: 1; padding: 11px 0; color: var(--sf-ink); font: 700 1.25rem/1.1 var(--sf-display); }
.sf-drawer__expand { width: 44px; height: 44px; border: 0; background: none; color: var(--sf-muted); }
.sf-drawer__expand[aria-expanded="true"] { color: var(--sf-brand); }
.sf-drawer__expand[aria-expanded="true"] i { transform: rotate(180deg); }
.sf-drawer__expand i { transition: transform .2s; }
.sf-drawer__list > li + li { border-top: 1px solid var(--sf-line); }
.sf-drawer__list--plain .sf-drawer__row > a { font: 600 1rem var(--sf-font); }
.sf-drawer__sub { padding: 0 0 10px; }
.sf-drawer__sub a { display: block; padding: 8px 12px; color: var(--sf-ink-2); border-left: 3px solid var(--sf-line); }
.sf-drawer__sub a:hover { border-left-color: var(--sf-brand); }
.sf-drawer__contact { display: grid; gap: 4px; margin-top: 24px; padding: 16px 0 0; border-top: 1px solid var(--sf-line); }
.sf-drawer__contact a { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--sf-ink); font-weight: 600; }
body.sf-lock { overflow: hidden; }

/* Mobile bottom navigation */
.sf-bottomnav { display: none; }
@media (max-width: 767.98px) {
    :root { --sf-bottomnav-h: calc(62px + env(safe-area-inset-bottom, 0px)); }
    body.sf { padding-bottom: var(--sf-bottomnav-h); }
    .sf-bottomnav {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1050;
        display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
        height: var(--sf-bottomnav-h); padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--sf-graphite); border-top: 1px solid var(--sf-graphite-line);
    }
    .sf-bottomnav :focus-visible { outline-color: #fff; outline-offset: -4px; }
}
.sf-bottomnav__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0;
    padding: 6px 2px 4px; border: 0; background: transparent; color: var(--sf-steel-2) !important;
    font: 600 .7rem/1.1 var(--sf-font); text-align: center; cursor: pointer;
    box-shadow: inset 0 3px 0 transparent;
}
.sf-bottomnav__item > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-bottomnav__item i { font-size: 1.15rem; }
.sf-bottomnav__item[aria-current], .sf-bottomnav__item[aria-expanded="true"] { color: #fff !important; box-shadow: inset 0 3px 0 var(--sf-brand); }
.sf-bottomnav__item--cart { background: var(--sf-brand); color: #fff !important; }
.sf-bottomnav__icon { position: relative; display: inline-grid; place-items: center; }
.sf-bottomnav__icon b {
    position: absolute; top: -8px; right: -14px; min-width: 20px; height: 20px; padding: 0 5px;
    display: grid; place-items: center; background: #fff; color: var(--sf-brand-700);
    font: 800 .95rem/1 var(--sf-display); border-radius: 2px;
}

/* 8. Page scaffolding
   ----------------------------------------------------------------------- */
.sf-page { padding: 20px 0 64px; }
.sf-section { padding: clamp(32px, 5vw, 56px) 0; }
.sf-section--tight { padding: 20px 0; }
.sf-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 3px solid var(--sf-ink); }
.sf-section__title { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); margin: 0; }
.sf-section__meta { margin: 0; color: var(--sf-muted); font-weight: 600; }
.sf-eyebrow { margin: 0 0 4px; font-size: .88rem; font-weight: 700; color: var(--sf-brand-600); }
.sf-eyebrow--link { display: inline-block; }
.sf-block { margin-bottom: 24px; }

.sf-pagehead { background: var(--sf-surface); border-bottom: 1px solid var(--sf-line); padding: 14px 0 20px; }
.sf-pagehead--slim { padding: 10px 0 2px; }
.sf-pagehead__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.sf-pagehead__title { margin: 0; font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.8rem); }
.sf-pagehead__sub { margin: 8px 0 0; color: var(--sf-muted); font-weight: 600; }

.sf-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; list-style: none; margin: 0 0 8px; padding: 0; font-size: .85rem; }
.sf-crumbs li { display: inline-flex; align-items: center; gap: 4px; color: var(--sf-muted); min-width: 0; }
.sf-crumbs li + li::before { content: ""; width: 6px; height: 10px; margin: 0 4px; background: var(--sf-line-2); clip-path: polygon(40% 0, 100% 0, 60% 100%, 0 100%); }
.sf-crumbs a { color: var(--sf-ink-2); display: inline-flex; align-items: center; min-height: 28px; }
.sf-crumbs a:hover { color: var(--sf-brand-600); }
.sf-crumbs [aria-current] { color: var(--sf-ink); font-weight: 600; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sf-card { background: var(--sf-surface); border: 1px solid var(--sf-line); border-radius: var(--sf-radius); padding: clamp(16px, 2.5vw, 24px); margin-bottom: 16px; }
.sf-card--flush { padding: 0; overflow: hidden; }
.sf-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sf-card__title { font: 800 1.75rem/1 var(--sf-display); margin: 0 0 16px; }
.sf-card__title .sf-muted { font-size: 1.2rem; }
.sf-card__head .sf-card__title { margin: 0; }

.sf-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.sf-toolbar .sf-field { margin: 0; min-width: min(100%, 340px); }

/* 9. Home: order desk, slider, banners, brands
   ----------------------------------------------------------------------- */
.sf-desk { background: var(--sf-graphite-2); color: #e3e6e9; padding: clamp(28px, 5vw, 64px) 0 clamp(32px, 5vw, 64px); border-top: 1px solid var(--sf-graphite-line); }
.sf-desk__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
@media (min-width: 992px) { .sf-desk__grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: center; } }
.sf-desk__kicker { margin: 0 0 10px; color: var(--sf-steel); font-weight: 600; }
.sf-desk__customer { border: 0; padding: 0; background: none; color: #fff; font: inherit; font-weight: 700; text-decoration: underline; text-decoration-color: var(--sf-brand); text-underline-offset: 4px; cursor: pointer; }
.sf-desk__customer i { font-size: .8em; margin-left: 4px; color: var(--sf-steel); }
.sf-desk__title { color: #fff !important; font-size: clamp(2.9rem, 1.6rem + 5.4vw, 6.2rem); line-height: .88 !important; margin: 0 0 20px; max-width: 14ch; }
.sf-desk__lead { font-size: clamp(1rem, .95rem + .3vw, 1.15rem); color: var(--sf-steel-2); max-width: 52ch; margin-bottom: 24px; }
.sf-desk__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.sf-desk__search { position: relative; display: flex; max-width: 680px; margin: 0 0 18px; }
.sf-desk__search > i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--sf-muted); font-size: 1.1rem; }
.sf-desk__search input { flex: 1; min-width: 0; height: 60px; padding: 0 16px 0 50px; border: 0; border-radius: 2px 0 0 2px; font: 500 1.1rem var(--sf-font); color: var(--sf-ink); }
.sf-desk__search input:focus { box-shadow: inset 0 0 0 3px var(--sf-brand); }
.sf-desk__search .sf-btn { min-height: 60px; border-radius: 0 2px 2px 0; padding: 0 28px; font-size: 1.05rem; }
@media (max-width: 575.98px) {
    .sf-desk__search input { height: 52px; padding-left: 42px; font-size: 1rem; }
    .sf-desk__search > i { left: 15px; }
    .sf-desk__search .sf-btn { min-height: 52px; padding: 0 16px; }
}
.sf-desk__links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.sf-desk__links a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: #fff; font-weight: 600; }
.sf-desk__links a i { color: var(--sf-brand); }
.sf-desk__links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* Docket: paper slip with a perforated bottom edge */
.sf-docket {
    position: relative; background: var(--sf-surface); color: var(--sf-ink);
    border-top: 6px solid var(--sf-brand); padding: 0 0 12px; margin-bottom: 8px;
}
.sf-docket::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px;
    color: var(--sf-surface); background: var(--sf-perf);
}
.sf-docket__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 20px 12px; border-bottom: 1px dashed var(--sf-line-2); font: 800 1.35rem/1 var(--sf-display); }
.sf-docket__head time { font-size: 1.35rem; color: var(--sf-muted); font-variant-numeric: tabular-nums; }
.sf-docket__status { padding: 14px 20px; display: flex; flex-direction: column; gap: 2px; }
.sf-docket__status strong { font: 800 2rem/1 var(--sf-display); }
.sf-docket__status span { color: var(--sf-muted); font-size: .92rem; }
.sf-docket__status.is-today strong { color: var(--sf-success); }
.sf-docket__status.is-next strong, .sf-docket__status.is-closed strong { color: var(--sf-brand-600); }
.sf-docket__rows { margin: 0 20px; border-top: 1px solid var(--sf-line); }
.sf-docket__rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--sf-line); font-size: .9rem; }
.sf-docket__rows dt { font-weight: 500; color: var(--sf-ink-2); }
.sf-docket__rows dd { margin: 0; font-weight: 700; text-align: right; }
.sf-docket__cart { display: flex; justify-content: space-between; align-items: center; margin: 14px 20px 0; padding: 10px 14px; background: var(--sf-graphite); color: #fff !important; font-weight: 600; }
.sf-docket__cart b { font: 800 1.5rem/1 var(--sf-display); }
.sf-docket__cart:hover { background: var(--sf-brand); }
.sf-docket__phone { display: flex; align-items: center; gap: 8px; margin: 12px 20px 4px; color: var(--sf-ink) !important; font-weight: 600; font-size: .92rem; }
.sf-docket__phone i { color: var(--sf-brand); }

.sf-slider { position: relative; background: var(--sf-graphite); }
.sf-slider .swiper-container { overflow: hidden; }
.sf-slide { min-height: clamp(220px, 32vw, 420px); display: flex; background-size: cover; background-position: center; position: relative; }
.sf-slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,22,25,.7) 0%, rgba(20,22,25,.2) 55%, transparent 80%); }
.sf-slide__inner { position: relative; display: flex; align-items: center; padding-top: 32px; padding-bottom: 48px; }
.sf-slide__content { max-width: 620px; }
.sf-slide__eyebrow { font-weight: 700; font-size: .95rem; margin-bottom: 8px; }
.sf-slide__title { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4.4rem); margin-bottom: 12px; }
.sf-slide__text { font-size: clamp(1rem, .95rem + .4vw, 1.2rem); margin-bottom: 20px; }
.sf-slider .swiper-pagination { bottom: 16px !important; }
.sf-slider .swiper-pagination-bullet { width: 18px; height: 4px; border-radius: 0; background: #fff; opacity: .5; }
.sf-slider .swiper-pagination-bullet-active { opacity: 1; background: var(--sf-brand); width: 36px; }
.sf-slider__nav { display: none !important; width: 44px !important; height: 44px !important; border: 0; background: #fff !important; color: var(--sf-ink) !important; }
.sf-slider__nav::after { font-size: 1rem !important; font-weight: 800; }
@media (min-width: 992px) { .sf-slider__nav { display: flex !important; } }

.sf-banners { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sf-banners--2, .sf-banners--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .sf-banners--3 { grid-template-columns: repeat(3, 1fr); } }
.sf-banner { display: block; overflow: hidden; background: var(--sf-surface); }
.sf-banner img { display: block; width: 100%; height: auto; }
.sf-banner:hover { outline: 3px solid var(--sf-ink); outline-offset: -3px; }

.sf-brands { background: var(--sf-surface); border-top: 1px solid var(--sf-line); padding: 28px 0; }
.sf-brands__title { font: 800 1.6rem/1 var(--sf-display); margin: 0 0 16px; }
.sf-brands__list { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; border-left: 1px solid var(--sf-line); }
.sf-brands__item { flex: 0 0 auto; scroll-snap-align: start; width: 136px; height: 76px; display: grid; place-items: center; padding: 10px; border: 1px solid var(--sf-line); border-left: 0; background: #fff; }
.sf-brands__item img { max-height: 52px; width: auto; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.sf-brands__item:hover img { filter: none; opacity: 1; }

.sf-cta { display: grid; gap: 20px; align-items: center; padding: clamp(24px, 4vw, 40px); background: var(--sf-graphite); color: #e3e6e9; }
.sf-cta__title { color: #fff !important; font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); margin: 0 0 8px; }
.sf-cta__text { margin: 0; max-width: 60ch; }
.sf-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 992px) { .sf-cta { grid-template-columns: 1fr auto; } }

/* 10. Catalogue index — "aisle board": numbered image tiles, graphite name plate, dense subcategory links
   ----------------------------------------------------------------------- */
.sf-aisles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .sf-aisles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 992px) { .sf-aisles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .sf-aisles { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.sf-aisles.is-collapsed > .sf-aisle:nth-child(n+13) { display: none; }
@media (min-width: 1200px) {
    .sf-aisles.is-collapsed > .sf-aisle:nth-child(n+13) { display: flex; }
    .sf-aisles.is-collapsed > .sf-aisle:nth-child(n+16) { display: none; }
    .sf-aisles__more.is-fit-xl { display: none; }
}
.sf-aisles + .sf-center { margin-top: 20px; }

.sf-aisle { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--sf-graphite); color: #fff; border-radius: var(--sf-radius); overflow: hidden; }
.sf-aisle__link { display: flex; flex-direction: column; color: #fff !important; }
.sf-aisle__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sf-graphite-2); }
.sf-aisle__media picture, .sf-aisle__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sf-aisle__media img { transition: transform .5s var(--sf-ease); }
.sf-aisle__media::after { content: ""; position: absolute; inset: auto 0 0; height: 38%; background: linear-gradient(to top, rgba(36, 39, 44, .55), rgba(36, 39, 44, 0)); pointer-events: none; }
.sf-aisle__no { position: absolute; left: 0; top: 0; z-index: 1; min-width: 44px; padding: 5px 9px 3px; background: var(--sf-brand); font: 800 1.2rem/1 var(--sf-display); letter-spacing: .02em; text-align: center; }
.sf-aisle__plate { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 12px 14px 12px; }
.sf-aisle__plate::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--sf-brand); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--sf-ease); }
.sf-aisle__title { margin: 0; color: #fff !important; font: 800 1.6rem/.95 var(--sf-display) !important; overflow-wrap: anywhere; }
.sf-aisle__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--sf-steel); font-size: .8rem; font-weight: 600; }
.sf-aisle__meta i { color: var(--sf-steel); transition: transform .25s var(--sf-ease), color .25s; }
.sf-aisle__link:hover .sf-aisle__media img, .sf-aisle__link:focus-visible .sf-aisle__media img { transform: scale(1.05); }
.sf-aisle__link:hover .sf-aisle__plate::before, .sf-aisle__link:focus-visible .sf-aisle__plate::before { transform: scaleX(1); }
.sf-aisle__link:hover .sf-aisle__meta i, .sf-aisle__link:focus-visible .sf-aisle__meta i { color: #fff; transform: translateX(3px); }
.sf-aisle__link:focus-visible { outline-offset: -4px; outline-color: #fff; }

.sf-aisle__subs { flex: 1; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0 4px; margin: 0; padding: 9px 14px 12px; list-style: none; border-top: 1px solid var(--sf-graphite-line); font-size: .84rem; line-height: 1.35; }
.sf-aisle__subs li { display: inline-flex; align-items: center; min-width: 0; }
.sf-aisle__subs li:not(:last-child)::after { content: ""; width: 3px; height: 3px; margin-left: 6px; border-radius: 50%; background: var(--sf-graphite-line); }
.sf-aisle__subs a { display: inline-block; padding: 3px 0; color: var(--sf-steel-2) !important; }
.sf-aisle__subs a:hover { color: #fff !important; text-decoration: underline; text-underline-offset: 3px; }
.sf-aisle__subs a.is-more { color: #ff8a8d !important; font-weight: 700; }
.sf-aisle > .sf-admin-tools { padding: 0 14px 12px; }

@media (max-width: 639.98px) {
    .sf-aisle__subs { display: none; }
    .sf-aisle__plate { flex: 1; padding: 10px 11px 11px; gap: 6px; justify-content: space-between; }
    .sf-aisle__title { font-size: 1.32rem !important; }
    .sf-aisle__meta { font-size: .74rem; }
    .sf-aisle__no { min-width: 36px; font-size: 1rem; padding: 4px 7px 2px; }
}
@media (hover: none) {
    .sf-aisle__link:hover .sf-aisle__media img { transform: none; }
}

/* Subcategory rail on category pages */
.sf-subnav { margin: 0 0 16px; }
.sf-subnav ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0 0 4px; overflow-x: auto; scrollbar-width: thin; }
@media (min-width: 992px) { .sf-subnav ul { flex-wrap: wrap; overflow: visible; } }
.sf-subnav li { flex: none; position: relative; }
.sf-subnav a {
    display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 14px 4px 4px;
    background: var(--sf-surface); border: 1px solid var(--sf-line); color: var(--sf-ink) !important;
    font: 700 1.2rem/1 var(--sf-display); white-space: nowrap;
}
.sf-subnav a:hover { border-color: var(--sf-ink); box-shadow: inset 0 -3px 0 var(--sf-brand); }
.sf-subnav__thumb { width: 40px; height: 40px; background: var(--sf-subtle); overflow: hidden; flex: none; }
.sf-subnav__thumb img, .sf-subnav__thumb picture { display: block; width: 100%; height: 100%; object-fit: cover; }
.sf-subnav__admin { position: absolute; top: -6px; right: -6px; margin: 0; }
.sf-subnav__admin .btn { padding: 0 5px; font-size: .7rem; }

/* 11. Filters
   ----------------------------------------------------------------------- */
.sf-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 14px; margin-bottom: 12px; background: var(--sf-surface); border: 1px solid var(--sf-line); }
.sf-filters__title { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 800 1.35rem/1 var(--sf-display) !important; }
.sf-filters__fields { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; align-items: center; }
.sf-filters .sf-field { margin: 0; flex: 1 1 160px; max-width: 240px; }
.sf-filters .form-select { min-height: 40px; font-size: .92rem; }
.sf-filters .form-select.is-active { border-color: var(--sf-ink); background-color: var(--sf-subtle); font-weight: 700; box-shadow: inset 3px 0 0 var(--sf-brand); }
@media (max-width: 575.98px) { .sf-filters .sf-field { max-width: none; flex-basis: calc(50% - 4px); } }

/* 12. Order sheet (product list) + product row
   ----------------------------------------------------------------------- */
.sf-sheet { background: var(--sf-surface); border: 1px solid var(--sf-line); border-top: 3px solid var(--sf-ink); }
.sf-sheet__head { display: none; }
.sf-grid { display: block; }
.sf-grid__cell { min-width: 0; display: block; border-bottom: 1px solid var(--sf-line); }
.sf-grid__cell:last-child { border-bottom: 0; }

.sf-product {
    position: relative; width: 100%;
    display: grid; align-items: center; gap: 4px 12px;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    grid-template-areas:
        "media body body"
        "media pack price"
        "buy buy buy";
    padding: 12px 14px;
    background: var(--sf-surface);
    transition: background-color .15s;
}
.sf-product:hover { background: #fafbfb; }
.product-selected .sf-product, .sf-product.hover { background: var(--sf-brand-50); box-shadow: inset 4px 0 0 var(--sf-brand); }
.sf-product__media { grid-area: media; align-self: start; display: block; width: 56px; height: 56px; background: #fff; border: 1px solid var(--sf-line); overflow: hidden; }
.sf-product__media img, .sf-product__media picture { display: block; width: 100%; height: 100%; object-fit: contain; }
.sf-product__body { grid-area: body; min-width: 0; }
.sf-product__title { margin: 0; font: 600 .98rem/1.3 var(--sf-font) !important; }
.sf-product__title a { color: var(--sf-ink) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sf-product__title a:hover { color: var(--sf-brand-600) !important; text-decoration: underline; text-underline-offset: 2px; }
.sf-product__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 3px 0 0; font-size: .78rem; color: var(--sf-muted); }
.sf-product__meta:empty { display: none; }
.sf-product__code { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.sf-product__badge {
    display: inline-block; max-width: 100%; padding: 2px 8px; background: var(--sf-brand); color: #fff;
    font-size: .74rem; font-weight: 700; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%); padding-right: 12px;
}
.sf-product__pack { grid-area: pack; margin: 0; color: var(--sf-muted); font-size: .85rem; white-space: nowrap; }
.sf-product__pack b { color: var(--sf-ink); font: 800 1.15rem/1 var(--sf-display); }
.sf-product__foot { display: contents; }
.sf-product .sf-price, .sf-product .sf-price-locked { grid-area: price; justify-self: end; }
.sf-product .sf-buy, .sf-product .sf-stock { grid-area: buy; }
.sf-product .sf-stock { justify-self: start; margin-top: 4px; }
.sf-product .sf-buy { margin-top: 6px; }
.sf-product > .sf-admin-tools { grid-column: 1 / -1; padding: 6px 0 0; }
.is-guest .sf-product { grid-template-areas: "media body body" "media pack price"; }

@media (min-width: 768px) {
    .sf-product {
        grid-template-columns: 56px minmax(0, 1fr) 130px 216px;
        grid-template-areas:
            "media body price buy"
            "media pack price buy";
        gap: 2px 16px; padding: 10px 16px;
    }
    .sf-product .sf-buy, .sf-product .sf-stock { margin: 0; align-self: center; }
    .sf-product .sf-stock { justify-self: stretch; justify-content: center; }
    .is-guest .sf-product { grid-template-columns: 56px minmax(0, 1fr) 160px; grid-template-areas: "media body price" "media pack price"; }
}
@media (min-width: 1100px) {
    .sf-sheet__head {
        display: grid; grid-template-columns: 56px minmax(0, 1fr) 110px 140px 232px; gap: 16px;
        position: sticky; top: var(--sf-header-h); z-index: 5;
        padding: 8px 16px; background: var(--sf-ink); color: var(--sf-steel-2); font-size: .8rem; font-weight: 600;
    }
    .sf-sheet__h-product { grid-column: 1 / 3; }
    .sf-sheet__h-pack, .sf-sheet__h-price { text-align: right; }
    .sf-sheet.is-guest .sf-sheet__head { grid-template-columns: 56px minmax(0, 1fr) 110px 160px; }
    .sf-product {
        grid-template-columns: 56px minmax(0, 1fr) 110px 140px 232px;
        grid-template-areas: "media body pack price buy";
        min-height: 78px;
    }
    .is-guest .sf-product { grid-template-columns: 56px minmax(0, 1fr) 110px 160px; grid-template-areas: "media body pack price"; }
    .sf-product__pack { text-align: right; }
    .sf-product__media { align-self: center; }
}

.sf-price { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: flex-end; gap: 0 4px; margin: 0; line-height: 1; text-align: right; }
.sf-price__value { font: 800 1.75rem/1 var(--sf-display); color: var(--sf-ink); font-variant-numeric: tabular-nums; }
.sf-price__cur { font-weight: 600; font-size: .85rem; color: var(--sf-ink-2); }
.sf-price__unit { flex-basis: 100%; color: var(--sf-muted); font-size: .76rem; font-weight: 500; margin-top: 3px; }
.sf-price--lg { justify-content: flex-start; text-align: left; }
.sf-price--lg .sf-price__value { font-size: clamp(3.2rem, 2.4rem + 2.6vw, 4.6rem); line-height: .85; }
.sf-price--lg .sf-price__cur { font-size: 1.2rem; }
.sf-price--lg .sf-price__unit { font-size: .9rem; margin-top: 6px; }
.sf-price-locked {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 10px; min-height: 36px; border: 1.5px dashed var(--sf-line-2);
    background: var(--sf-subtle); color: var(--sf-ink-2) !important; font: 600 .82rem var(--sf-font); cursor: pointer; white-space: nowrap;
}
.sf-price-locked:hover { border-color: var(--sf-ink); color: var(--sf-ink) !important; }

.sf-stock { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: .82rem; font-weight: 600; }
.sf-stock--in { color: var(--sf-success); }
.sf-stock--out { color: var(--sf-warn); background: var(--sf-warn-bg); padding: 6px 10px; }

/* Quantity + add to cart */
.sf-buy { display: grid; grid-template-columns: 116px 1fr; gap: 6px; }
.sf-qty { display: grid; grid-template-columns: 34px 1fr 34px; height: 40px; border: 1.5px solid var(--sf-line-2); border-radius: var(--sf-radius-sm); overflow: hidden; background: #fff; }
.sf-qty:focus-within { border-color: var(--sf-ink); box-shadow: 0 0 0 2px rgba(23,25,28,.12); }
.sf-qty__btn { border: 0; background: var(--sf-subtle); color: var(--sf-ink); font-size: 1.15rem; font-weight: 700; line-height: 1; cursor: pointer; }
.sf-qty__btn:hover { background: var(--sf-graphite); color: #fff; }
.sf .sf-qty__input {
    width: 100%; min-width: 0; max-width: none; height: 100%; border: 0;
    text-align: center; font: 800 1.35rem/1 var(--sf-display); color: var(--sf-ink); background: #fff; -moz-appearance: textfield; appearance: textfield;
    font-variant-numeric: tabular-nums;
}
.sf-qty__input:focus { outline: none; }
.sf-qty__input::-webkit-outer-spin-button, .sf-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sf .sf-buy .add-to-cart { min-height: 40px; width: 100%; padding: 6px 12px; }
.sf-buy--lg { grid-template-columns: 150px 1fr; max-width: 480px; }
.sf-buy--lg .sf-qty { height: 56px; grid-template-columns: 44px 1fr 44px; }
.sf-buy--lg .sf-qty__input { font-size: 1.8rem; }
.sf .sf-buy--lg .add-to-cart { min-height: 56px; font-size: 1.05rem; }

/* Cart toast */
#cart-flash {
    position: fixed; left: 50%; bottom: calc(24px + var(--sf-bottomnav-h)); z-index: 2000;
    display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px;
    background: var(--sf-graphite); color: #fff; border-left: 4px solid #3fc07a; box-shadow: var(--sf-shadow-lg); font-weight: 600;
    transform: translate(-50%, 24px); opacity: 0; transition: transform .3s var(--sf-ease), opacity .3s; pointer-events: none;
}
#cart-flash i { color: #5fd08f; }
#cart-flash.open { transform: translate(-50%, 0); opacity: 1; }
#cart-flash { width: max-content; max-width: calc(100vw - 32px); }
/* Keep the toast off the cart's checkout button while the cart is open */
body.sf-lock #cart-flash { bottom: auto; top: 96px; }

/* 13. Product detail
   ----------------------------------------------------------------------- */
.sf-pdp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 900px) { .sf-pdp { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: start; } }
.sf-pdp__media { position: relative; background: #fff; border: 1px solid var(--sf-line); padding: clamp(16px, 3vw, 40px); aspect-ratio: 1; display: grid; place-items: center; }
.sf-pdp__media img, .sf-pdp__media picture { min-width: 0; max-width: 100%; max-height: 100%; object-fit: contain; }
@media (min-width: 900px) { .sf-pdp__media { position: sticky; top: calc(var(--sf-header-h) + 20px); } }
@media (max-width: 899.98px) { .sf-pdp__media { aspect-ratio: 4 / 3; } }
.sf-pdp__media .sf-product__badge { position: absolute; top: 16px; left: 0; font-size: .85rem; padding: 6px 18px 6px 12px; }
.sf-pdp__cat { display: inline-block; margin-bottom: 6px; font-weight: 700; font-size: .92rem; }
.sf-pdp__title { font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.6rem); margin: 0 0 20px; }
.sf-buybox { position: relative; padding: 20px 22px 22px; background: var(--sf-surface); border-top: 6px solid var(--sf-brand); margin-bottom: 30px; }
.sf-buybox::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; color: var(--sf-surface); background: var(--sf-perf); }
.sf-buybox > * + * { margin-top: 14px; }
.sf-buybox__label { margin-bottom: 8px !important; color: var(--sf-muted); font-weight: 600; font-size: .9rem; }
.sf-buybox__label + .sf-price { margin-top: 0; }
.sf-buybox__note { color: var(--sf-muted); font-size: .88rem; margin-top: 8px !important; padding-bottom: 14px; border-bottom: 1px dashed var(--sf-line-2); }
.sf-buybox__hint { color: var(--sf-muted); font-size: .85rem; margin-bottom: 0; }
.sf-buybox__locked p { margin-bottom: 12px; color: var(--sf-ink-2); }
.sf-buybox__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-buybox .sf-stock--out { display: flex; }
.sf-options { border: 0; padding: 0; margin: 0; }
.sf-options__label { font-weight: 700; font-size: .9rem; margin: 8px 0 8px; }
.sf-options__group { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-options__input { position: absolute; opacity: 0; pointer-events: none; }
.sf-options__chip { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1.5px solid var(--sf-line-2); font-weight: 600; cursor: pointer; background: #fff; }
.sf-options__chip:hover { border-color: var(--sf-ink); }
.sf-options__input:checked + .sf-options__chip { border-color: var(--sf-graphite); background: var(--sf-graphite); color: #fff; box-shadow: inset 0 -3px 0 var(--sf-brand); }
.sf-options__input:focus-visible + .sf-options__chip { outline: 2px solid var(--sf-brand); outline-offset: 2px; }
.sf-specs { margin: 0 0 24px; border-top: 3px solid var(--sf-ink); }
.sf-specs > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--sf-line-2); }
.sf-specs dt { font-weight: 500; color: var(--sf-muted); }
.sf-specs dd { margin: 0; font-weight: 700; text-align: right; }
.sf-pdp__desc h2 { font-size: 1.8rem; margin-bottom: 8px; }
.sf-pdp__desc p { color: var(--sf-ink-2); white-space: pre-line; max-width: 70ch; }

/* 14. Side cart — the docket
   ----------------------------------------------------------------------- */
.side-cart-overlay { display: none; position: fixed; inset: 0; z-index: 1070; background: rgba(15,16,18,.6); }
.sf-cart.side-cart {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto; z-index: 1071;
    width: min(460px, 100vw); height: 100%; padding: 0; overflow: hidden;
    display: flex; flex-direction: column; background: var(--sf-surface); box-shadow: var(--sf-shadow-lg);
    transform: translateX(102%); visibility: hidden; opacity: 1; font-size: 1rem;
    transition: transform .3s var(--sf-ease), visibility .3s;
}
.sf-cart.side-cart.open { transform: none; visibility: visible; transition: transform .3s var(--sf-ease), visibility 0s; }
.sf-cart__inner { display: flex; flex-direction: column; height: 100%; position: relative; }
.sf-cart__head { display: flex; align-items: center; gap: 12px; padding: 14px 10px 14px 20px; background: var(--sf-graphite); color: #fff; border-bottom: 4px solid var(--sf-brand); }
.sf-cart__heading { flex: 1; min-width: 0; }
.sf-cart__head h2 { margin: 0; font-size: 2.2rem; color: #fff; }
.sf-cart__customer { margin: 4px 0 0; color: var(--sf-steel-2); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-cart__count { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; background: var(--sf-brand); color: #fff; font: 800 1.7rem/1 var(--sf-display); }
.sf-cart__head .sf-iconbtn { color: #fff; }
.sf-cart__body { flex: 1; overflow-y: auto; padding: 0 20px 16px; overscroll-behavior: contain; }
.sf-cart__list { list-style: none; margin: 0; padding: 0; }
.sf-cart__item { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--sf-line-2); }
.sf-cart__item.just-added { animation: sf-flash 1.8s ease-out; }
@keyframes sf-flash { 0% { background: var(--sf-success-bg); box-shadow: -20px 0 0 var(--sf-success-bg), 20px 0 0 var(--sf-success-bg); } 100% { background: transparent; box-shadow: none; } }
.sf-cart__no { font: 800 1.35rem/1.1 var(--sf-display); color: var(--sf-steel); font-variant-numeric: tabular-nums; }
.sf-cart__name { margin: 0 0 4px; font-weight: 600; line-height: 1.3; }
.sf-cart__name span { color: var(--sf-muted); font-weight: 500; font-size: .85rem; }
.sf-cart__opts { list-style: none; margin: 0 0 6px; padding: 0; font-size: .85rem; color: var(--sf-muted); }
.sf-cart__qtyrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sf .sf-cart__qty { width: 68px; height: 38px; padding: 0 6px; border: 1.5px solid var(--sf-line-2); border-radius: var(--sf-radius-sm); text-align: center; font: 800 1.3rem/1 var(--sf-display); }
.sf-cart__qty:focus { outline: none; border-color: var(--sf-ink); }
.sf-cart__calc { color: var(--sf-muted); font-size: .82rem; }
.sf-cart__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.sf-cart__line { font: 800 1.4rem/1 var(--sf-display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sf-cart__remove { width: 38px; height: 38px; border: 0; background: transparent; color: var(--sf-muted); cursor: pointer; }
.sf-cart__remove:hover { background: var(--sf-danger-bg); color: var(--sf-danger); }
.sf-cart .update-cart { margin-top: 12px; }
.sf-cart__foot { position: relative; padding: 18px 20px 20px; background: var(--sf-subtle); }
.sf-cart__foot::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; color: var(--sf-subtle); background: radial-gradient(circle at 7px 0, transparent 5px, currentColor 5.5px) 0 0 / 14px 8px repeat-x; }
.sf-cart .cart-summary, .sf-cart .cart-summary-list, .sf-cart .cart-buttons { float: none; width: auto; margin: 0; border: 0; padding: 0; }
.sf-cart__total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px !important; padding-bottom: 12px !important; border-bottom: 3px solid var(--sf-ink) !important; }
.sf-cart .summary-total { font-weight: 600; font-size: 1rem; }
.sf-cart .summary-value { float: none; font: 800 2.4rem/1 var(--sf-display); font-variant-numeric: tabular-nums; }
.sf-minorder { margin-bottom: 14px; font-size: .85rem; color: var(--sf-ink-2); }
.sf-minorder__bar { height: 6px; background: var(--sf-line); overflow: hidden; margin-bottom: 6px; }
.sf-minorder__bar span { display: block; height: 100%; background: var(--sf-brand); }
.sf-minorder.is-done .sf-minorder__bar span { background: var(--sf-success); }
.sf-minorder.is-done p { color: var(--sf-success); font-weight: 700; }
.sf-minorder p { margin: 0; }
.sf-cart .place-order { float: none; margin: 0 0 6px; text-transform: none; font-size: 1.05rem; padding: 12px 16px; }
.sf-cart .cart-clear { float: none; margin: 0; background: transparent; text-transform: none; padding: 8px; font-size: .9rem; }
.sf-cart__spinner { display: none; position: absolute; inset: 0; z-index: 2; place-items: center; background: rgba(255,255,255,.7); }
#cart.loading .sf-cart__spinner { display: grid; }
.sf-cart .spinner-border { color: var(--sf-brand); }
.sf-cart .sf-empty > i { color: var(--sf-steel); }

/* 15. Checkout / tables / steps
   ----------------------------------------------------------------------- */
.sf-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; list-style: none; margin: 0 0 20px; padding: 0; }
.sf-steps li { display: flex; align-items: center; gap: 8px; padding: 10px 0 0; border-top: 5px solid var(--sf-line-2); font-size: .9rem; font-weight: 600; color: var(--sf-muted); min-width: 0; }
.sf-steps span { font: 800 1.5rem/1 var(--sf-display); color: inherit; }
.sf-steps .is-done { color: var(--sf-ink-2); border-top-color: var(--sf-graphite); }
.sf-steps .is-current { color: var(--sf-ink); border-top-color: var(--sf-brand); }
.sf-steps .is-current span { color: var(--sf-brand); }

.sf-checkout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 992px) { .sf-checkout { grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; } }
.sf-checkout__main > .sf-card:last-child, .sf-checkout__items { margin-bottom: 0; }
.sf-card--sticky { margin-bottom: 0; }
.sf-checkout__summary .sf-card { position: relative; border: 0; border-top: 6px solid var(--sf-brand); margin-bottom: 8px; }
@media (min-width: 992px) { .sf-card--sticky, .sf-checkout__summary .sf-card--sticky { position: sticky; top: calc(var(--sf-header-h) + 20px); } }
.sf-checkout__summary .sf-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; color: var(--sf-surface); background: var(--sf-perf); }

.sf-totals { margin: 16px 0 8px; padding: 12px 0 0; border-top: 1px dashed var(--sf-line-2); }
.sf-totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; }
.sf-totals dt { font-weight: 500; color: var(--sf-ink-2); }
.sf-totals dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.sf-totals__grand { margin-top: 6px; padding-top: 12px !important; border-top: 3px solid var(--sf-ink); }
.sf-totals__grand dt { font: 800 1.5rem/1 var(--sf-display); color: var(--sf-ink); }
.sf-totals__grand dd { font: 800 2.4rem/1 var(--sf-display); }
.sf-bonus { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; padding: 8px 12px; background: var(--sf-success-bg); color: var(--sf-success); font-weight: 700; }

.sf-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.sf-choice__input { position: absolute; opacity: 0; pointer-events: none; }
.sf-choice__card { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 12px 14px; border: 1.5px solid var(--sf-line-2); font-weight: 700; cursor: pointer; background: #fff; }
.sf-choice__card i { color: var(--sf-muted); }
.sf-choice__input:checked + .sf-choice__card { border-color: var(--sf-graphite); background: var(--sf-graphite); color: #fff; }
.sf-choice__input:checked + .sf-choice__card i { color: var(--sf-brand); }
.sf-choice__input:focus-visible + .sf-choice__card { outline: 2px solid var(--sf-brand); outline-offset: 2px; }

.sf-table-wrap { overflow-x: auto; }
.sf-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.sf-table th { padding: 9px 12px; font-size: .8rem; font-weight: 600; color: var(--sf-steel-2); background: var(--sf-ink); white-space: nowrap; }
.sf-table td { padding: 12px; border-bottom: 1px solid var(--sf-line); vertical-align: top; font-variant-numeric: tabular-nums; }
.sf-table tbody tr:last-child td { border-bottom: 0; }
.sf-table--hover tbody tr:hover td { background: var(--sf-subtle); }
.sf-table__muted { color: var(--sf-muted); }
.sf-table__strong { font-weight: 800; white-space: nowrap; }
.sf-table__name { font-weight: 600; }
.sf-table__opts { list-style: none; margin: 4px 0 0; padding: 0; font-size: .85rem; color: var(--sf-muted); font-weight: 400; }
.sf-card > .sf-table-wrap, .sf-card .sf-table-wrap { margin: 0 calc(-1 * clamp(16px, 2.5vw, 24px)); }
.sf-card > .sf-table-wrap th:first-child, .sf-card > .sf-table-wrap td:first-child { padding-left: clamp(16px, 2.5vw, 24px); }
.sf-card > .sf-table-wrap th:last-child, .sf-card > .sf-table-wrap td:last-child { padding-right: clamp(16px, 2.5vw, 24px); }
.sf-card .sf-table-wrap:last-child { margin-bottom: calc(-1 * clamp(16px, 2.5vw, 24px)); }
.sf-card--flush > .sf-table-wrap, .sf-card--flush > .sf-table-wrap:last-child { margin: 0; }
.sf-table--hover td { vertical-align: middle; }
@media (max-width: 767.98px) {
    .sf-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .sf-table--stack tr { display: block; padding: 12px clamp(16px, 2.5vw, 24px); border-bottom: 1px solid var(--sf-line); }
    .sf-table--stack tbody tr:last-child { border-bottom: 0; }
    .sf-table--stack td { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0 !important; border: 0; text-align: right; }
    .sf-table--stack td::before { content: attr(data-label); font-weight: 500; color: var(--sf-muted); text-align: left; font-size: .85rem; }
    .sf-table--stack td.sf-table__name { display: block; text-align: left; font-size: 1rem; padding-bottom: 6px !important; }
    .sf-table--stack td.sf-table__name::before, .sf-table--stack td[data-label="#"] { display: none; }
    .sf-table--stack td.sf-table__action { justify-content: flex-end; padding-top: 8px !important; }
    .sf-table--stack td.sf-table__action::before { content: none; }
    .sf-table--stack td[colspan] { display: block; text-align: center; }
    .sf-table--stack td[colspan]::before { content: none; }
}

/* 16. Quick search
   ----------------------------------------------------------------------- */
.sf-quicksearch { padding: clamp(16px, 3vw, 24px); margin-bottom: 20px; background: var(--sf-graphite); color: #e3e6e9; }
.sf-quicksearch .sf-field__label { color: #fff; font: 800 1.6rem/1 var(--sf-display); margin-bottom: 12px; }
.sf-quicksearch__box { position: relative; }
.sf-quicksearch__box > i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--sf-muted); font-size: 1.1rem; }
.sf-quicksearch__input { width: 100%; height: 60px; padding: 0 16px 0 50px; border: 0; border-radius: 2px; font: 500 1.15rem var(--sf-font); color: var(--sf-ink); }
.sf-quicksearch__input:focus { outline: none; box-shadow: inset 0 0 0 3px var(--sf-brand); }
.sf-quicksearch__help { margin: 10px 0 0; color: var(--sf-steel-2); font-size: .85rem; }
.sf-quicksearch kbd { background: #fff; color: var(--sf-ink); }
.sf-chips { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--sf-graphite-line); }
.sf-chips__title { font: 800 1.3rem/1 var(--sf-display) !important; color: #fff !important; margin-bottom: 12px; border: 0; }
.sf-chips__title i { color: var(--sf-brand); font-size: .9em; }
.sf-chips__list { display: flex; flex-wrap: wrap; gap: 6px; }
.sf .sf-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; background: var(--sf-graphite-3); border: 1px solid var(--sf-graphite-line); color: #fff; font-size: .88rem; font-weight: 500; }
.sf .sf-chip:hover { background: #fff; border-color: #fff; color: var(--sf-ink); }
.sf-results__count { color: var(--sf-muted); font-weight: 600; margin-bottom: 10px; }

/* 17. Auth
   ----------------------------------------------------------------------- */
.sf-auth { padding: clamp(24px, 5vw, 64px) 0; }
.sf-auth__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; max-width: 1000px !important; }
@media (min-width: 900px) { .sf-auth__grid { grid-template-columns: 1.4fr 1fr; align-items: stretch; } }
.sf-auth__single { max-width: 540px !important; }
.sf-auth__card { padding: clamp(20px, 4vw, 40px); margin: 0; border-top: 6px solid var(--sf-brand); }
.sf-auth__title { font-size: clamp(2.4rem, 1.8rem + 2vw, 3.4rem); margin-bottom: 8px; }
.sf-auth__card > .sf-muted { margin-bottom: 24px; }
.sf-auth__aside { padding: clamp(20px, 4vw, 36px); background: var(--sf-graphite); color: var(--sf-steel-2); border-top: 6px solid var(--sf-graphite-3); }
.sf-auth__aside h2 { color: #fff; font-size: 2rem; }
.sf-auth__aside .sf-btn--outline { --_fg: #fff; --_bd: rgba(255,255,255,.55); }
.sf-auth__aside .sf-btn--outline:hover { --_bg: #fff; --_fg: var(--sf-ink); --_bd: #fff; }
.sf-auth__aside .sf-divider { background: var(--sf-graphite-line); }
.sf-auth__aside .sf-muted { color: var(--sf-steel); }
.sf .sf-auth__phone { display: inline-flex; align-items: center; gap: 8px; color: #fff; font: 800 1.8rem/1 var(--sf-display); }
.sf .sf-auth__phone i { font-size: 1.1rem; color: var(--sf-brand); }

/* 18. Prose (info pages)
   ----------------------------------------------------------------------- */
.sf-prose-wrap { background: var(--sf-surface); border: 1px solid var(--sf-line); padding: clamp(20px, 4vw, 40px); margin-bottom: 24px; }
.sf-prose__image { display: block; margin: 0 auto 24px; max-height: 480px; object-fit: contain; }
.sf-prose { max-width: 72ch; font-size: 1.05rem; line-height: 1.7; color: var(--sf-ink-2); }
.sf-pagination { margin-top: 24px; display: flex; justify-content: center; }
.sf .pagination { --bs-pagination-color: var(--sf-ink); --bs-pagination-active-bg: var(--sf-graphite); --bs-pagination-active-border-color: var(--sf-graphite); --bs-pagination-border-radius: 2px; }

/* 19. Modal (customer selection)
   ----------------------------------------------------------------------- */
.sf-modal .modal-content { border: 0; border-radius: 2px; border-top: 6px solid var(--sf-brand); box-shadow: var(--sf-shadow-lg); }
.sf-modal .modal-header { align-items: flex-start; padding: 20px 24px; }
.sf-modal .modal-title { font-size: 2rem; margin: 0; }
.sf-modal__search { position: relative; padding: 12px 24px; border-bottom: 1px solid var(--sf-line); background: var(--sf-subtle); }
.sf-modal__search i { position: absolute; left: 38px; top: 50%; transform: translateY(-50%); color: var(--sf-muted); }
.sf-modal__search .form-control { padding-left: 40px; }
.sf-modal .modal-body { padding: 8px 24px; }
.sf-customers { list-style: none; margin: 0; padding: 0; border-radius: 0; }
.sf-customers__item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--sf-line); }
.sf-customers__item:last-child { border-bottom: 0; }
.sf-customers__info { min-width: 0; }
.sf-customers__name { font: 800 1.3rem/1.05 var(--sf-display); }
.sf-customers__addr { color: var(--sf-muted); font-size: .9rem; }
.sf-customers__badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 2px 8px; background: var(--sf-brand-50); color: var(--sf-brand-700); font-size: .8rem; font-weight: 700; }
.sf-modal__msg { padding: 24px 0; font-weight: 700; text-align: center; }

/* 20. Footer
   ----------------------------------------------------------------------- */
.sf-footer { background: var(--sf-graphite); color: var(--sf-steel-2); border-top: 6px solid var(--sf-brand); }
.sf-footer__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding: clamp(36px, 5vw, 56px) 0 36px; }
@media (min-width: 768px) { .sf-footer__grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; } }
.sf-footer__brand img { height: auto; max-width: 220px; margin-bottom: 16px; }
.sf-footer__brand p { max-width: 36ch; }
.sf-footer__cta { display: flex; flex-wrap: wrap; gap: 8px; }
.sf .sf-footer__title { color: #fff; font: 800 1.6rem/1 var(--sf-display) !important; margin: 0 0 14px; }
.sf-footer__list, .sf-footer__contacts { list-style: none; margin: 0; padding: 0; }
.sf-footer__list li { margin-bottom: 12px; line-height: 1.4; padding-left: 12px; border-left: 2px solid var(--sf-graphite-line); }
.sf-footer__list strong { display: block; color: #fff; }
.sf-footer__contacts li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.sf-footer__contacts i { width: 18px; margin-top: 4px; color: var(--sf-brand); text-align: center; }
.sf-footer a { color: #fff; }
.sf-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--sf-brand); text-underline-offset: 3px; }
.sf-footer :focus-visible { outline-color: #fff; }
.sf-footer__bottom { border-top: 1px solid var(--sf-graphite-line); font-size: .85rem; color: var(--sf-steel); background: #1b1d21; }
.sf-footer__bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }

/* 21. Error pages
   ----------------------------------------------------------------------- */
.sf-errorpage { min-height: 100vh; display: grid; place-items: center; }
.sf-errorpage *, .sf-errorpage *::before, .sf-errorpage *::after { box-sizing: border-box; }
.sf-error { text-align: center; max-width: 560px; padding: 40px 24px; }
.sf-error__logo img { width: 220px; height: auto; margin-bottom: 32px; }
.sf-error__code { font: 800 clamp(6rem, 18vw, 10rem)/.85 var(--sf-display); color: var(--sf-brand); margin: 0; }
.sf-error__title { font-size: 2.2rem; margin: 12px 0 8px; }
.sf-error__text { color: var(--sf-muted); margin-bottom: 28px; }
.sf-error__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* 22. Motion preferences
   ----------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .sf *, .sf *::before, .sf *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}


/* B2B visual product grid */
.sf-sheet { border: 0; background: transparent; }
.sf-sheet__head { display: none !important; }
.sf-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.sf-grid__cell { border: 0; min-width: 0; }
.sf-product { height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--sf-line); background: var(--sf-surface); }
.sf-product:hover { border-color: #b9bdc2; box-shadow: 0 10px 26px rgba(24,26,29,.08); }
.sf-product__media { width: 100%; height: 190px; align-self: stretch; border: 0; background: #fff; }
.sf-product__media img, .sf-product__media picture { object-fit: contain; }
.sf-product__body { min-height: 62px; }
.sf-product__title { font-size: 1.08rem !important; line-height: 1.3 !important; }
.sf-product__pack { margin-top: auto; }
.sf-product__foot { display: flex; flex-direction: column; gap: 10px; }
.sf-price { margin: 0; }
.sf-buy { width: 100%; }
.sf-buy .sf-btn { flex: 1; min-height: 46px; }
.sf-qty { min-height: 46px; }
@media (min-width: 768px) { .sf-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } .sf-product__media { height: 210px; } }
@media (min-width: 1200px) { .sf-grid { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; } .sf-product__media { height: 220px; } }
@media (max-width: 479.98px) { .sf-grid { grid-template-columns: 1fr; } .sf-product__media { height: 230px; } }



/* Search autocomplete (public/js/search-suggest.js) — header + home page
   ----------------------------------------------------------------------- */
.sf-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 1060; background: var(--sf-surface); color: var(--sf-ink); border: 1px solid var(--sf-line-2); border-top: 3px solid var(--sf-ink); border-radius: var(--sf-radius); box-shadow: 0 18px 44px rgba(12, 13, 15, .28); text-align: left; }
.sf-suggest[hidden] { display: none; }
.sf-suggest__list { max-height: min(64vh, 470px); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 4px 0; list-style: none; }
.sf-suggest__group { padding: 10px 14px 4px; color: var(--sf-muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sf-suggest__opt { position: relative; display: grid; align-items: center; gap: 12px; padding: 7px 14px; cursor: pointer; font-size: .95rem; line-height: 1.3; }
.sf-suggest__opt[aria-selected="true"] { background: var(--sf-subtle); }
.sf-suggest__opt[aria-selected="true"]::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sf-brand); }
.sf-suggest__opt--cat { grid-template-columns: 20px minmax(0, 1fr) auto; min-height: 40px; }
.sf-suggest__opt--cat > i { color: var(--sf-muted); text-align: center; }
.sf-suggest__opt--cat .sf-suggest__name { font-weight: 700; }
.sf-suggest__path { color: var(--sf-muted); font-size: .82rem; white-space: nowrap; }
.sf-suggest__opt--product { grid-template-columns: 44px minmax(0, 1fr) auto; min-height: 58px; }
.sf-suggest__opt--product img { width: 44px; height: 44px; object-fit: contain; background: #fff; border: 1px solid var(--sf-line); }
.sf-suggest__text { display: flex; flex-direction: column; min-width: 0; }
.sf-suggest__name { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sf-suggest__meta { color: var(--sf-muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-suggest__price { font: 800 1.3rem/1 var(--sf-display); white-space: nowrap; }
.sf-suggest__price small { font-size: .8em; }
.sf-suggest mark { padding: 0; background: var(--sf-brand-50); color: inherit; font-weight: 700; }
.sf-suggest__empty { padding: 16px 14px; color: var(--sf-muted); font-size: .92rem; }
.sf-suggest__all { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; border-top: 1px solid var(--sf-line); background: var(--sf-subtle); color: var(--sf-ink) !important; font-weight: 700; font-size: .9rem; }
.sf-suggest__all:hover { color: var(--sf-brand-600) !important; }
.sf-suggest__all[hidden] { display: none; }
.has-suggest.is-loading .sf-search__icon, .sf-desk__search.is-loading > i { animation: sf-pulse .8s ease-in-out infinite alternate; }
@keyframes sf-pulse { from { opacity: 1; } to { opacity: .3; } }
.sf-desk__search .sf-suggest { top: calc(100% + 6px); }
@media (max-width: 575.98px) {
    .sf-suggest__opt { gap: 10px; padding: 7px 12px; font-size: .9rem; }
    .sf-suggest__opt--product { grid-template-columns: 40px minmax(0, 1fr) auto; }
    .sf-suggest__opt--product img { width: 40px; height: 40px; }
    .sf-suggest__path { display: none; }
    .sf-suggest__opt--cat { grid-template-columns: 20px minmax(0, 1fr); }
}

/* Checkout: "Не забравихте ли нещо?" reorder suggestions
   ----------------------------------------------------------------------- */
.sf-reorder { margin-top: 16px; background: var(--sf-surface); border: 1px solid var(--sf-line); border-radius: var(--sf-radius); }
.sf-reorder__head { padding: 16px clamp(16px, 2.5vw, 24px) 14px; border-bottom: 1px dashed var(--sf-line-2); }
.sf-reorder__title { position: relative; margin: 0; padding-left: 14px; font: 800 1.75rem/1 var(--sf-display); }
.sf-reorder__title::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 3px; width: 4px; background: var(--sf-brand); }
.sf-reorder__lead { margin: 6px 0 0; padding-left: 14px; color: var(--sf-muted); font-size: .9rem; }
.sf-reorder__list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; margin: 0; padding: 0; list-style: none; background: var(--sf-line); }
@media (min-width: 768px) { .sf-reorder__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sf-reorder__item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "media body body" "media price add"; gap: 4px 14px; align-items: center; padding: 14px clamp(16px, 2.5vw, 24px); background: var(--sf-surface); }
@media (min-width: 768px) { .sf-reorder__list > .sf-reorder__item:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.sf-reorder__media { grid-area: media; align-self: start; display: block; width: 64px; height: 64px; background: #fff; border: 1px solid var(--sf-line); }
.sf-reorder__media picture, .sf-reorder__media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sf-reorder__body { grid-area: body; min-width: 0; }
.sf-reorder__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--sf-ink) !important; font-weight: 600; line-height: 1.3; }
.sf-reorder__name:hover { color: var(--sf-brand-600) !important; }
.sf-reorder__meta { margin: 2px 0 0; color: var(--sf-muted); font-size: .8rem; }
.sf-reorder__price { grid-area: price; margin: 0; font-size: .85rem; color: var(--sf-muted); }
.sf-reorder__price b { font: 800 1.35rem/1 var(--sf-display); color: var(--sf-ink); }
.sf-reorder__price span { display: block; font-size: .78rem; }
.sf-reorder__add { grid-area: add; gap: 6px; }
.sf-reorder__add.is-added { --_bg: var(--sf-success); --_fg: #fff; --_bd: var(--sf-success); }

/* Mega-menu: keep child panels reachable while crossing from parent item. */
.sf-catmenu__list { overflow-y: auto; overflow-x: visible; }
.sf-catmenu__item { position: static; }
.sf-catmenu__item.has-children { position: relative; }
.sf-catmenu__item.has-children::after { content: ""; position: absolute; top: 0; bottom: 0; left: 100%; width: 18px; z-index: 2; }
.sf-catmenu__sub { left: calc(100% + 10px); top: -9px; }
.sf-catmenu__item:hover > .sf-catmenu__sub, .sf-catmenu__item:focus-within > .sf-catmenu__sub, .sf-catmenu__item.is-sub-open > .sf-catmenu__sub { display: block; }
