/* ============================================================
   KABEX — Mobile (≤900px)
   Bottom bar | Drawer | Search overlay | Header compactness
   B2B na budowie: 48px+ touch targets, high contrast, jeden tap
   ============================================================ */

/* ╔══════════════════════════════════════════════════════════════╗
   ║ HEADER COMPACTNESS @ ≤900px                                  ║
   ║ Topbar hidden, nav hidden (zastępują je: drawer + bottombar) ║
   ╚══════════════════════════════════════════════════════════════╝ */
@media (max-width: 900px) {
    .header__topbar { display: none !important; }
    .header__nav    { display: none !important; }

    .header__main { padding: 6px 0; min-height: 56px; }
    .header__main-inner {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr !important;
        align-items: center !important;
        gap: var(--sp-2) !important;
        min-height: 56px;
    }

    /* Ukryj na mobile: pełny search bar (zastąpiony lupką) + phone (zastąpiony bottom-bar) */
    .header__search,
    .header__phone { display: none !important; }

    /* Hamburger po lewej */
    .header__toggle {
        order: 0;
        justify-self: start;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        width: 40px; height: 40px;
        gap: 5px !important;
    }
    .header__toggle-bar { width: 22px !important; height: 2px !important; }

    /* Logo na środku */
    .header__logo-wrap {
        order: 1;
        justify-self: center;
        text-align: center;
        line-height: 0;
    }
    .header__logo svg,
    .header__logo img { max-height: 38px; width: auto; }

    /* Left wrapper: hamburger + lupka obok siebie */
    .kbx-mhdr-left {
        order: 0;
        justify-self: start;
        display: inline-flex !important;
        align-items: center;
        gap: 2px;
    }
    .kbx-mhdr-search {
        background: none;
        border: 0;
        width: 40px; height: 40px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        color: var(--color-primary);
        cursor: pointer;
        padding: 0;
        -webkit-tap-highlight-color: transparent;
    }
    .kbx-mhdr-search:active { background: var(--color-primary-tint); }
    .kbx-mhdr-search svg { width: 22px; height: 22px; display: block; }

    /* Cart na mobile: po prawej, kwota + żółta ikona */
    .header__cart {
        order: 2;
        justify-self: end;
        display: inline-flex !important;
        align-items: center;
        gap: 6px !important;
        padding: 4px 8px !important;
        color: var(--color-primary);
        text-decoration: none;
    }
    .header__cart-info {
        display: inline-flex !important;
        flex-direction: column;
        align-items: flex-end;
        gap: 0 !important;
        line-height: 1.1 !important;
    }
    .header__cart-label { display: none !important; }
    .header__cart-total {
        font-family: var(--font-display);
        font-size: 0.95rem !important;
        font-weight: 800 !important;
        color: var(--color-primary) !important;
        white-space: nowrap;
    }
    .header__cart-bag {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 32px; height: 32px;
        background: var(--color-accent);
        color: var(--color-dark);
        padding: 0 !important;
    }
    .header__cart-bag svg { width: 20px; height: 20px; }
}

/* Desktop ≥901px: ukryj lupkę mobile, wrapper transparentny (hamburger bubble-up). */
@media (min-width: 901px) {
    .kbx-mhdr-search { display: none !important; }
    .kbx-mhdr-left { display: contents !important; }
}

/* ╔══════════════════════════════════════════════════════════════╗
   ║ BOTTOM BAR — sticky, zawsze widoczny ≤900px                  ║
   ╚══════════════════════════════════════════════════════════════╝ */
.kbx-mbar {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9000;
    background: #fff;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 900px) {
    .kbx-mbar {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0;
    }
    /* Spacer dla content nad bottom-barem — body padding-bottom */
    body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    .kbx-pdp__buy,
    .kbx-pdp__gallery-sticky {
        top: var(--kbx-sticky-top, 100px) !important;
    }
}

/* Wąskie telefony (≤480px) — 3 kafelki: Zadzwoń + Produkty (FAB) + Szukaj.
   Koszyk znika z bottom-bara, dalej dostępny przez header u góry strony. */
