@charset "UTF-8";
/* ============================================================================
   COUNTER — storefront chrome
   Header, category drawer and mobile tab bar for Views/Shared/_StoreChrome.cshtml.

   Mobile first: the base rules describe a phone, and min-width blocks scale up
   to tablet and desktop. Design tokens come from Content/ui-refresh.css, which
   loads earlier in the ~/css bundle.

   One note on positioning: Assets/css/style.css sets `header { position: fixed }`
   globally, so .sf-head has to state its own positioning explicitly or it will
   be torn out of flow and the page will slide underneath it.
   ========================================================================= */

:root {
    --sf-util-h: 34px;
    --sf-main-h: 56px;
    --sf-nav-h: 46px;
    --sf-tabs-h: 56px;
    --sf-safe: env(safe-area-inset-bottom, 0px);
    --sf-r: 12px;
    --sf-r-sm: 8px;
}

/* Keyboard users get to the catalogue without walking the whole header. */
.sf-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1100;
    background: var(--ink);
    color: #fff;
    padding: 12px 18px;
    border-radius: 0 0 var(--sf-r-sm) 0;
    font: 600 14px/1 var(--sans);
}
.sf-skip:focus { left: 0; color: #fff; }

/* ============================================================ header ==== */

.sf-head {
    position: sticky;      /* not fixed - see file header */
    top: 0;
    width: 100%;
    z-index: 1030;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    transition: none;      /* style.css animates `all` on header */
    margin-bottom: 20px;
}

.sf-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 12px;
}

/* ---- utility row: desktop only ---- */
.sf-util { display: none; }

/* ---- main row ---- */
.sf-main-in {
    height: var(--sf-main-h);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sf-icon {
    flex: 0 0 auto;
    height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: none;
    border: 0;
    padding: 0;
    color: var(--ink) !important;
    border-radius: var(--sf-r-sm);
    position: relative;
    text-decoration: none !important;
}
.sf-icon:active { background: var(--ground); }
.sf-icon svg {
    width: 23px;
    height: 23px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sf-icon-label { display: none; }

.sf-logo { display: none; }

/* Search is the primary action and keeps its place in the bar at every width. */
.sf-search {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    height: 40px;
    background: var(--ground);
    border: 1px solid transparent;
    border-radius: 999px;
    padding-left: 14px;
    transition: background .15s ease, border-color .15s ease;
}
.sf-search:focus-within { background: var(--paper); border-color: var(--ink); }

/* The category scope is a desktop affordance; on a phone it costs more width
   than it earns. HeaderSearchBar.js still fills it, so search stays scoped
   correctly if a category was carried in on the query string. */
.sf-search > #header-category { display: none; }

.sf-search > #header-search-box {
    flex: 1 1 auto;
    min-width: 0;
    /* app-view.css pins this to 80% at <=768px, which would knock the flex row
       out of alignment. Higher specificity plus a later position wins. */
    width: auto !important;
    height: 38px;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--ink) !important;
    font: 400 16px/38px var(--sans) !important;  /* 16px: stops iOS zooming on focus */
    -webkit-appearance: none;
    appearance: none;
}
.sf-search > #header-search-box::placeholder { color: var(--ink-mute) !important; }
.sf-search > #header-search-box::-webkit-search-cancel-button { -webkit-appearance: none; }

.sf-search > #header-search-btn {
    flex: 0 0 auto;
    height: 32px;
    width: 32px;
    margin: 0 4px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}
.sf-search > #header-search-btn svg {
    width: 17px; height: 17px;
    fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}

.sf-actions { flex: 0 0 auto; display: flex; align-items: center; }
.sf-account { display: none; }

.sf-badge {
    position: absolute;
    top: 3px;
    right: 1px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--price);
    color: #fff !important;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    line-height: 17px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--paper);
}
/* common.js writes "0" into an empty cart; neither state should show a chip. */
.sf-badge:empty { display: none; }

