/* =========================================================================
   /shop/ — wholesale shop, iOS look (27/09/2026)
   One fixed iOS palette (system colours), light and dark following the
   phone. Grouped inset lists, 44 pt targets, translucent bars, sheets.
   The old token names (--paper, --ink, --accent, --line …) are kept as
   aliases: /my-account/ and the AI assistant still read them.
   ========================================================================= */

:root {
    color-scheme: light dark;

    /* iOS system colours — light */
    --ios-bg:        #f2f2f7;   /* systemGroupedBackground */
    --ios-cell:      #ffffff;   /* secondarySystemGroupedBackground */
    --ios-cell-2:    #f2f2f7;   /* tertiary */
    --ios-elev:      #ffffff;   /* sheets */
    --ios-label:     #000000;
    --ios-label-2:   rgba(60, 60, 67, 0.76);
    --ios-label-3:   rgba(60, 60, 67, 0.30);
    --ios-sep:       rgba(60, 60, 67, 0.29);
    --ios-sep-opaque:#c6c6c8;
    --ios-fill:      rgba(120, 120, 128, 0.12);
    --ios-fill-2:    rgba(120, 120, 128, 0.16);
    --ios-fill-3:    rgba(118, 118, 128, 0.24);
    --ios-bar:       rgba(249, 249, 249, 0.86);
    --ios-dim:       rgba(0, 0, 0, 0.32);
    --ios-img-bg:    #ffffff;
    --ios-img-filter: none;

    --ios-blue:   #0071e3;
    --ios-green:  #34c759;
    --ios-red:    #ff3b30;
    --ios-orange: #ff9500;
    --ios-yellow: #ffcc00;
    --ios-indigo: #5856d6;
    --ios-pink:   #ff2d55;
    --ios-purple: #af52de;
    --ios-teal:   #30b0c7;

    --tint:       var(--ios-blue);
    --tint-soft:  rgba(0, 113, 227, 0.12);

    --r-xs: 8px;
    --r-sm: 10px;
    --r:    12px;
    --r-lg: 16px;
    --r-xl: 22px;

    --shadow-card:  0 1px 2px rgba(0, 0, 0, 0.04), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
    --shadow-float: 0 8px 28px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-sheet: 0 -2px 20px rgba(0, 0, 0, 0.12);

    --bar-h: 56px;
    --sidebar-w: 272px;

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI",
            Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

    /* legacy aliases (read by /my-account/, the AI assistant, inline styles) */
    --paper:       var(--ios-bg);
    --surface:     var(--ios-cell);
    --surface-2:   var(--ios-fill);
    --line:        var(--ios-sep);
    --line-strong: var(--ios-sep-opaque);
    --ink:         var(--ios-label);
    --ink-2:       var(--ios-label-2);
    --ink-3:       var(--ios-label-2);
    --ink-soft:    var(--ios-label-3);
    --accent:      var(--tint);
    --accent-soft: var(--tint-soft);
    --accent-tint: var(--tint-soft);
    --accent-ink:  var(--tint);
    --good:        var(--ios-green);
    --good-soft:   rgba(52, 199, 89, 0.14);
    --warn:        var(--ios-orange);
    --warn-soft:   rgba(255, 149, 0, 0.14);
    --bad:         var(--ios-red);
    --bad-soft:    rgba(255, 59, 48, 0.12);
    --fav:         var(--ios-pink);
    --fav-soft:    rgba(255, 45, 85, 0.12);
    --primary:     var(--tint);
    --muted:       var(--ios-label-2);
    --radius-sm:   var(--r-xs);
    --radius:      var(--r);
    --radius-lg:   var(--r-lg);
    --shadow-sm:   var(--shadow-card);
    --shadow:      var(--shadow-card);
    --shadow-lg:   var(--shadow-float);
}

@media (prefers-color-scheme: dark) {
    :root {
        --ios-bg:        #000000;
        --ios-cell:      #1c1c1e;
        --ios-cell-2:    #2c2c2e;
        --ios-elev:      #1c1c1e;
        --ios-label:     #ffffff;
        --ios-label-2:   rgba(235, 235, 245, 0.60);
        --ios-label-3:   rgba(235, 235, 245, 0.30);
        --ios-sep:       rgba(84, 84, 88, 0.65);
        --ios-sep-opaque:#38383a;
        --ios-fill:      rgba(118, 118, 128, 0.24);
        --ios-fill-2:    rgba(118, 118, 128, 0.32);
        --ios-fill-3:    rgba(118, 118, 128, 0.36);
        --ios-bar:       rgba(22, 22, 24, 0.84);
        --ios-dim:       rgba(0, 0, 0, 0.55);
        --ios-img-bg:    #f4f4f5;
        --ios-img-filter: brightness(0.92);

        --ios-blue:   #0a84ff;
        --ios-green:  #30d158;
        --ios-red:    #ff453a;
        --ios-orange: #ff9f0a;
        --ios-yellow: #ffd60a;
        --ios-indigo: #5e5ce6;
        --ios-pink:   #ff375f;
        --ios-purple: #bf5af2;
        --ios-teal:   #40c8e0;
        --tint-soft:  rgba(10, 132, 255, 0.20);

        --shadow-card:  0 0 0 0.5px rgba(255, 255, 255, 0.06);
        --shadow-float: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 0.5px rgba(255, 255, 255, 0.08);
        --shadow-sheet: 0 -2px 24px rgba(0, 0, 0, 0.6);
    }
}

/* ────────────── Reset / base ────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    background: var(--ios-bg);
    color: var(--ios-label);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.35;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    padding-bottom: 32px;
    overflow-x: hidden;
}
body.cart-open, body.filters-open, body.detail-open, body.orders-open,
body.scanner-open, body.sheet-lock { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font-family: inherit; color: inherit; }
a { color: var(--tint); }
:focus-visible { outline: 2px solid var(--tint); outline-offset: 2px; border-radius: 6px; }

.fw-bold { font-weight: 600; }
.text-muted { color: var(--ios-label-2); }
.text-warning { color: var(--ios-orange); }
.small { font-size: 13px; }
.d-none { display: none !important; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.gap-2 { gap: 8px; }
.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.ms-1 { margin-left: 4px; }
.me-1 { margin-right: 4px; }
.ms-auto { margin-left: auto; }
.w-100 { width: 100%; }
@media (min-width: 768px) { .d-md-block { display: block !important; } .d-md-none { display: none !important; } .d-md-inline { display: inline !important; } }
@media (max-width: 767.98px) { .d-md-block { display: none !important; } .d-md-none { display: revert !important; } }
@media (min-width: 576px) { .d-sm-inline { display: inline !important; } }

.price-current, .price-base, .qty-input, .drawer-total, .tier-pill, .stock-pill,
.recent-total, .appbar-cart-badge, .drafts-count-badge, .cart-line-total,
.cart-bar-total, .card-price, .acct-stat-num, .order-card-total {
    font-variant-numeric: tabular-nums;
}
.sku {
    font-family: var(--mono); font-size: 11.5px; letter-spacing: 0;
    color: var(--ios-label-2);
}
.spinner-border { display: inline-block; width: 1rem; height: 1rem; vertical-align: -0.125em;
    border: 0.15em solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: iosspin .75s linear infinite; }
.spinner-border-sm { width: .85rem; height: .85rem; border-width: .13em; }
@keyframes iosspin { to { transform: rotate(360deg); } }

/* Buttons */
.btn-primary-b2b {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 0 18px;
    background: var(--tint); color: #fff; border: 0; border-radius: var(--r);
    font-size: 16px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none;
    transition: opacity .15s, transform .1s;
}
.btn-primary-b2b:active { opacity: .75; transform: scale(.985); }
.btn-primary-b2b:disabled, .btn-primary-b2b[disabled] { opacity: .4; cursor: default; }
.ghost-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    min-height: 34px; padding: 0 12px;
    background: var(--ios-fill); color: var(--tint); border: 0; border-radius: 999px;
    font-size: 14px; font-weight: 600;
}
.ghost-btn:active { opacity: .6; }
.section-title {
    margin: 0 0 8px; padding: 0 4px;
    font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em;
    color: var(--ios-label-2);
}