@media (max-width: 480px) {
    .kbx-mbar {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .kbx-mbar__btn--cart {
        display: none !important;
    }
    .kbx-mbar__btn {
        padding: 8px 2px;
        min-height: 60px;
    }
    .kbx-mbar__btn .material-symbols-outlined {
        font-size: 24px;
    }
    .kbx-mbar__label {
        font-size: 0.65rem;
    }
}

/* Bardzo wąskie ekrany (≤360px) — jeszcze ciaśniej */
@media (max-width: 360px) {
    .kbx-mbar__fab {
        width: 54px;
        height: 54px;
        margin-top: -12px;
    }
    .kbx-mbar__fab .material-symbols-outlined {
        font-size: 26px;
    }
}

.kbx-mbar__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    min-height: 64px;
    background: none;
    border: 0;
    border-right: 1px solid var(--color-border-light);
    color: var(--color-text);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: var(--font-sans);
    -webkit-tap-highlight-color: transparent;
}
.kbx-mbar__btn:last-child { border-right: 0; }

.kbx-mbar__btn:active {
    background: var(--color-primary-tint);
    color: var(--color-primary);
}
.kbx-mbar__btn .material-symbols-outlined {
    font-size: 26px;
    line-height: 1;
}
.kbx-mbar__label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--color-text-muted);
}

.kbx-mbar__btn--call .material-symbols-outlined {
    color: var(--color-success);
}
.kbx-mbar__btn--cart .material-symbols-outlined {
    color: var(--color-primary);
}

/* ── Wyróżniony przycisk PRODUKTY (FAB-style) ──
   Środkowy żółty przycisk wystaje 16px nad pasek. Wyraźny CTA dla głównej
   funkcji: szybkiego dostępu do katalogu produktów na mobile. */
.kbx-mbar__btn--produkty {
    position: relative;
    overflow: visible;
    padding-top: 0;
    background: transparent !important;
}
.kbx-mbar__btn--produkty .material-symbols-outlined {
    display: none; /* ukrywamy domyślną ikonę — używamy .kbx-mbar__fab */
}
.kbx-mbar__fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-top: -16px;
    margin-bottom: 2px;
    background: var(--color-accent, #FDE047);
    color: var(--color-dark, #0F2D5C);
    border: 3px solid #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18), 0 2px 4px rgba(253, 224, 71, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.kbx-mbar__fab .material-symbols-outlined {
    display: inline-block !important;
    font-size: 30px;
    line-height: 1;
    color: var(--color-dark, #0F2D5C);
}
.kbx-mbar__btn--produkty:active .kbx-mbar__fab {
    transform: scale(0.94);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.2);
    background: #E5B800;
}
.kbx-mbar__btn--produkty .kbx-mbar__label {
    color: var(--color-dark, #0F2D5C);
    font-weight: 800;
    margin-top: 0;
}
/* Aktywny stan gdy drawer otwarty */
.kbx-mbar__btn--produkty[aria-expanded="true"] .kbx-mbar__fab {
    background: var(--color-primary, #1E5BA8);
    color: #fff;
}
.kbx-mbar__btn--produkty[aria-expanded="true"] .kbx-mbar__fab .material-symbols-outlined {
    color: #fff;
}

/* Cart badge */
.kbx-mbar__icon-wrap {
    position: relative;
    display: inline-block;
}
.kbx-mbar__badge {
    position: absolute;
    top: -4px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--color-action, #E63946);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
}
.kbx-mbar__badge.is-empty { display: none; }

/* ╔══════════════════════════════════════════════════════════════╗
   ║ DRAWER — slide z lewej                                        ║
   ╚══════════════════════════════════════════════════════════════╝ */
.kbx-drawer {
    position: fixed;
    inset: 0;
    z-index: 9500;
    pointer-events: none;
    visibility: hidden;
}
.kbx-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}
.kbx-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 30, 50, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.kbx-drawer.is-open .kbx-drawer__overlay { opacity: 1; }

.kbx-drawer__panel {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: min(86vw, 380px);
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
}
.kbx-drawer.is-open .kbx-drawer__panel { transform: translateX(0); }

.kbx-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-4);
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-primary);
    min-height: 48px;
}
.kbx-drawer__head-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.kbx-drawer__close {
    background: none;
    border: 0;
    color: #fff;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}
.kbx-drawer__close:active { background: rgba(255,255,255,0.2); }
.kbx-drawer__close .material-symbols-outlined { font-size: 22px; }

/* ── Duży Produkty button ─────────────────────────────────────── */
.kbx-drawer__products-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: var(--sp-3) var(--sp-4);
    background: var(--color-accent);
    color: var(--color-dark);
    border: 0;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--color-accent-dark);
    transition: background 0.15s;
}
.kbx-drawer__products-btn:active { background: var(--color-accent-dark); }
.kbx-drawer__products-icon {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
    width: 18px;
}
.kbx-drawer__products-icon span {
    display: block;
    height: 2px;
    background: var(--color-dark);
}
.kbx-drawer__products-label { flex: 1; text-align: left; }
.kbx-drawer__products-chev {
    font-size: 22px;
    transition: transform 0.2s;
}
.kbx-drawer__products-btn[aria-expanded="true"] .kbx-drawer__products-chev { transform: rotate(180deg); }
.kbx-drawer__cats-wrap {
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border-light);
}
.kbx-drawer__cats-wrap[hidden] { display: none; }
.kbx-drawer__cats {
    list-style: none; padding: 0; margin: 0;
}
.kbx-drawer__cat-link--all {
    background: var(--color-primary);
    color: #fff !important;
    text-transform: uppercase;
    font-size: 0.85rem !important;
    letter-spacing: 0.05em;
    padding: 12px 16px !important;
}
.kbx-drawer__cat-link--all .material-symbols-outlined { font-size: 16px; }
.kbx-drawer__cat-count {
    background: var(--color-border);
    color: var(--color-text-muted);
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
}