.sf-cart { position: relative; }
.sf-cart > a {
    height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--ink) !important;
    position: relative;
    border-radius: var(--sf-r-sm);
    text-decoration: none !important;
}
.sf-cart > a svg {
    width: 23px; height: 23px; display: block;
    fill: none; stroke: currentColor; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
/* Hover preview is pointer-only; _Layout.cshtml binds it behind a hover query.
   No !important here — jQuery's fadeIn writes an inline display and has to be
   able to win. */
.menu-cart-item-container { display: none; }

/* ---- nav row / mobile chip rail ---- */
.sf-nav { background: var(--paper); border-top: 1px solid var(--line); }
.sf-nav-in {
    height: var(--sf-nav-h);
    display: flex;
    align-items: center;
}
.sf-catbtn, .sf-offers { display: none; }

/* On a phone the nav row is a scrolling rail of the top categories - the
   fastest way in for someone browsing rather than searching. */
.sf-quick {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Bleed to the screen edges so the rail reads as scrollable. */
    margin: 0 -12px;
    padding: 0 12px;
}
.sf-quick::-webkit-scrollbar { display: none; }
.sf-quick a {
    flex: 0 0 auto;
    height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink) !important;
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none !important;
}
.sf-quick a:active { background: var(--ground); }
.sf-quick a.is-all { background: var(--ink); border-color: var(--ink); color: #fff !important; }

/* ============================================================ drawer ==== */

.sf-scrim {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(18,22,27,.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
    border: 0;
    padding: 0;
}
.sf-scrim[hidden] { display: block; }   /* [hidden] is the closed state, not display:none */
.sf-scrim.is-open { opacity: 1; visibility: visible; }

.sf-drawer {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 1050;
    width: 84vw;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.22,.61,.36,1);
    overscroll-behavior: contain;
}
.sf-drawer.is-open { transform: translateX(0); }
body.sf-locked { overflow: hidden; }

.sf-drawer-head {
    flex: 0 0 auto;
    position: relative;
    background: var(--ink);
    color: #fff;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 16px 16px;
}
.sf-drawer-head img { max-height: 34px; width: auto; margin-bottom: 14px; display: block; }
.sf-drawer-hello {
    display: block;
    font-family: var(--display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: #fff;
}
.sf-drawer-sub { display: block; font-size: 13px; color: rgba(255,255,255,.66); margin-top: 2px; }
.sf-drawer-auth { margin-top: 14px; display: flex; gap: 8px; }
.sf-drawer-auth a {
    flex: 1 1 0;
    min-width: 0;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: var(--sf-r-sm);
    font-size: 14px;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none !important;
}
.sf-drawer-auth a.is-primary {
    background: var(--paper);
    border-color: var(--paper);
    color: var(--ink) !important;
}
.sf-drawer-close {
    position: absolute;
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: 6px;
    height: 40px; width: 40px;
    background: none;
    border: 0;
    color: rgba(255,255,255,.85);
    font-size: 28px;
    line-height: 1;
    padding: 0;
}

.sf-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(24px + var(--sf-safe));
}
.sf-drawer-label {
    margin: 0;
    padding: 18px 16px 6px;
    font-family: var(--display);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ink-mute);
}
.sf-drawer-body a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 6px 16px;
    color: var(--ink) !important;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
    text-decoration: none !important;
}
.sf-drawer-body a:active { background: var(--ground); }
.sf-drawer-body a.is-offer { color: var(--price) !important; font-weight: 600; }

/* ========================================================== tab bar ==== */

.sf-tabs {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1035;
    display: flex;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding-bottom: var(--sf-safe);
}
.sf-tabs > a, .sf-tabs > button {
    flex: 1 1 0;
    min-width: 0;
    height: var(--sf-tabs-h);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: 0;
    padding: 0;
    position: relative;
    color: var(--ink-mute) !important;
    font: 500 10.5px/1 var(--sans);
    letter-spacing: .01em;
    text-decoration: none !important;
}
.sf-tabs svg {
    width: 21px; height: 21px; display: block;
    fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round;
}
.sf-tabs > a.is-active { color: var(--ink) !important; }
.sf-tabs > a.is-active svg { stroke-width: 2.1; }
.sf-tabs > a:active, .sf-tabs > button:active { background: var(--ground); }
.sf-tabs .sf-badge { top: 6px; right: 50%; margin-right: -20px; }

/* The tab bar owns the bottom of the screen; make room and evict squatters. */
body { padding-bottom: calc(var(--sf-tabs-h) + var(--sf-safe)); }
.back-to-top {
    bottom: calc(var(--sf-tabs-h) + var(--sf-safe) + 14px) !important;
    right: 12px !important;
}
#feedback { display: none !important; }

/* ==========================================================================
   TABLET — the drawer still serves navigation, but the bar gets its logo back
   and the search field grows.
   ========================================================================== */