/* ════════════════ ACTING-FOR BANNER (driver) ════════════════ */
.acting-banner {
    position: sticky; top: 0; z-index: 60;
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px; background: var(--ios-indigo); color: #fff;
    font-size: 14px; font-weight: 600;
}
.acting-banner span { flex: 1; min-width: 0; }
.acting-banner a { color: #fff; font-weight: 700; }
body:has(.acting-banner) .appbar { top: 38px; }

/* ════════════════ NAV BAR ════════════════ */
.appbar {
    position: sticky; top: 0; z-index: 50;
    background: var(--ios-bar);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--ios-sep);
}
.appbar-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto auto auto;
    grid-template-areas: "brand search cut user cart lang filt";
    align-items: center; gap: 10px;
    min-height: var(--bar-h);
    padding: 8px max(16px, env(safe-area-inset-left)) 8px max(16px, env(safe-area-inset-right));
}
.appbar-brand { grid-area: brand; display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.appbar-logo {
    width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex: none;
    background: var(--ios-cell); box-shadow: 0 0 0 0.5px var(--ios-sep);
}
.appbar-logo-fallback { display: grid; place-items: center; color: var(--tint); font-size: 18px; }
.appbar-name { min-width: 0; line-height: 1.15; }
.appbar-tenant { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar-tag { font-size: 12px; color: var(--ios-label-2); }
.appbar-cut { grid-area: cut; }
.appbar-cut a {
    display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 12px;
    border-radius: 999px; background: var(--tint-soft); color: var(--tint);
    font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
}

.appbar-search {
    grid-area: search; position: relative; display: flex; align-items: center;
    height: 36px; border-radius: 10px; background: var(--ios-fill);
    max-width: 640px; width: 100%; justify-self: center;
}
.appbar-search-icon { position: absolute; left: 9px; color: var(--ios-label-2); font-size: 15px; pointer-events: none; }
.appbar-search input {
    flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none;
    padding: 0 40px 0 32px; font-size: 16px; color: var(--ios-label);
}
.appbar-search input::placeholder { color: var(--ios-label-2); }
.appbar-scan {
    position: absolute; right: 4px; width: 30px; height: 30px; border: 0; border-radius: 8px;
    background: transparent; color: var(--tint); font-size: 17px; display: grid; place-items: center;
}
.appbar-scan:active { background: var(--ios-fill-2); }

.appbar-user { grid-area: user; }
.appbar-user-btn {
    display: flex; align-items: center; gap: 8px; border: 0; background: transparent;
    padding: 4px 6px; border-radius: 10px; text-align: right; min-height: 44px;
}
.appbar-user-btn:active { background: var(--ios-fill); }
.appbar-user-btn .bi-person-circle { color: var(--tint); font-size: 26px !important; }
.appbar-user-name { font-size: 14px; font-weight: 600; line-height: 1.2; }
.appbar-user-phone, .appbar-user-balance { font-size: 12px; font-weight: 400; color: var(--ios-label-2); }
.appbar-user-balance { color: var(--ios-red); }
.appbar-user .btn-primary-b2b { min-height: 34px; padding: 0 14px; font-size: 15px; border-radius: 999px; }

.appbar-icon-btn {
    position: relative; display: grid; place-items: center;
    width: 40px; height: 40px; border: 0; border-radius: 999px;
    background: transparent; color: var(--tint); font-size: 21px;
}
.appbar-icon-btn:active { background: var(--ios-fill); }
.appbar-cart-btn { grid-area: cart; }
.appbar-mobile-filters { grid-area: filt; display: none; }
.appbar-cart-badge {
    position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: var(--ios-red); color: #fff;
    font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px var(--ios-bar);
}
.appbar-cart-badge[hidden] { display: none !important; }
.appbar-cart-btn.pulse { animation: iospulse .5s ease; }
@keyframes iospulse { 40% { transform: scale(1.18); } }

/* shared language switch, inside the bar */
.ios-shop .appbar .lb-lang { grid-area: lang; }
.ios-shop .lb-lang-btn {
    min-height: 34px; padding: 0 10px; border: 0 !important; border-radius: 999px !important;
    background: var(--ios-fill) !important; color: var(--ios-label) !important; font-size: 13px; font-weight: 600;
}
.ios-shop .lb-lang-menu {
    background: var(--ios-elev) !important; border: 0 !important; border-radius: var(--r) !important;
    box-shadow: var(--shadow-float) !important; padding: 6px !important;
}
.ios-shop .lb-lang-item { color: var(--ios-label) !important; border-radius: 8px !important; min-height: 40px; }
.ios-shop .lb-lang-item:hover { background: var(--ios-fill) !important; }
.ios-shop .lb-lang-item-active { background: var(--tint-soft) !important; color: var(--tint) !important; }
.ios-shop .lb-lang-item-check { color: var(--tint) !important; }

/* ════════════════ LAYOUT ════════════════ */
.layout {
    display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    gap: 24px; align-items: start;
    max-width: 1680px; margin: 0 auto;
    padding: 20px max(20px, env(safe-area-inset-right)) 24px max(20px, env(safe-area-inset-left));
}
.content { min-width: 0; }

/* ════════════════ SIDEBAR (desktop: inset grouped; mobile: sheet) ════════════════ */
.sidebar { position: sticky; top: calc(var(--bar-h) + 20px); max-height: calc(100vh - var(--bar-h) - 40px); overflow-y: auto; scrollbar-width: thin; }
.sidebar-inner { display: flex; flex-direction: column; gap: 22px; padding-bottom: 12px; }
.sidebar-mobile-header { display: none; }
.sidebar-section { display: flex; flex-direction: column; }
.sidebar-title {
    margin: 0 0 6px; padding: 0 16px;
    font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ios-label-2);
}
.sidebar-nav, .sidebar-toggles-group {
    background: var(--ios-cell); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-card);
}
.sidebar-link {
    position: relative; display: flex; align-items: center; gap: 10px;
    min-height: 44px; padding: 8px 14px; color: var(--ios-label); text-decoration: none;
    font-size: 15px;
}
.sidebar-link + .sidebar-link::before {
    content: ""; position: absolute; top: 0; left: 50px; right: 0; border-top: 0.5px solid var(--ios-sep);
}
.sidebar-link:active { background: var(--ios-fill); }
.sidebar-link.active { background: var(--tint-soft); color: var(--tint); font-weight: 600; }
.sidebar-link > i:first-child { width: 26px; text-align: center; font-size: 17px; color: var(--tint); flex: none; }
.sidebar-link-fav > i:first-child { color: var(--ios-pink); }
.sidebar-link span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-count, .sidebar-cat-count {
    font-size: 14px; color: var(--ios-label-2); font-weight: 400; font-variant-numeric: tabular-nums;
}
.sidebar-cat-thumb { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; flex: none; background: var(--ios-img-bg); filter: var(--ios-img-filter); }
.sidebar-cat-icon { width: 26px; text-align: center; color: var(--ios-label-3); flex: none; }
.sidebar-cat-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-cat-chevron { color: var(--ios-label-3); font-size: 12px; transition: transform .2s; }
.sidebar-link.expanded .sidebar-cat-chevron { transform: rotate(90deg); }
.sidebar-link.cat-collapsed { display: none !important; }
.sidebar-sub { font-size: 14px; }

.sidebar-toggle {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 44px; padding: 6px 14px; background: var(--ios-cell); font-size: 15px; cursor: pointer;
}
.sidebar-section > .sidebar-toggle:first-of-type { border-radius: var(--r) var(--r) 0 0; }
.sidebar-section > .sidebar-toggle:last-of-type { border-radius: 0 0 var(--r) var(--r); }
.sidebar-toggle + .sidebar-toggle::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; border-top: 0.5px solid var(--ios-sep); }
.sidebar-toggle span { order: 1; flex: 1; }
.sidebar-toggle input {
    order: 2; -webkit-appearance: none; appearance: none; flex: none;
    width: 51px; height: 31px; border-radius: 999px; background: var(--ios-fill-3);
    position: relative; transition: background .2s; cursor: pointer; margin: 0;
}
.sidebar-toggle input::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
    background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .2s;
}
.sidebar-toggle input:checked { background: var(--ios-green); }
.sidebar-toggle input:checked::after { transform: translateX(20px); }
.sidebar-select {
    min-height: 44px; width: 100%; padding: 0 14px; border: 0; border-radius: var(--r);
    background: var(--ios-cell); font-size: 16px; box-shadow: var(--shadow-card);
    -webkit-appearance: none; appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--ios-label-3) 50%), linear-gradient(135deg, var(--ios-label-3) 50%, transparent 50%);
    background-position: calc(100% - 20px) 19px, calc(100% - 15px) 19px; background-size: 5px 5px; background-repeat: no-repeat;
}

/* ════════════════ BANNERS / MOBILE TOP ════════════════ */
.login-banner {
    display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
    padding: 14px 16px; background: var(--ios-cell); border-radius: var(--r); box-shadow: var(--shadow-card);
}
.login-banner-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: #fff; flex: none; }
.login-banner .btn-primary-b2b { min-height: 36px; border-radius: 999px; font-size: 15px; }

.b2b-mobile-top { display: none; }
.b2b-reorder-hero {
    position: relative; display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 14px 16px; border: 0; border-radius: var(--r-lg); text-align: left; text-decoration: none;
    background: var(--ios-cell); color: var(--ios-label); box-shadow: var(--shadow-card); overflow: hidden;
}
.b2b-reorder-hero:active { background: var(--ios-cell-2); }
.b2b-reorder-hero-bg { display: none; }
.b2b-reorder-hero-icon {
    width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--ios-orange), var(--ios-pink)); color: #fff; font-size: 21px;
}
.b2b-reorder-hero-signin .b2b-reorder-hero-icon { background: var(--tint); }
.b2b-reorder-hero-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.b2b-reorder-hero-title { font-size: 16px; font-weight: 600; }
.b2b-reorder-hero-sub { font-size: 13px; color: var(--ios-label-2); }
.b2b-reorder-hero-arrow { color: var(--ios-label-3); font-size: 20px; }
.b2b-reorder-hero-arrow .bi-arrow-right-circle-fill::before { content: "\F285"; }   /* chevron-right */

.b2b-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.b2b-quick-btn {
    display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 12px;
    border: 0; border-radius: var(--r); background: var(--ios-cell); box-shadow: var(--shadow-card);
    text-align: left; color: var(--ios-label);
}
.b2b-quick-btn:active { background: var(--ios-cell-2); }
.b2b-quick-btn > i:first-child {
    width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none;
    background: var(--ios-pink); color: #fff; font-size: 16px;
}
.b2b-quick-prepaid > i:first-child { background: var(--ios-purple); }
.b2b-quick-label { font-size: 15px; font-weight: 600; display: block; }
.b2b-quick-sub { font-size: 12px; color: var(--ios-label-2); display: block; }