/* ── Główne menu ───────────────────────────────────────────────── */
.kbx-drawer__menu {
    border-bottom: 1px solid var(--color-border-light);
}
.kbx-drawer__menu-list {
    list-style: none; padding: 0; margin: 0;
}
.kbx-drawer__menu-list li {
    border-bottom: 1px solid var(--color-border-light);
}
.kbx-drawer__menu-list li:last-child { border-bottom: 0; }
.kbx-drawer__menu-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px var(--sp-4);
    color: var(--color-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}
.kbx-drawer__menu-list a:active { background: var(--color-primary-tint); color: var(--color-primary); }

/* Promocje — czerwone, z ikoną ognia po lewej (auto przez slug w menu lub klasę) */
.kbx-drawer__menu-list a.is-sale,
.kbx-drawer__menu-list li[class*="promocje"] > a,
.kbx-drawer__menu-list li[class*="promotion"] > a {
    color: var(--color-action) !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.kbx-drawer__menu-list a.is-sale::before,
.kbx-drawer__menu-list li[class*="promocje"] > a::before,
.kbx-drawer__menu-list li[class*="promotion"] > a::before {
    content: 'local_fire_department';
    font-family: 'Material Symbols Outlined';
    font-size: 20px;
    color: var(--color-action);
    flex-shrink: 0;
}

.kbx-drawer__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Sections */
.kbx-drawer__section {
    padding: var(--sp-5);
    border-bottom: 1px solid var(--color-border-light);
}
.kbx-drawer__h3 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 var(--sp-3);
}

/* Cats list */
.kbx-drawer__cats {
    list-style: none;
    padding: 0;
    margin: 0;
}
.kbx-drawer__cat {
    border-bottom: 1px solid var(--color-border-light);
    position: relative;
}
.kbx-drawer__cat:last-child { border-bottom: 0; }
.kbx-drawer__cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) 0;
    padding-right: 44px;
    color: var(--color-dark);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}