@media (min-width: 600px) {
    :root { --sf-main-h: 64px; }

    .sf-wrap { padding: 0 16px; }

    .sf-logo {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        height: 100%;
        padding-right: 8px;
    }
    .sf-logo img { max-height: 40px; max-width: 160px; width: auto; display: block; }

    .sf-search { max-width: 520px; margin: 0 auto; }
    .sf-quick { margin: 0; padding: 0; }
}

/* ==========================================================================
   DESKTOP — full three-row header: utility strip, shop bar, category nav.
   The drawer and tab bar retire; everything is reachable in the header.
   ========================================================================== */
@media (min-width: 992px) {
    :root { --sf-main-h: 72px; --sf-nav-h: 48px; }

    body { padding-bottom: 0; }
    .sf-tabs, .sf-drawer, .sf-scrim { display: none !important; }
    .sf-menu-btn { display: none; }
    .back-to-top { bottom: 20px !important; right: 20px !important; }

    /* ---- utility strip ---- */
    .sf-util {
        display: block;
        background: var(--ink);
        color: rgba(255,255,255,.72);
    }
    .sf-util-in {
        min-height: var(--sf-util-h);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }
    .sf-util-msg {
        margin: 0;
        font-size: 13px;
        color: rgba(255,255,255,.72);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .sf-util-links { display: flex; align-items: center; gap: 20px; }
    .sf-util-links a {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: rgba(255,255,255,.72) !important;
        font-size: 13px;
        text-decoration: none !important;
        white-space: nowrap;
    }
    .sf-util-links a:hover { color: #fff !important; }
    .sf-util-links svg {
        width: 14px; height: 14px;
        fill: currentColor; stroke: none;
    }
    /* The hotline is a number, so it is set like every other number here. */
    .sf-util-tel span { font-family: var(--mono); font-size: 12.5px; letter-spacing: .01em; }

    .sf-util-social { display: inline-flex; align-items: center; gap: 14px; }
    .sf-util-social a { font-size: 14px; color: rgba(255,255,255,.55) !important; }
    .sf-util-social a:hover { color: #fff !important; }

    /* ---- shop bar ---- */
    .sf-main-in { gap: 24px; }
    .sf-logo img { max-height: 60px; max-width: 190px; }

    .sf-search {
        max-width: none;
        margin: 0;
        height: 46px;
        background: var(--paper);
        border: 1.5px solid var(--ink);
        border-radius: var(--sf-r-sm);
        padding-left: 0;
    }
    .sf-search:focus-within {
        border-color: var(--ink);
        box-shadow: 0 0 0 3px rgba(47,109,246,.14);
    }
    /* Scoped search: pick a category, then type. */
    .sf-search > #header-category {
        display: block;
        flex: 0 0 auto;
        width: auto;
        max-width: 170px;
        height: 43px;
        margin: 0;
        padding: 0 12px;
        border: 0 !important;
        border-right: 1px solid var(--line) !important;
        border-radius: var(--sf-r-sm) 0 0 var(--sf-r-sm);
        background: var(--ground);
        box-shadow: none !important;
        color: var(--ink-mute) !important;
        font: 500 13px var(--sans) !important;
        cursor: pointer;
    }
    .sf-search > #header-search-box {
        height: 43px;
        padding: 0 14px !important;
        font: 400 15px/43px var(--sans) !important;
    }
    .sf-search > #header-search-btn {
        height: 43px;
        width: 52px;
        margin: 0;
        border-radius: 0 6px 6px 0;
    }
    .sf-search > #header-search-btn:hover { background: var(--ink-soft); }
    .sf-search > #header-search-btn svg { width: 19px; height: 19px; }

    .sf-actions { gap: 6px; }
    .sf-account { display: block; position: relative; }
    .sf-icon, .sf-cart > a {
        height: 48px;
        min-width: 0;
        padding: 0 12px;
        flex-direction: column;
        gap: 3px;
    }
    .sf-icon svg, .sf-cart > a svg { width: 21px; height: 21px; }
    .sf-icon-label {
        display: block;
        font-size: 11.5px;
        font-weight: 500;
        max-width: 90px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .sf-icon:hover, .sf-cart > a:hover { background: var(--ground); }
    .sf-badge { top: 2px; right: 6px; }

    .sf-menu {
        min-width: 210px;
        border: 1px solid var(--line);
        border-radius: var(--sf-r-sm);
        box-shadow: 0 8px 28px rgba(18,22,27,.12);
        padding: 6px;
        margin-top: 2px;
    }
    .sf-menu > li > a {
        display: block;
        padding: 9px 12px;
        border-radius: 6px;
        color: var(--ink) !important;
        font-size: 14px;
    }
    .sf-menu > li > a:hover { background: var(--ground); }
    .sf-menu > li.sf-menu-sep {
        margin-top: 6px;
        padding-top: 6px;
        border-top: 1px solid var(--line);
    }

    /* Pointer users get the cart preview back. Still display:none until the
       hover handler fades it in. */
    .menu-cart-item-container {
        position: absolute;
        top: 100%;
        right: 0;
        z-index: 1060;
        border: 1px solid var(--line);
        border-radius: var(--sf-r-sm);
        box-shadow: 0 10px 34px rgba(18,22,27,.16);
        overflow: hidden;
    }
    .menu-cart-items { max-height: 420px; width: 380px; overflow: auto; background: var(--paper); }

    /* ---- category nav ---- */
    .sf-nav-in { gap: 8px; }

    .sf-catbtn {
        display: block;
        position: relative;
        flex: 0 0 auto;
        align-self: stretch;
    }
    .sf-catbtn-trigger {
        height: 100%;
        display: inline-flex;
        align-items: center;
        gap: 9px;
        padding: 0 18px 0 14px;
        background: var(--ink);
        border: 0;
        color: #fff;
        font-family: var(--display);
        font-size: 14.5px;
        font-weight: 600;
        letter-spacing: .01em;
        cursor: pointer;
        border-radius: var(--sf-r-sm) var(--sf-r-sm) 0 0;
    }
    .sf-catbtn-trigger svg {
        width: 18px; height: 18px;
        fill: none; stroke: currentColor; stroke-width: 1.9;
        stroke-linecap: round; stroke-linejoin: round;
    }
    .sf-catbtn-trigger .sf-caret {
        width: 15px; height: 15px;
        transition: transform .18s ease;
    }
    .sf-catbtn-trigger[aria-expanded="true"] .sf-caret { transform: rotate(180deg); }

    /* The mega-menu keeps its Bootstrap classes so LoadCategories() and the
       legacy fade handlers still find it, but the panel is ours. */
    .top-cat-menu-container.mega-menu {
        left: 0;
        right: auto;
        min-width: 560px;
        max-height: 60vh;
        overflow-y: auto;
        margin: 0;
        padding: 16px 18px;
        border: 1px solid var(--line);
        border-top: 0;
        border-radius: 0 var(--sf-r-sm) var(--sf-r-sm) var(--sf-r-sm);
        box-shadow: 0 14px 40px rgba(18,22,27,.16);
    }
    .top-cat-menu-container a {
        display: block;
        padding: 7px 10px;
        border-radius: 6px;
        color: var(--ink) !important;
        font-size: 14px;
        text-decoration: none !important;
    }
    .top-cat-menu-container a:hover { background: var(--ground); color: var(--price) !important; }
    /* store-chrome.js toggles this. The panel keeps .dropdown-menu for the sake
       of LoadCategories() and the legacy selectors, so it needs an explicit
       open state to beat Bootstrap's default display:none. */
    .top-cat-menu-container.is-open { display: block; }

    /* Quick links stop being chips and become plain nav. */
    .sf-quick { gap: 4px; overflow: visible; }
    .sf-quick a {
        height: auto;
        padding: 8px 12px;
        border: 0;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 500;
    }
    .sf-quick a:hover { background: var(--ground); color: var(--price) !important; }
    .sf-quick a.is-all { display: none; }   /* the mega-menu covers it */

    .sf-offers {
        display: inline-flex;
        align-items: center;
        margin-left: auto;
        padding: 8px 14px;
        border-radius: 6px;
        color: var(--price) !important;
        font-size: 14px;
        font-weight: 600;
        text-decoration: none !important;
        white-space: nowrap;
    }
    .sf-offers:hover { background: var(--ground); text-decoration: underline !important; }
}

@media (min-width: 1200px) {
    .sf-quick a { padding: 8px 14px; }
    .top-cat-menu-container.mega-menu { min-width: 640px; }
}

@media (prefers-reduced-motion: reduce) {
    .sf-drawer, .sf-scrim, .sf-caret { transition: none !important; }
}