/* Recent orders (desktop) */
.recent-section { margin-bottom: 24px; }
.recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.recent-head .section-title { margin: 0; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.recent-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px;
    border: 0; border-radius: var(--r); background: var(--ios-cell); box-shadow: var(--shadow-card); text-align: left;
}
.recent-card:active { background: var(--ios-cell-2); }
.recent-date { font-size: 13px; color: var(--ios-label-2); }
.recent-meta { font-size: 13px; color: var(--ios-label-2); }
.recent-total { font-size: 17px; font-weight: 600; }
.recent-cta { margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--tint); }

/* ════════════════ CATEGORY LANDING (phones) ════════════════ */
.b2b-cat-landing { display: none; }
.b2b-cat-back-bar { display: none; }
.b2b-cat-landing-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 8px; }
.b2b-cat-landing-head .section-title { margin: 0; }
.b2b-cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.b2b-cat-card {
    position: relative; display: block; aspect-ratio: 1 / 0.82; width: 100%; padding: 0; overflow: hidden;
    border: 0; border-radius: var(--r-lg); background: var(--ios-cell); box-shadow: var(--shadow-card); text-align: left;
    transition: transform .12s;
}
.b2b-cat-card:active { transform: scale(.97); }
.b2b-cat-card-bg { position: absolute; inset: 0; display: grid; place-items: center; background: var(--ios-img-bg); }
.b2b-cat-card-bg img { width: 100%; height: 100%; object-fit: cover; filter: var(--ios-img-filter); }
.b2b-cat-card.no-image .b2b-cat-card-bg { background: color-mix(in srgb, var(--cat-color, var(--tint)) 18%, var(--ios-cell)); }
.b2b-cat-card-icon { font-size: 34px; color: var(--cat-color, var(--tint)); }
.b2b-cat-card-content {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px;
    background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0)); color: #fff;
}
.b2b-cat-card.no-image .b2b-cat-card-content { background: none; color: var(--ios-label); }
.b2b-cat-card-name { font-size: 16px; font-weight: 600; line-height: 1.2; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.b2b-cat-card.no-image .b2b-cat-card-name { text-shadow: none; }
.b2b-cat-card-meta { margin-top: 2px; font-size: 12.5px; opacity: .88; }

.b2b-cat-back-bar {
    position: sticky; top: calc(var(--bar-h) + 44px); z-index: 20;
    align-items: center; gap: 4px; margin: 0 -16px 8px; padding: 6px 12px;
    background: var(--ios-bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 0.5px solid var(--ios-sep);
}
.b2b-cat-back {
    display: inline-flex; align-items: center; gap: 2px; min-height: 36px; padding: 0 6px;
    border: 0; background: transparent; color: var(--tint); font-size: 17px;
}
.b2b-cat-back .bi-arrow-left::before { content: "\F284"; font-weight: 700; }   /* chevron-left */
.b2b-cat-back-title { font-size: 17px; font-weight: 600; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ════════════════ CATALOG ════════════════ */
.catalog { min-width: 0; }
.catalog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.catalog-head .section-title {
    margin: 0; padding: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
    text-transform: none; color: var(--ios-label);
}
.catalog-meta { font-size: 13px; color: var(--ios-label-2); }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.active-filters-label { font-size: 13px; color: var(--ios-label-2); }
.filter-chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px;
    border: 0; border-radius: 999px; background: var(--tint-soft); color: var(--tint); font-size: 14px; font-weight: 600;
}
.filter-chip .chip-x {
    width: 20px; height: 20px; margin-right: -6px; padding: 0; border: 0; border-radius: 50%;
    display: grid; place-items: center; background: transparent; color: inherit; font-size: 17px; line-height: 1; opacity: .7; cursor: pointer;
}
.filter-chip-clear-all {
    min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 600;
    background: transparent; color: var(--tint); cursor: pointer;
}

.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 24px; text-align: center; color: var(--ios-label-2); }
.empty-state .fw-bold { color: var(--ios-label); font-size: 17px; }
.empty-icon { font-size: 44px; color: var(--ios-label-3); }
.empty-clear-btn {
    margin-top: 10px; min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 600;
    background: var(--tint-soft); color: var(--tint); cursor: pointer;
}
.sentinel { height: 1px; }
.noscript-list { padding: 12px 20px; }

/* hidden legacy table view (the grid is the only view) */
.table-wrap { display: none !important; }

/* ════════════════ PRODUCT GRID + CARD ════════════════ */
.grid-wrap { display: block; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 16px; }
.prod-card {
    position: relative; display: flex; flex-direction: column; min-width: 0;
    background: var(--ios-cell); border-radius: var(--r-lg); box-shadow: var(--shadow-card); overflow: hidden;
}
.prod-card.row-in-cart { box-shadow: 0 0 0 2px var(--tint); }
.prod-card.row-flash { animation: iosflash .9s ease; }
@keyframes iosflash { 30% { box-shadow: 0 0 0 3px var(--ios-green); } }
.card-img-wrap {
    position: relative; aspect-ratio: 1 / 1; margin: 8px 8px 0; border-radius: var(--r);
    background: var(--ios-img-bg); overflow: hidden; cursor: zoom-in;
}
.card-img { width: 100%; height: 100%; object-fit: contain; padding: 8px; filter: var(--ios-img-filter); }
.card-img-empty { width: 100%; height: 100%; display: grid; place-items: center; color: #c7c7cc; font-size: 36px; }
.card-stock { position: absolute; top: 6px; left: 6px; right: 44px; }
.card-stock .stock-pill { max-width: 100%; line-height: 1.15; padding-top: 2px; padding-bottom: 2px; }
.card-fav {
    position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%;
    display: grid; place-items: center; font-size: 15px; color: #8e8e93;
    background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.card-fav.is-fav, .fav-btn.is-fav { color: var(--ios-pink); }
.card-cart-badge {
    position: absolute; bottom: 6px; right: 6px; min-width: 24px; height: 24px; padding: 0 7px;
    border-radius: 999px; background: var(--tint); color: #fff; font-size: 12.5px; font-weight: 700; line-height: 24px; text-align: center;
}
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
.card-name {
    font-size: 15px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em;
}
.card-name .sku { display: none; }
.card-sub { font-size: 12.5px; color: var(--ios-label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; margin-top: 2px; }
.card-price { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.card-price-unit { font-size: 12.5px; color: var(--ios-label-2); }
.card-price-was { font-size: 13px; color: var(--ios-label-2); text-decoration: line-through; }
.card-price-save { font-size: 12px; font-weight: 700; color: var(--ios-green); }
.card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-tag {
    display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 8px;
    border-radius: 6px; background: var(--ios-fill); color: var(--ios-label-2); font-size: 12px; font-weight: 600;
}
.meta-tag-variants { background: var(--tint-soft); color: var(--tint); }
.tier-pill {
    display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 0 8px;
    border: 0; border-radius: 6px; background: rgba(52, 199, 89, .14); color: var(--ios-green); font-size: 12px; font-weight: 700;
}
.card-qty-row { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.card-qty-row[data-state="empty"] .qty-control,
.card-qty-row[data-state="empty"] .box-chip { display: none; }
.card-qty-row[data-state="has-items"] .add-to-cart-btn { display: none; }
.add-to-cart-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 38px; border: 0; border-radius: 999px; background: var(--tint-soft); color: var(--tint);
    font-size: 15px; font-weight: 600;
}
.add-to-cart-btn:active { background: var(--tint); color: #fff; }
.add-to-cart-btn:disabled { background: var(--ios-fill); color: var(--ios-label-3); cursor: default; }
.add-to-cart-btn i { font-size: 15px; }
.btn-options-pick {
    flex: 1; min-height: 38px; border: 0; border-radius: 999px; background: var(--tint-soft); color: var(--tint);
    font-size: 15px; font-weight: 600;
}

/* stepper (iOS-like: tinted capsule with − value +) */
.qty-control {
    flex: 1; display: flex; align-items: center; min-height: 38px; min-width: 0;
    border-radius: 999px; background: var(--tint); color: #fff; overflow: hidden;
}
.qty-btn {
    width: 40px; min-height: 38px; flex: none; border: 0; background: transparent; color: inherit;
    font-size: 22px; font-weight: 500; line-height: 1; display: grid; place-items: center;
}
.qty-btn:active { background: rgba(255, 255, 255, .18); }
.qty-input {
    flex: 1; min-width: 0; width: 100%; height: 38px; border: 0; background: transparent; color: inherit;
    text-align: center; font-size: 16px; font-weight: 700; -moz-appearance: textfield; appearance: textfield;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-input:focus { outline: none; background: rgba(255, 255, 255, .15); }
.qty-control-sm { flex: none; width: 116px; min-height: 32px; }
.qty-control-sm .qty-btn { width: 34px; min-height: 32px; font-size: 19px; }
.qty-control-sm .qty-input { height: 32px; font-size: 16px; }
.box-chip {
    flex: none; min-height: 38px; padding: 0 10px; border: 0; border-radius: 999px;
    background: var(--ios-fill); color: var(--ios-label); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.box-chip-qty { color: var(--ios-label-2); font-weight: 500; }

/* stock pills */
.stock-pill {
    display: inline-flex; align-items: center; gap: 4px; min-height: 20px; padding: 0 7px;
    border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0;
    background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.stock-ok       { color: #248a3d; }
.stock-low      { color: #c93400; }
.stock-out      { color: #d70015; }
.stock-backorder{ color: #0040dd; }
.stock-prepaid  { color: #8944ab; }
@media (prefers-color-scheme: dark) {
    .stock-pill { background: rgba(28, 28, 30, .86); }
    .stock-ok { color: var(--ios-green); } .stock-low { color: var(--ios-orange); }
    .stock-out { color: var(--ios-red); } .stock-backorder { color: var(--ios-blue); } .stock-prepaid { color: var(--ios-purple); }
    .card-fav { background: rgba(44, 44, 46, .82); color: #aeaeb2; }
}
.min-order-badge { font-size: 12px; color: var(--ios-label-2); }
.price-caption { font-size: 12px; color: var(--ios-label-2); }

/* ════════════════ SHEETS (drawers) ════════════════
   Desktop: a floating panel on the right. Phones: a bottom sheet with a
   grabber (drag down to close — see the sheet manager in public_shop.js). */
.overlay {
    position: fixed; inset: 0; z-index: 70; background: var(--ios-dim);
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
    position: fixed; z-index: 80; top: 12px; right: 12px; bottom: 12px;
    width: 440px; max-width: calc(100vw - 24px);
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--ios-bg); border-radius: var(--r-lg); box-shadow: var(--shadow-float);
    transform: translateX(calc(100% + 24px)); transition: transform .32s cubic-bezier(.32, .72, 0, 1);
}
.drawer.open { transform: translateX(0); }
.drawer-detail { width: 480px; }
.drawer-header {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px 10px; background: var(--ios-bg); flex: none;
}
.drawer-header::before { content: none; }
.drawer-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.drawer-title i { color: var(--ios-orange); }
.drawer-subtitle { font-size: 13px; color: var(--ios-label-2); margin-top: 1px; }
.drawer-header .appbar-icon-btn, .drawer-header > .ghost-btn:last-child, .sheet-close {
    width: 30px; height: 30px; min-height: 30px; padding: 0; border-radius: 50%;
    background: var(--ios-fill); color: var(--ios-label-2); font-size: 13px; font-weight: 700;
}
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 16px 16px; }
.drawer-footer {
    flex: none; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--ios-bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--ios-sep);
}
.drawer-place { flex: 1; min-height: 50px; border-radius: 14px; font-size: 17px; }

/* grouped inset list — the building block of every sheet */
.ios-group, .cart-lines, .acct-list, .detail-facts, .b2b-reorder-list, .order-items {
    background: var(--ios-cell); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-card);
}
.ios-group-title, .detail-section-title, .acct-block-head span, .b2b-reorder-extras-title {
    margin: 22px 16px 6px; font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.02em;
    color: var(--ios-label-2);
}
.ios-group-foot { margin: 6px 16px 0; font-size: 13px; color: var(--ios-label-2); }

/* ════════════════ CART SHEET ════════════════ */
.drawer-cart #cartItems { display: flex; flex-direction: column; gap: 0; padding-top: 4px; }
.cart-line {
    position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 4px 12px;
    align-items: start; padding: 12px 14px; background: var(--ios-cell);
}
.cart-line:first-child { border-radius: var(--r) var(--r) 0 0; }
.cart-line:last-child { border-radius: 0 0 var(--r) var(--r); }
.cart-line:only-child { border-radius: var(--r); }
.cart-line + .cart-line::before { content: ""; position: absolute; top: 0; left: 80px; right: 0; border-top: 0.5px solid var(--ios-sep); }
.cart-line-img { grid-row: span 2; width: 52px; height: 52px; border-radius: 10px; object-fit: contain; background: var(--ios-img-bg); filter: var(--ios-img-filter); box-shadow: 0 0 0 0.5px var(--ios-sep); }
.cart-line-img-empty { display: grid; place-items: center; color: #c7c7cc; }
.cart-line-main { min-width: 0; }
.cart-line-name { font-size: 15px; font-weight: 600; line-height: 1.25; }
.cart-line-variant { font-size: 13px; color: var(--ios-label-2); margin-top: 2px; }
.cart-line-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; font-size: 13px; color: var(--ios-label-2); }
.cart-line-box-hint { font-size: 12.5px; color: var(--ios-label-2); margin-top: 1px; }
.cart-line-prepaid { font-size: 12.5px; font-weight: 600; color: var(--ios-purple); margin-top: 2px; }
.cart-line-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.cart-line-remove {
    width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--ios-red); font-size: 16px;
}
.cart-line-remove:active { background: var(--bad-soft); }
.cart-line-total { font-size: 16px; font-weight: 600; text-align: right; white-space: nowrap; }
.tier-badge { display: inline-flex; min-height: 20px; align-items: center; padding: 0 6px; border-radius: 5px; background: rgba(52,199,89,.14); color: var(--ios-green); font-size: 11.5px; font-weight: 700; }
.price-tiered { color: var(--ios-green); font-weight: 700; }

.shopping-as-chip {
    position: relative; display: flex; align-items: center; gap: 10px; margin: 0 16px 8px; padding: 8px 12px;
    background: var(--ios-cell); border-radius: var(--r); box-shadow: var(--shadow-card);
}
.shopping-as-label { font-size: 13px; color: var(--ios-label-2); flex: none; }
.shopping-as-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 4px 0; font-size: 15px; font-weight: 600; color: var(--tint); }
.shopping-as-btn span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shopping-as-menu {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 5; margin: 0; padding: 6px; list-style: none;
    background: var(--ios-elev); border-radius: var(--r); box-shadow: var(--shadow-float);
}
.shopping-as-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 15px; text-align: left; }
.shopping-as-item:active { background: var(--ios-fill); }
.shopping-as-item.is-current { color: var(--tint); font-weight: 600; }
.shopping-as-item-name { flex: 1; }
.shopping-as-item-due { font-size: 13px; color: var(--ios-red); }

/* checkout (inside the cart footer — scrolls with it on phones) */
.drawer-cart .drawer-footer { max-height: 62vh; overflow-y: auto; background: var(--ios-bg); -webkit-backdrop-filter: none; backdrop-filter: none; border-top: 0; padding-top: 4px; }
.min-order { margin: 6px 0 4px; padding: 12px 14px; background: var(--ios-cell); border-radius: var(--r); box-shadow: var(--shadow-card); }
.min-order-row { display: flex; justify-content: space-between; font-size: 14px; }
.min-order-bar { height: 6px; margin: 8px 0 6px; border-radius: 999px; background: var(--ios-fill); overflow: hidden; }
.min-order-bar-fill { height: 100%; border-radius: 999px; background: var(--ios-orange); transition: width .3s; }
.min-order-shortfall { font-size: 13px; color: var(--ios-label-2); }

.checkout-fields { margin-top: 18px; }
.checkout-summary {
    display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer;
    margin: 0 4px 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ios-label-2);
}
.checkout-summary::-webkit-details-marker { display: none; }
.checkout-summary .step-num { display: none; }
.checkout-summary > i { display: none; }
.checkout-summary .ms-1 { margin: 0; }
.checkout-hint { margin-left: auto; text-transform: none; font-size: 14px; color: var(--tint); letter-spacing: -0.01em; }
.checkout-summary::after { content: "\F282"; font-family: bootstrap-icons; font-size: 11px; transition: transform .2s; }
.checkout-fields[open] > .checkout-summary::after { transform: rotate(180deg); }
.checkout-fields[open] .checkout-hint { display: none; }
.req { color: var(--ios-red); }

/* pay-with → an iOS selection list with a check mark */
.pm-picker-grid { display: flex; flex-direction: column; background: var(--ios-cell); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-card); }
.pm-tile {
    position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; cursor: pointer;
}
.pm-tile + .pm-tile::before { content: ""; position: absolute; top: 0; left: 54px; right: 0; border-top: 0.5px solid var(--ios-sep); }
.pm-tile input { position: absolute; opacity: 0; pointer-events: none; }
.pm-tile-icon { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--ios-green); color: #fff; font-size: 15px; }
.pm-tile:nth-child(3n+2) .pm-tile-icon { background: var(--ios-blue); }
.pm-tile:nth-child(3n+3) .pm-tile-icon { background: var(--ios-indigo); }
.pm-tile-label { flex: 1; font-size: 16px; }
.pm-tile::after { content: ""; width: 20px; font-family: bootstrap-icons; color: var(--tint); font-size: 18px; font-weight: 700; }
.pm-tile:has(input:checked)::after { content: "\F633"; }   /* check-lg */
.pm-tile:active { background: var(--ios-fill); }

/* Παραστατικό → segmented control + an iOS form list */
.invoice-picker-grid {
    display: grid; grid-template-columns: 1fr 1fr; padding: 2px; margin-bottom: 12px;
    background: var(--ios-fill); border-radius: 9px;
}
.invoice-tile { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 32px; padding: 0 8px; border-radius: 7px; cursor: pointer; font-size: 14px; font-weight: 600; }
.invoice-tile input { position: absolute; opacity: 0; pointer-events: none; }
.invoice-tile-icon { display: none; }
.invoice-tile-desc { font-weight: 400; color: var(--ios-label-2); }
.invoice-tile:has(input:checked) { background: var(--ios-elev); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04); }
@media (prefers-color-scheme: dark) { .invoice-tile:has(input:checked) { background: #636366; } }
.invoice-fields { display: flex; flex-direction: column; background: var(--ios-cell); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-card); }
.invoice-fields[hidden] { display: none; }
.invoice-fields-row { position: relative; display: flex; }
.invoice-fields-row + .invoice-fields-row::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; border-top: 0.5px solid var(--ios-sep); z-index: 1; }
.invoice-field { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 6px 14px; }
.invoice-field + .invoice-field::before { content: ""; position: absolute; top: 10px; bottom: 10px; left: 0; border-left: 0.5px solid var(--ios-sep); }
.invoice-field-narrow { flex: 0 0 34%; }
.invoice-field-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ios-label-2); }
.invoice-field-manage { margin-left: auto; font-size: 13px; text-decoration: none; }
.invoice-field input, .invoice-field select {
    width: 100%; min-height: 26px; border: 0; padding: 0; background: transparent; outline: none; font-size: 16px; color: var(--ios-label);
}
.invoice-field input::placeholder { color: var(--ios-label-3); }
.invoice-field input.is-invalid { color: var(--ios-red); }
.invoice-afm-row { display: flex; align-items: center; gap: 8px; }
.invoice-afm-lookup { flex: none; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--tint-soft); color: var(--tint); font-size: 14px; font-weight: 600; }
.invoice-afm-lookup::after { content: attr(data-label); }
.invoice-afm-hint { font-size: 12px; color: var(--ios-label-2); }
.invoice-afm-hint.is-error { color: var(--ios-red); }
.invoice-afm-hint.is-success { color: var(--ios-green); }

.checkout-delivery, .checkout-notes { margin-top: 18px; }
.field-label { display: block; margin: 0 4px 6px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ios-label-2); }
.field-label i { display: none; }
.field-input {
    display: block; width: 100%; min-height: 48px; padding: 12px 14px; border: 0; border-radius: var(--r);
    background: var(--ios-cell); box-shadow: var(--shadow-card); font-size: 16px; resize: vertical; outline: none; color: var(--ios-label);
}
.field-input::placeholder { color: var(--ios-label-3); }
.saved-addresses { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.saved-addresses-label { font-size: 13px; color: var(--ios-label-2); }
.saved-addr-chip, .saved-addr-new { min-height: 30px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.location-btn { margin-top: 8px; }
.location-status { margin-left: 8px; font-size: 13px; color: var(--ios-green); }

.drawer-totals { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin: 18px 4px 8px; font-size: 16px; }
.drawer-total { margin-left: auto; text-align: right; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.dtotal-net, .dtotal-vat { font-size: 14px; font-weight: 500; color: var(--ios-label-2); }
.dtotal-sep { color: var(--ios-label-3); }
.dtotal-incl { font-size: 12px; font-weight: 400; color: var(--ios-label-2); }
.checkout-req { margin: 0 0 10px; padding: 10px 14px; border-radius: var(--r); background: rgba(255,149,0,.12); color: var(--ios-label); font-size: 14px; }
.checkout-req[hidden] { display: none; }
.checkout-req-list { margin: 0; padding: 0; list-style: none; }
.checkout-req-list li { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; cursor: pointer; }
.checkout-req-list li .bi { color: var(--ios-orange, #ff9500); }
.drawer-actions { display: flex; gap: 10px; align-items: center; padding-bottom: 4px; }
.drawer-actions .ghost-btn { min-height: 50px; padding: 0 18px; border-radius: 14px; color: var(--ios-red); }

/* drafts — an iOS context menu */
.drafts-wrapper { position: relative; }
.drafts-count-badge { margin-left: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--tint); color: #fff; font-size: 11px; line-height: 18px; }
.drafts-menu {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 10; width: min(280px, calc(100vw - 32px)); padding: 6px;
    background: var(--ios-elev); border-radius: var(--r); box-shadow: var(--shadow-float);
    visibility: hidden; opacity: 0; transform: scale(.96) translateY(-4px); transform-origin: top right; transition: all .15s;
}
.drafts-menu.open { visibility: visible; opacity: 1; transform: none; }
.drafts-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-size: 15px; color: var(--tint); text-align: left; }
.drafts-menu-item:active, .drafts-item:active { background: var(--ios-fill); }
.drafts-list { margin-top: 4px; border-top: 0.5px solid var(--ios-sep); padding-top: 4px; }
.drafts-item { display: flex; align-items: center; gap: 6px; border-radius: 8px; }
.drafts-item-main { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 10px; text-align: left; }
.drafts-item-name { font-size: 15px; font-weight: 600; }
.drafts-item-meta { font-size: 12.5px; color: var(--ios-label-2); }
.drafts-item-delete { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--ios-red); }
.drafts-empty { padding: 10px; font-size: 13px; color: var(--ios-label-2); }

/* ════════════════ ACCOUNT SHEET ════════════════ */
.acct-identity { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--ios-cell); border-radius: var(--r); box-shadow: var(--shadow-card); }
.acct-identity-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none; background: linear-gradient(180deg, #a2a7b1, #858a94); color: #fff; font-size: 28px; }
.acct-identity-name { font-size: 18px; font-weight: 600; }
.acct-identity-meta { font-size: 13px; color: var(--ios-label-2); }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.acct-stat { padding: 12px 8px; text-align: center; background: var(--ios-cell); border-radius: var(--r); box-shadow: var(--shadow-card); }
.acct-stat-num { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.acct-stat-label { font-size: 12px; color: var(--ios-label-2); }
.acct-stat-warn .acct-stat-num { color: var(--ios-red); }
.acct-cta-stack { display: flex; flex-direction: column; margin-top: 12px; background: var(--ios-cell); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-card); }
.acct-cta-primary, .acct-cta-secondary { position: relative; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; font-size: 16px; text-decoration: none; color: var(--tint); }
.acct-cta-secondary + .acct-cta-secondary, .acct-cta-primary + .acct-cta-secondary { border-top: 0.5px solid var(--ios-sep); }
.acct-cta-warn { color: var(--ios-red); }
.acct-block-head { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.acct-block-head > i { display: none; }
.acct-block-head span { margin: 22px 0 6px 12px; }
.acct-block-link { margin-top: 16px; font-size: 14px; text-decoration: none; }
.acct-list { margin: 0; padding: 0; list-style: none; }
.acct-list-row { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px; }
.acct-list-row + .acct-list-row::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; border-top: 0.5px solid var(--ios-sep); }
.acct-list-main { flex: 1; min-width: 0; }
.acct-list-title { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; }
.acct-list-ref { font-weight: 400; color: var(--ios-label-2); }
.acct-list-sub { font-size: 13px; color: var(--ios-label-2); }
.acct-list-amount { font-size: 15px; font-weight: 600; white-space: nowrap; }
.acct-pay-pill { display: inline-flex; align-items: center; min-height: 18px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.acct-pay-paid { background: rgba(52,199,89,.14); color: var(--ios-green); }
.acct-pay-partial { background: rgba(255,149,0,.14); color: var(--ios-orange); }
.acct-pay-unpaid { background: rgba(255,59,48,.12); color: var(--ios-red); }
.acct-pay-other { background: var(--ios-fill); color: var(--ios-label-2); }
.acct-empty-mini { padding: 24px 12px; text-align: center; color: var(--ios-label-2); }
.acct-signout-btn { width: 100%; min-height: 50px; border: 0; border-radius: 14px; background: var(--ios-cell); color: var(--ios-red); font-size: 17px; }
.drawer-account .drawer-footer form { margin: 0; }

/* ════════════════ SMART REORDER SHEET ════════════════ */
.b2b-reorder-explainer { margin: 4px 4px 12px; font-size: 14px; color: var(--ios-label-2); }
.b2b-reorder-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; background: var(--ios-cell); }
.b2b-reorder-row + .b2b-reorder-row::before { content: ""; position: absolute; top: 0; left: 50px; right: 0; border-top: 0.5px solid var(--ios-sep); }
.b2b-reorder-row:has(.b2b-reorder-check:not(:checked)) { opacity: .45; }
.b2b-reorder-check { width: 22px; height: 22px; accent-color: var(--tint); flex: none; }
.b2b-reorder-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; background: var(--ios-img-bg); flex: none; }
.b2b-reorder-info { flex: 1; min-width: 0; }
.b2b-reorder-name { font-size: 15px; font-weight: 600; }
.b2b-reorder-meta { font-size: 12.5px; color: var(--ios-label-2); }
.b2b-reorder-qtywrap { display: flex; align-items: center; gap: 6px; }
.b2b-reorder-qty { width: 64px; min-height: 34px; border: 0; border-radius: 8px; background: var(--ios-fill); text-align: center; font-size: 16px; font-weight: 600; }
.b2b-reorder-unit { font-size: 12.5px; color: var(--ios-label-2); }
.b2b-reorder-extras { margin-top: 8px; }
.b2b-reorder-extras-title i { display: none; }
.reorder-footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 0.5px solid var(--ios-sep); background: var(--ios-bar); }
.reorder-footer .btn-primary-b2b { width: 100%; min-height: 50px; border-radius: 14px; font-size: 17px; }

/* ════════════════ ORDERS SHEET ════════════════ */
.order-card { margin-bottom: 10px; background: var(--ios-cell); border-radius: var(--r); box-shadow: var(--shadow-card); overflow: hidden; }
.order-card-head { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 14px; list-style: none; cursor: pointer; }
.order-card-head::-webkit-details-marker { display: none; }
.order-card-meta { flex: 1; min-width: 0; }
.order-card-id { font-size: 15px; font-weight: 600; }
.order-card-date, .order-card-time, .order-card-count { font-size: 13px; color: var(--ios-label-2); }
.order-card-stats { text-align: right; }
.order-card-total { font-size: 16px; font-weight: 700; }
.order-card-chev { color: var(--ios-label-3); transition: transform .2s; }
.order-card[open] .order-card-chev { transform: rotate(90deg); }
.order-card-body { border-top: 0.5px solid var(--ios-sep); padding: 8px 14px 12px; }
.order-items { box-shadow: none; background: transparent; border-radius: 0; }
.order-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 44px; }
.order-item-main { flex: 1 1 140px; min-width: 0; }
.order-item-img { width: 34px; height: 34px; border-radius: 7px; object-fit: contain; background: var(--ios-img-bg); }
.order-item-img-empty { display: grid; place-items: center; color: #c7c7cc; }
.order-item-main { flex: 1; min-width: 0; }
.order-item-name { font-size: 14px; }
.order-item-qty { font-size: 12.5px; color: var(--ios-label-2); }
.order-item-total { font-size: 14px; font-weight: 600; }
.order-card-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.order-status { display: inline-flex; min-height: 20px; align-items: center; padding: 0 7px; border-radius: 6px; background: var(--ios-fill); font-size: 11.5px; font-weight: 700; color: var(--ios-label-2); }
.order-status-COMPLETED { background: rgba(52,199,89,.14); color: var(--ios-green); }
.order-status-PENDING, .order-status-ACCEPTED, .order-status-PREPARING, .order-status-READY { background: var(--tint-soft); color: var(--tint); }
.order-status-CANCELLED { background: rgba(255,59,48,.12); color: var(--ios-red); }
.orders-load-more { width: 100%; margin-top: 4px; }

/* ════════════════ PRODUCT DETAIL SHEET ════════════════ */
.detail-hero { position: relative; margin: 0 -16px; aspect-ratio: 4 / 3; background: var(--ios-img-bg); }
.detail-hero-img { width: 100%; height: 100%; object-fit: contain; padding: 16px; filter: var(--ios-img-filter); cursor: zoom-in; }
.detail-hero-empty { display: grid; place-items: center; color: #c7c7cc; font-size: 56px; }
.detail-hero-overlay { position: absolute; left: 12px; bottom: 12px; }
.detail-gallery { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.detail-gallery::-webkit-scrollbar { display: none; }
.detail-gallery .detail-hero-img { flex: 0 0 100%; scroll-snap-align: center; }
.detail-dots { position: absolute; right: 12px; bottom: 14px; display: flex; gap: 2px; }
.detail-dots button { width: 22px; height: 22px; border: 0; padding: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.detail-dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(0,0,0,.22); transition: background .2s, transform .2s; }
.detail-dots button.on::before { background: var(--tint); transform: scale(1.25); }
.detail-name { margin: 16px 0 4px; font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.detail-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.detail-price { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.detail-section { margin-top: 4px; }
.detail-section-title { margin: 22px 4px 6px; }
.detail-description { padding: 12px 14px; background: var(--ios-cell); border-radius: var(--r); font-size: 15px; line-height: 1.45; white-space: pre-line; box-shadow: var(--shadow-card); }
.detail-facts { margin: 0; }
.detail-fact { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 14px; }
.detail-fact + .detail-fact::before { content: ""; position: absolute; top: 0; left: 14px; right: 0; border-top: 0.5px solid var(--ios-sep); }
.detail-fact dt { font-size: 15px; color: var(--ios-label); }
.detail-fact dd { margin: 0; font-size: 15px; color: var(--ios-label-2); text-align: right; }
.detail-add-row { display: flex; align-items: center; gap: 10px; }
.detail-add-row .qty-control { flex: 0 0 132px; min-height: 50px; border-radius: 14px; background: var(--ios-fill); color: var(--ios-label); }
.detail-add-row .qty-btn { min-height: 50px; color: var(--tint); }
.detail-add-row .qty-input { height: 50px; }
.detail-unit-hint { font-size: 12.5px; color: var(--ios-label-2); white-space: nowrap; }
.popover-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.popover-table th { padding: 6px 4px; text-align: left; font-size: 12px; font-weight: 400; color: var(--ios-label-2); text-transform: uppercase; }
.popover-table td { padding: 8px 4px; border-top: 0.5px solid var(--ios-sep); }
.detail-section .popover-table { background: var(--ios-cell); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-card); }
.detail-section .popover-table th, .detail-section .popover-table td { padding-left: 14px; }

/* tier popover */
.popover {
    position: fixed; z-index: 100; width: 260px; padding: 12px; border-radius: var(--r);
    background: var(--ios-elev); box-shadow: var(--shadow-float);
    visibility: hidden; opacity: 0; transform: translateY(4px); transition: all .15s;
}
.popover.open { visibility: visible; opacity: 1; transform: none; }
.popover-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }

/* ════════════════ SCANNER SHEET ════════════════ */
.drawer-scanner-body { display: flex; flex-direction: column; gap: 12px; }
.scanner-view { position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-lg); overflow: hidden; background: #000; }
.scanner-video { position: absolute; inset: 0; }
.scanner-video video { width: 100% !important; height: 100% !important; object-fit: cover; }
.scanner-frame { position: absolute; inset: 22% 12%; border: 3px solid rgba(255,255,255,.85); border-radius: 18px; pointer-events: none; }
.scanner-status { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; color: #fff; font-size: 14px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.scanner-log { display: flex; flex-direction: column; gap: 6px; }
.scanner-log-line { padding: 8px 12px; border-radius: 10px; background: var(--ios-cell); font-size: 14px; }
.scanner-visual-btn { display: none; }

/* ════════════════ VARIANT PICKER ════════════════ */
.variant-picker-overlay { position: fixed; inset: 0; z-index: 1900; background: var(--ios-dim); opacity: 0; pointer-events: none; transition: opacity .2s; }
.variant-picker-overlay.open { opacity: 1; pointer-events: auto; }
.variant-picker-modal {
    position: fixed; z-index: 1901; top: 50%; left: 50%; width: min(420px, calc(100vw - 24px)); max-height: 86vh; max-height: 86dvh; overflow-y: auto;
    padding: 18px; border-radius: var(--r-lg); background: var(--ios-bg); box-shadow: var(--shadow-float);
    opacity: 0; pointer-events: none; transform: translate(-50%, -46%) scale(.98); transition: all .2s;
}
.variant-picker-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.vp-header { display: flex; align-items: flex-start; gap: 12px; }
.vp-img { width: 64px; height: 64px; border-radius: 12px; object-fit: contain; background: var(--ios-img-bg); flex: none; }
.vp-title, .vp-name { font-size: 17px; font-weight: 600; flex: 1; }
.vp-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vp-subtitle { font-size: 13px; color: var(--ios-label-2); }
.vp-close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--ios-fill); color: var(--ios-label-2); flex: none; }
.vp-axes { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.vp-axis-label { font-size: 13px; text-transform: uppercase; color: var(--ios-label-2); margin-bottom: 6px; }
.vp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vp-chip { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--ios-cell); box-shadow: var(--shadow-card); font-size: 15px; }
.vp-chip-picked { background: var(--tint); color: #fff; }
.vp-chip-oos { opacity: .4; text-decoration: line-through; }
.vp-priceline { display: flex; align-items: baseline; gap: 6px; margin-top: 14px; }
.vp-price { font-size: 22px; font-weight: 700; }
.vp-price-label { font-size: 13px; color: var(--ios-label-2); }
.vp-footer { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.vp-qty { flex: 0 0 120px; background: var(--ios-fill); color: var(--ios-label); min-height: 46px; }
.vp-qty .qty-btn { color: var(--tint); min-height: 46px; }
.vp-add { flex: 1; min-height: 46px; border-radius: 12px; }

/* ════════════════ TOASTS (iOS banner) ════════════════ */
.toast-container {
    position: fixed; z-index: 10050; top: calc(10px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none;
}
.toast {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; border-radius: 16px;
    background: var(--ios-bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    box-shadow: var(--shadow-float); color: var(--ios-label); font-size: 15px; font-weight: 500;
    transform: translateY(-16px); opacity: 0; transition: all .28s cubic-bezier(.32, .72, 0, 1); pointer-events: auto;
    border-left: 0 !important;
}
.toast.show { transform: none; opacity: 1; }
.toast::before { font-family: bootstrap-icons; font-size: 20px; content: "\F431"; color: var(--tint); }
.toast-success::before { content: "\F26B"; color: var(--ios-green); }
.toast-warning::before { content: "\F33B"; color: var(--ios-orange); }
.toast-error::before, .toast-danger::before { content: "\F623"; color: var(--ios-red); }

/* ════════════════ iOS ALERT DIALOGS ════════════════
   window.shopConfirm / shopPrompt / shopAlert, the ΑΦΜ gate, the password
   change and the ΑΑΔΕ result all use these — no native dialogs (the driver
   app is a WebView). */
.ios-alert-backdrop, .b2b-afm-prompt {
    position: fixed; inset: 0; z-index: 20000; display: grid; place-items: center; padding: 24px;
    background: var(--ios-dim); animation: iosfade .2s ease;
}
.b2b-afm-prompt[hidden] { display: none; }
@keyframes iosfade { from { opacity: 0; } }
.ios-alert, .b2b-afm-card {
    width: min(300px, 100%); overflow: hidden; border-radius: 14px; text-align: center;
    background: var(--ios-bar); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px);
    box-shadow: var(--shadow-float); animation: iospop .25s cubic-bezier(.32, .72, 0, 1);
}
.b2b-afm-card { width: min(360px, 100%); }
@keyframes iospop { from { transform: scale(1.12); opacity: 0; } }
.ios-alert-body, .b2b-afm-card > h3, .b2b-afm-card > p { padding-left: 18px; padding-right: 18px; }
.ios-alert-body { padding-top: 18px; padding-bottom: 16px; }
.ios-alert-title, .b2b-afm-card h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.b2b-afm-card h3 { padding-top: 18px; }
.ios-alert-msg, .b2b-afm-card p, .b2b-afm-sub { margin: 4px 0 0; font-size: 13px; line-height: 1.35; color: var(--ios-label); }
.b2b-afm-icon { padding-top: 18px; font-size: 32px; color: var(--ios-green); }
.ios-alert-input {
    width: 100%; margin-top: 12px; min-height: 36px; padding: 0 10px; border: 0.5px solid var(--ios-sep); border-radius: 8px;
    background: var(--ios-elev); font-size: 16px; outline: none; color: var(--ios-label); text-align: left;
}
.ios-alert-err { min-height: 16px; margin-top: 6px; font-size: 12.5px; color: var(--ios-red); }
.ios-alert-list { display: flex; flex-direction: column; margin-top: 10px; text-align: left; }
.ios-alert-list button { min-height: 44px; border: 0; border-top: 0.5px solid var(--ios-sep); background: transparent; color: var(--tint); font-size: 16px; text-align: center; }
.ios-alert-list button small { display: block; font-size: 12px; color: var(--ios-label-2); }
.ios-alert-actions, .b2b-afm-actions { display: flex; border-top: 0.5px solid var(--ios-sep); margin-top: 14px; }
.ios-alert-actions.stacked { flex-direction: column; }
.ios-alert-actions button, .b2b-afm-actions button {
    flex: 1; min-height: 44px; border: 0; background: transparent; color: var(--tint); font-size: 17px;
}
.ios-alert-actions button + button, .b2b-afm-actions button + button { border-left: 0.5px solid var(--ios-sep); }
.ios-alert-actions.stacked button + button { border-left: 0; border-top: 0.5px solid var(--ios-sep); }
.ios-alert-actions .is-default, .b2b-afm-go { font-weight: 600; }
.ios-alert-actions .is-destructive { color: var(--ios-red); }
.ios-alert-actions button:active, .b2b-afm-actions button:active, .ios-alert-list button:active { background: var(--ios-fill); }
.b2b-afm-skip { color: var(--tint) !important; }
#afmResultFields { margin: 12px 14px 0; padding: 4px 0; background: var(--ios-elev); border-radius: 10px; text-align: left; }
.afm-field { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: 13.5px; }
.afm-field + .afm-field { border-top: 0.5px solid var(--ios-sep); }
.afm-field b, .afm-field strong { font-weight: 400; color: var(--ios-label-2); }

/* ════════════════ IMAGE LIGHTBOX ════════════════ */
.shop-img-lightbox { position: fixed; inset: 0; z-index: 1200; display: none; background: rgba(0,0,0,.94); }
.shop-img-lightbox.open { display: block; }
.shop-img-lightbox-scroll { position: absolute; inset: 0; overflow: auto; display: grid; place-items: center; touch-action: pinch-zoom; }
.shop-img-lightbox-scroll img { max-width: 100%; max-height: 100%; object-fit: contain; }
.shop-img-lightbox-close {
    position: absolute; z-index: 2; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px;
    width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 16px;
}

/* ════════════════ FLOATING CART BAR (phones) ════════════════ */
.cart-bar { display: none; }

/* ════════════════ FOOTER ════════════════ */
.shop-footer { padding: 8px 16px 24px; }

/* ════════════════ AI ASSISTANT (restyle) ════════════════ */
.ios-shop #b2bAiBtn {
    background: var(--ios-bar) !important; color: var(--tint) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    box-shadow: var(--shadow-float) !important; border: 0 !important;
}
.ios-shop #b2bAiPanel { border-radius: var(--r-lg) !important; background: var(--ios-bg) !important; color: var(--ios-label); box-shadow: var(--shadow-float) !important; }
.ios-shop .b2bAi-head { background: var(--ios-bar) !important; color: var(--ios-label) !important; border-bottom: 0.5px solid var(--ios-sep); }
.ios-shop .b2bAi-msg.bot { background: var(--ios-cell) !important; color: var(--ios-label) !important; }
.ios-shop .b2bAi-msg:not(.bot) { background: var(--tint) !important; color: #fff !important; }
.ios-shop #b2bAiInput { background: var(--ios-fill) !important; color: var(--ios-label) !important; border: 0 !important; border-radius: 999px !important; }
.ios-shop #b2bAiSendBtn { background: var(--tint) !important; border-radius: 50% !important; }
body.cart-open #b2bAiBtn, body.detail-open #b2bAiBtn, body.orders-open #b2bAiBtn,
body.scanner-open #b2bAiBtn, body.filters-open #b2bAiBtn, body.sheet-lock #b2bAiBtn { display: none !important; }

/* ════════════════ RESPONSIVE ════════════════ */
@media (max-width: 991.98px) {
    .layout { grid-template-columns: minmax(0, 1fr); }
    .appbar-mobile-filters { display: grid; }
    /* the sidebar becomes a sheet from the left, with a dimmed backdrop */
    .sidebar {
        position: fixed; z-index: 85; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); max-height: none;
        background: var(--ios-bg); padding: 12px 12px calc(20px + env(safe-area-inset-bottom, 0px));
        transform: translateX(-102%); transition: transform .32s cubic-bezier(.32, .72, 0, 1);
        box-shadow: var(--shadow-float); overflow-y: auto;
    }
    .sidebar.open { transform: translateX(0); }
    body.filters-open::after { content: ""; position: fixed; inset: 0; z-index: 84; background: var(--ios-dim); }
    .sidebar-mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 4px; }
    .sidebar-mobile-header h6 { margin: 0; font-size: 20px; font-weight: 700; }
    .sidebar-mobile-header .appbar-icon-btn { width: 30px; height: 30px; border-radius: 50%; background: var(--ios-fill); color: var(--ios-label-2); font-size: 13px; }
}

@media (max-width: 767.98px) {
    body { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
    .appbar-inner {
        grid-template-columns: auto minmax(0, 1fr) auto auto auto auto;
        grid-template-areas: "brand . user cart lang filt" "search search search search search search";
        gap: 6px 4px; padding-top: 6px; padding-bottom: 8px;
    }
    .appbar-inner.has-cut {
        grid-template-areas: "brand . user cart lang filt" "search search search search search search" "cut cut cut cut cut cut";
    }
    .appbar-name { display: block; }
    .appbar-tenant { font-size: 17px; }
    .appbar-tag { display: none; }
    .appbar-search { max-width: none; }
    .appbar-user-name { display: none !important; }
    .ios-shop .lb-lang-code, .ios-shop .lb-lang-caret { display: none; }
    .ios-shop .lb-lang-btn { width: 36px; padding: 0 !important; justify-content: center; background: transparent !important; color: var(--tint) !important; font-size: 20px; }
    .layout { padding: 12px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left)); gap: 16px; }

    /* default phone state: the category landing, not the catalog */
    .b2b-mobile-top { display: block; margin-bottom: 18px; }
    .b2b-cat-landing { display: block; }
    body.b2b-show-catalog .b2b-cat-landing { display: none; }
    body:not(.b2b-show-catalog) .catalog { display: none; }
    body:not(.b2b-show-catalog) .login-banner { display: none; }
    .recent-section { display: none; }
    body.b2b-show-catalog .b2b-cat-back-bar,
    body.b2b-in-subgrid .b2b-cat-back-bar { display: flex; }
    body.b2b-in-subgrid .b2b-cat-landing-head { display: none !important; }
    .b2b-cat-back-bar { top: calc(var(--bar-h) + 44px); }

    .catalog-head .section-title { font-size: 22px; }
    .prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .card-img-wrap { margin: 6px 6px 0; }
    .card-body { padding: 8px 10px 10px; }
    .card-name { font-size: 14px; }
    .card-price { font-size: 17px; }
    .add-to-cart-btn span { display: none; }
    .add-to-cart-btn::after { content: attr(data-short); }
    .box-chip { display: none !important; }

    /* sheets become bottom sheets with a grabber */
    .drawer, .drawer-detail {
        top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: none; max-height: 94vh; max-height: 94dvh;
        border-radius: 12px 12px 0 0; box-shadow: var(--shadow-sheet);
        transform: translateY(102%);
    }
    .drawer.open { transform: translateY(0); }
    .drawer.dragging { transition: none; }
    .drawer-header { padding-top: 20px; cursor: grab; touch-action: none; }
    .drawer-header::before {
        content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px;
        border-radius: 999px; background: var(--ios-fill-3);
    }
    .drawer-cart { height: 94vh; height: 94dvh; }
    .drawer-cart .drawer-body { flex: 0 0 auto; overflow: visible; }
    .drawer-cart { overflow-y: auto; }
    .drawer-cart .drawer-footer { max-height: none; overflow: visible; }
    .drawer-cart .drawer-header { position: sticky; top: 0; z-index: 3; background: var(--ios-bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }

    /* the floating cart bar */
    .cart-bar {
        position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 8px 0 16px;
        border: 0; border-radius: 16px; background: var(--tint); color: #fff; text-align: left;
        box-shadow: 0 8px 24px color-mix(in srgb, var(--tint) 35%, transparent), 0 2px 6px rgba(0,0,0,.12);
        transform: translateY(0); transition: transform .3s cubic-bezier(.32, .72, 0, 1), opacity .2s;
    }
    .cart-bar[hidden] { display: flex; transform: translateY(140%); opacity: 0; pointer-events: none; }
    body.cart-open .cart-bar, body.detail-open .cart-bar, body.orders-open .cart-bar,
    body.scanner-open .cart-bar, body.filters-open .cart-bar, body.sheet-lock .cart-bar { transform: translateY(140%); opacity: 0; }
    .cart-bar-icon { position: relative; font-size: 22px; }
    .cart-bar-count {
        position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px;
        border-radius: 999px; background: #fff; color: var(--tint); font-size: 11.5px; font-weight: 800; line-height: 18px; text-align: center;
    }
    .cart-bar-text { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; }
    .cart-bar-total { font-size: 17px; font-weight: 700; }
    .cart-bar-go { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.18); font-size: 16px; }
    .ios-shop #b2bAiBtn { bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important; }
    .toast-container { top: calc(8px + env(safe-area-inset-top, 0px)); }
}

@media (max-width: 380px) {
    .prod-grid { gap: 8px; }
    .card-price { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.b2b-quick-text { display: flex; flex-direction: column; min-width: 0; }
.prod-card:not(.row-in-cart) .card-cart-badge { display: none; }
.card-name[data-detail-pid] { cursor: pointer; }
.grid-empty .empty-state { background: var(--ios-cell); border-radius: var(--r-lg); }
.b2b-quick-actions { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ios-alert button:focus-visible, .b2b-afm-actions button:focus-visible { outline: none; background: var(--ios-fill); }
.detail-price-row .card-price-unit { font-size: 14px; }
.detail-add-row .drawer-place { white-space: normal; min-width: 0; line-height: 1.15; }
@media (max-width: 767.98px) {
    .catalog-head .section-title { display: none; }
    .catalog-head { justify-content: flex-end; margin-bottom: 6px; }
    .detail-unit-hint { display: none; }
    .detail-add-row .qty-control { flex-basis: 120px; }
}
.order-card-head { align-items: center; }
.order-card-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.b2b-reorder-thumb { display: grid; place-items: center; overflow: hidden; color: #c7c7cc; }
.b2b-reorder-thumb img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 991.98px) { .sidebar-mobile-header h6 { flex: 1; } }
@media (max-width: 767.98px) { .login-banner { display: none !important; } }
/* the cart sheet scrolls as ONE column (lines, then checkout) with the
   order button pinned at the bottom — desktop too */
.drawer-cart { overflow-y: auto; overscroll-behavior: contain; }
.drawer-cart .drawer-header { position: sticky; top: 0; z-index: 3; background: var(--ios-bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.drawer-cart .drawer-body { flex: 0 0 auto; overflow: visible; }
.drawer-cart .drawer-footer { max-height: none; overflow: visible; padding-bottom: 0; }
.drawer-cart .drawer-actions {
    position: sticky; bottom: 0; z-index: 3; margin: 10px -16px 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--ios-bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--ios-sep);
}
.drawer-clear { flex: none; width: 50px; padding: 0 !important; font-size: 18px; }
.drawer-place { white-space: nowrap; }
@media (max-width: 767.98px) { .drawer-place { font-size: 16px; } }
.vp-footer { flex-wrap: wrap; }
.vp-priceline { flex: 1 0 100%; margin-top: 0; }
.vp-add { white-space: nowrap; }
.ios-shop .b2bAi-msg.tip { background: var(--ios-fill) !important; color: var(--ios-label-2) !important; border: 0 !important; }
.ios-shop .b2bAi-msg.bot { border: 0 !important; }
.ios-shop .b2bAi-head .avatar { background: var(--tint); color: #fff; }
.ios-shop .b2bAi-close {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--ios-fill); color: var(--ios-label-2); opacity: 1; font-size: 14px; flex: none;
}
.shop-suggest { margin-top: 18px; }
.shop-suggest-h { margin: 0 4px 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ios-label-2); }

/* A retail shop's guest checkout (inventory/_online_checkout.html, shared
   with the restaurant menus) in this page's palette, light and dark. */
.checkout-online, .oc-done {
    --ink: var(--ios-label);
    --ink-soft: var(--ios-label-2);
    --line: var(--ios-sep);
    --brand: var(--tint);
    --on-brand: #ffffff;
    --bg-elevated: var(--ios-fill);
    --nav-bg: var(--ios-elev);
    --good: var(--ios-green);
    --bad: var(--ios-red);
}
.checkout-online { padding: 4px 0 0; }

/* ════════════════ POLISH 09/10 (shop review) ════════════════ */
/* long product names break inside the line instead of spilling out */
.card-name, .cart-line-name, .detail-name, .b2b-cat-card-name, .order-item-name, .b2b-reorder-name { overflow-wrap: anywhere; }
/* a long search term doesn't widen the page */
.filter-chip { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
/* one icon per toast (the ::before one) */
.toast > .bi { display: none; }
/* smart restock: «Add all» stays at the bottom of the sheet */
#b2bReorderDrawer .reorder-footer { position: sticky; bottom: 0; margin-top: auto; }
/* bigger hit areas, same look: favourite, cart-line remove, sheet ✕ */
.card-fav::after, .cart-line-remove::after { content: ""; position: absolute; inset: -7px; }
.drawer-header .appbar-icon-btn::after { content: ""; position: absolute; inset: -5px; }
.cart-line-remove, .drawer-header .appbar-icon-btn { position: relative; }
/* AI chat and the day picker in the page's palette (they stayed white in dark mode) */
.ios-shop #b2bAiMessages, .ios-shop .b2bAi-quick, .ios-shop .b2bAi-input-row { background: var(--ios-bg) !important; }
.ios-shop .b2bAi-typing { background: var(--ios-cell) !important; color: var(--ios-label-2) !important; border-color: var(--ios-sep) !important; }
.ios-shop .b2bAi-msg.bot { border-color: var(--ios-sep) !important; }
.ios-shop .b2bAi-quick button { background: var(--ios-fill) !important; color: var(--ios-label) !important; }
.ios-shop #b2bAiInput { font-size: 16px !important; }
.ios-shop .b2bAi-input-row { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important; }
.ios-shop .sched-pick-row select { background: var(--ios-cell); color: var(--ios-label); border-color: var(--ios-sep); }
.ios-shop .sched-pick small { color: var(--ios-label-2); }
/* sign-in: the person icon on narrow phones, so the shop's name keeps room */
.appbar-signin i { display: none; }
@media (max-width: 400px) {
    .appbar-signin { padding-left: 12px; padding-right: 12px; }
    .appbar-signin span { display: none; }
    .appbar-signin i { display: inline; font-size: 18px; }
}
@media (max-width: 600px) {
    .ios-shop #b2bAiPanel { max-height: 80vh; max-height: 80dvh; border-radius: 16px 16px 0 0 !important; }
}
@media (max-width: 767.98px) {
    /* the AI button sits above the cart bar: keep the last row clear of it */
    body.ios-shop:has(#b2bAiBtn) { padding-bottom: calc(148px + env(safe-area-inset-bottom, 0px)); }
}
/* the order button shrinks (and wraps on the narrowest phones) instead of running off the sheet */
.drawer-actions .drawer-place { min-width: 0; white-space: normal; line-height: 1.15; padding-left: 12px; padding-right: 12px; }
@media (max-width: 360px) {
    .drawer-place { white-space: normal; line-height: 1.15; font-size: 15px; }
}
/* who sells + legal links (distance-selling law) and the checkout's consent line */
.shop-legal { display: grid; gap: 10px; margin: 8px auto 18px; max-width: 1100px; padding: 16px; border-radius: var(--r); background: var(--ios-cell); color: var(--ios-label-2); font-size: 13.5px; line-height: 1.45; }
.shop-legal-biz { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.shop-legal-biz strong { color: var(--ios-label); font-size: 15px; }
.shop-legal a { color: var(--tint); text-decoration: none; }
.shop-legal-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.shop-legal-links a { min-height: 32px; display: inline-flex; align-items: center; }
.checkout-legal { margin: 8px 2px 0; color: var(--ios-label-2); font-size: 12.5px; line-height: 1.4; text-align: center; }
.checkout-legal a { color: var(--tint); }
/* delivery cost and the free-delivery amount, above the catalogue */
.ship-note { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r); background: var(--tint-soft); color: var(--ios-label); font-size: 14px; }
.ship-note i { color: var(--tint); font-size: 17px; }
/* product sheet: back-in-stock email and «you may also like» */
.notify-row { display: flex; gap: 8px; }
.notify-row input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--ios-fill); color: var(--ios-label); font-size: 16px; }
.notify-row .btn-primary-b2b { min-height: 44px; padding: 0 16px; border-radius: 12px; white-space: nowrap; }
.notify-msg { display: block; min-height: 1em; margin-top: 6px; color: var(--ios-label-2); }
.rel-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.rel-strip::-webkit-scrollbar { display: none; }
.rel-card { flex: 0 0 132px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 0; border-radius: var(--r); background: var(--ios-cell); color: var(--ios-label); text-align: left; cursor: pointer; }
.rel-card img, .rel-noimg { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: var(--ios-img-bg); filter: var(--ios-img-filter); }
.rel-noimg { display: grid; place-items: center; color: #c7c7cc; font-size: 28px; }
.rel-name { font-size: 13px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rel-card b { font-size: 14px; }