.kbx-drawer__cat-count {
    color: var(--color-text-light);
    font-size: 0.8rem;
    font-weight: 400;
}
.kbx-drawer__cat-toggle {
    position: absolute;
    top: 6px;
    right: 0;
    width: 36px;
    height: 36px;
    background: none;
    border: 0;
    color: var(--color-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.kbx-drawer__cat-toggle[aria-expanded="true"] { transform: rotate(180deg); }
.kbx-drawer__subs {
    list-style: none;
    padding: 0 0 var(--sp-3) var(--sp-4);
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.kbx-drawer__cat.is-open .kbx-drawer__subs {
    max-height: 600px;
}
.kbx-drawer__subs li a {
    display: block;
    padding: 8px 0;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}
.kbx-drawer__subs li a:active { color: var(--color-primary); }

/* Branches — 2x2 grid (kompaktowe) */
.kbx-drawer__branches {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--color-border-light);
}
.kbx-drawer__branches li { background: #fff; }
.kbx-drawer__branch {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--sp-3);
    color: var(--color-dark);
    text-decoration: none;
    height: 100%;
}
.kbx-drawer__branch:active { background: var(--color-primary-tint); }
.kbx-drawer__branch-name {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}
.kbx-drawer__hq {
    font-size: 12px !important;
    color: var(--color-accent-dark) !important;
}
.kbx-drawer__branch-phone {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-primary);
}
.kbx-drawer__branch-phone .material-symbols-outlined {
    font-size: 14px;
    color: var(--color-success);
}

/* Socials */
.kbx-drawer__section--socials .kbx-drawer__socials {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
}
.kbx-drawer__socials__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    background: var(--color-bg-alt);
    color: var(--color-primary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.kbx-drawer__socials__link svg { width: 20px; height: 20px; }
.kbx-drawer__socials__link:active {
    background: var(--color-primary);
    color: #fff;
}

/* Account */
.kbx-drawer__section--account {
    background: var(--color-bg-alt);
    border-bottom: 0;
}
.kbx-drawer__account {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: var(--sp-3);
    background: var(--color-dark);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}
.kbx-drawer__account:active { background: var(--color-text); }

/* ╔══════════════════════════════════════════════════════════════╗
   ║ SEARCH OVERLAY — full screen z góry                           ║
   ╚══════════════════════════════════════════════════════════════╝ */
.kbx-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 9600;
    background: #fff;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    visibility: hidden;
    display: flex;
    flex-direction: column;
}
.kbx-search-overlay.is-open {
    transform: translateY(0);
    visibility: visible;
}

.kbx-search-overlay__head {
    background: var(--color-primary);
    padding: var(--sp-3) var(--sp-4);
    padding-top: calc(var(--sp-3) + env(safe-area-inset-top));
}
.kbx-search-overlay__form {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    background: #fff;
    padding: var(--sp-2);
}
.kbx-search-overlay__icon { color: var(--color-text-muted); font-size: 24px; padding-left: 8px; }
.kbx-search-overlay__input {
    flex: 1;
    border: 0;
    outline: none;
    padding: 12px 8px;
    font-size: 16px;
    font-family: var(--font-sans);
    background: transparent;
    color: var(--color-dark);
}
.kbx-search-overlay__close {
    width: 40px; height: 40px;
    background: none;
    border: 0;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.kbx-search-overlay__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-5);
}
.kbx-search-overlay__hints {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-2);
}
.kbx-search-overlay__hint-label {
    width: 100%;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: var(--sp-2);
}
.kbx-search-overlay__hint {
    display: inline-flex;
    padding: 8px 14px;
    background: var(--color-primary-tint);
    color: var(--color-primary);
    border: 1px solid var(--color-primary-tint);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}
.kbx-search-overlay__hint:active {
    background: var(--color-primary);
    color: #fff;
}

/* ── Search overlay states (hints/loading/results/empty) ──────── */
.kbx-search-overlay__state[hidden] { display: none; }
.kbx-search-overlay__state--loading,
.kbx-search-overlay__state--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--sp-10) var(--sp-4);
    color: var(--color-text-muted);
    gap: var(--sp-3);
}
.kbx-search-overlay__state--loading { color: var(--color-primary); }
.kbx-search-overlay__state--empty .material-symbols-outlined { font-size: 56px; color: var(--color-text-light); }
.kbx-search-overlay__state--empty p { margin: 0; font-size: 1rem; color: var(--color-dark); }
.kbx-search-overlay__state--empty small { display: block; font-size: 0.85rem; }

.kbx-search-overlay__spinner {
    font-size: 32px !important;
    animation: kbxSpin 1s linear infinite;
}
@keyframes kbxSpin { to { transform: rotate(360deg); } }

/* Categories pills */
.kbx-search-overlay__cats {
    margin-bottom: var(--sp-4);
}
.kbx-search-overlay__cats:empty { display: none; }
.kbx-search-overlay__cats-label {
    display: block;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--sp-2);
}
.kbx-search-overlay__cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border-light);
    color: var(--color-text);
    font-size: 0.85rem;
    text-decoration: none;
    margin: 0 4px 4px 0;
}
.kbx-search-overlay__cat-pill span { color: var(--color-text-light); font-size: 0.75rem; }
.kbx-search-overlay__cat-pill:active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.kbx-search-overlay__cat-pill:active span { color: rgba(255,255,255,0.7); }

/* Product items */
.kbx-search-overlay__products {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}
.kbx-search-overlay__product {
    border-bottom: 1px solid var(--color-border-light);
}
.kbx-search-overlay__product:last-child { border-bottom: 0; }
.kbx-search-overlay__product-link {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) 0;
    color: var(--color-dark);
    text-decoration: none;
}
.kbx-search-overlay__product-link:active { background: var(--color-primary-tint); }
.kbx-search-overlay__product-link img,
.kbx-search-overlay__product-link .material-symbols-outlined {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    background: var(--color-bg-alt);
    padding: 4px;
}
.kbx-search-overlay__product-link .material-symbols-outlined {
    font-size: 24px;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.kbx-search-overlay__product-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.kbx-search-overlay__product-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dark);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.kbx-search-overlay__product-sku {
    font-size: 0.7rem;
    color: var(--color-text-light);
    text-transform: uppercase;
}
.kbx-search-overlay__product-price {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-primary);
}
.kbx-search-overlay__product-price .woocommerce-Price-amount,
.kbx-search-overlay__product-price bdi { color: inherit; }

/* "Zobacz wszystkie" link */
.kbx-search-overlay__all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: var(--sp-4);
    padding: var(--sp-3);
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 0.9rem;
}
.kbx-search-overlay__all:active { background: var(--color-primary-dark); }

/* ═══════════════════════════════════════════════════════════════════
   MOBILE DRAWER v2 — search + pikowane karty + drill-down
   (Mobilny odpowiednik mega-menu z desktopu)
   ═══════════════════════════════════════════════════════════════════ */

/* Header drawer — search + close (sticky na górze) */
.kbx-drawer--mobile .kbx-drawer__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--color-primary, #1E5BA8);
    border-bottom: 3px solid var(--color-accent, #FDE047);
    position: sticky;
    top: 0;
    z-index: 10;
}
.kbx-drawer__search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: #fff;
    min-width: 0;
}
.kbx-drawer__search-icon {
    color: var(--color-primary, #1E5BA8);
    font-size: 22px !important;
    flex-shrink: 0;
}
.kbx-drawer__search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 12px 0;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    color: var(--color-dark, #0F2D5C);
}
.kbx-drawer__search-input::placeholder { color: var(--color-text-muted, #6C7689); }

.kbx-drawer--mobile .kbx-drawer__close {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 0;
    cursor: pointer;
}
.kbx-drawer--mobile .kbx-drawer__close:active { background: rgba(255, 255, 255, 0.25); }
.kbx-drawer--mobile .kbx-drawer__close .material-symbols-outlined { font-size: 24px; }

/* Body — scrollable */
.kbx-drawer--mobile .kbx-drawer__body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: var(--color-bg-alt, #F4F6F9);
    padding: 0 0 32px;
}

/* Widoki (root, drill) — slide transition */
.kbx-drawer__view {
    padding: 12px;
    animation: kbxDrawerSlideIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.kbx-drawer__view[hidden] { display: none; }
@keyframes kbxDrawerSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
.kbx-drawer__view.is-back {
    animation: kbxDrawerSlideBack 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes kbxDrawerSlideBack {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Wszystkie produkty — wielki CTA na górze */
.kbx-drawer__shop-all {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--color-accent, #FDE047);
    color: var(--color-dark, #0F2D5C);
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.9rem;
    margin-bottom: 16px;
    border: 0;
    box-shadow: 0 4px 12px rgba(253, 224, 71, 0.3);
}
.kbx-drawer__shop-all:active { background: #E5B800; }
.kbx-drawer__shop-all .material-symbols-outlined:first-child { font-size: 28px; }
.kbx-drawer__shop-all .material-symbols-outlined:last-child { font-size: 20px; margin-left: auto; }
.kbx-drawer__shop-all-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.kbx-drawer__shop-all-text strong { font-size: 1rem; line-height: 1.1; }
.kbx-drawer__shop-all-text span:not(.material-symbols-outlined) {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.75;
    text-transform: none;
    letter-spacing: 0;
}

/* Nagłówek sekcji */
.kbx-drawer__section-title {
    margin: 18px 4px 10px;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted, #6C7689);
    padding-left: 4px;
    border-left: 3px solid var(--color-accent, #FDE047);
}

/* Tiles (pikowane karty kategorii) */
.kbx-drawer__tiles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.kbx-drawer__tile {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    color: var(--color-dark, #0F2D5C);
    border: 1px solid var(--color-border-light, #E5E7EB);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    position: relative;
    overflow: hidden;
}
.kbx-drawer__tile::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-accent, #FDE047);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.2s ease;
}
.kbx-drawer__tile:active {
    background: var(--color-bg-alt, #F4F6F9);
    border-color: var(--color-primary, #1E5BA8);
}
.kbx-drawer__tile:active::before { transform: scaleY(1); }

.kbx-drawer__tile-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-alt, #F4F6F9);
    color: var(--color-primary, #1E5BA8);
    transition: background 0.15s ease, color 0.15s ease;
}
.kbx-drawer__tile:active .kbx-drawer__tile-icon {
    background: var(--color-accent, #FDE047);
    color: var(--color-dark, #0F2D5C);
}
.kbx-drawer__tile-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.kbx-drawer__tile-name {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.15;
    color: var(--color-dark, #0F2D5C);
    word-break: break-word;
}
.kbx-drawer__tile-meta {
    display: flex;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-muted, #6C7689);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-wrap: wrap;
}
.kbx-drawer__tile-chev {
    flex-shrink: 0;
    color: var(--color-primary, #1E5BA8);
    font-size: 22px !important;
}

/* Link "Wszystkie kategorie" */
.kbx-drawer__all-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding: 12px 14px;
    background: var(--color-primary, #1E5BA8);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
}
.kbx-drawer__all-link:active { background: var(--color-primary-dark, #144378); }
.kbx-drawer__all-link .material-symbols-outlined { font-size: 20px; }

/* Drill view — back button */
.kbx-drawer__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px 10px 8px;
    background: transparent;
    border: 0;
    color: var(--color-primary, #1E5BA8);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
    cursor: pointer;
    margin-bottom: 8px;
}
.kbx-drawer__back:active { color: var(--color-primary-dark, #144378); }
.kbx-drawer__back .material-symbols-outlined { font-size: 22px; }

.kbx-drawer__drill-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 4px 12px;
    border-bottom: 2px solid var(--color-accent, #FDE047);
    margin-bottom: 12px;
}
.kbx-drawer__drill-title {
    margin: 0;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--color-dark, #0F2D5C);
    line-height: 1.1;
}
.kbx-drawer__drill-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--color-accent, #FDE047);
    color: var(--color-dark, #0F2D5C);
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
}
.kbx-drawer__drill-all:active { background: #E5B800; }
.kbx-drawer__drill-all .material-symbols-outlined { font-size: 20px; }

.kbx-drawer__drill-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--color-text-muted, #6C7689);
}
.kbx-drawer__drill-empty .material-symbols-outlined {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 8px;
}
.kbx-drawer__drill-empty p { margin: 0; font-size: 0.92rem; line-height: 1.4; }

/* Hide drawer/search-overlay/mbar na desktop */
/* WAŻNE: #kbx-drawer-filters wykluczony — to drawer filtrów produktów,
   działa na wszystkich rozdzielczościach (off-canvas z prawej, archive-product.css). */
@media (min-width: 901px) {
    .kbx-drawer:not(#kbx-drawer-filters),
    .kbx-search-overlay,
    .kbx-mbar { display: none !important; }
}

/* Body lock gdy drawer/search otwarty */
body.kbx-no-scroll {
    overflow: hidden;
    touch-action: none;
}
