/**
 * Header, menu, pasek zaufania, okruszki kategorii (przebudowa UX, etap 4, makiety M9/M10/M11/M6).
 * Szablon: template-parts/site-header.php, logika: helpers/header.php, JS: assets/js/header-v2.js.
 * Jeden HTML dla telefonu i desktopu (cache WP Rocket) - różnice tylko tutaj. Telefon: do 767 px.
 */

.sbh,
.sbp-trust,
.sbh-crumbs {
    --sbh-accent: var(--main-accent, #4804a4);
    --sbh-accent-dark: #36037c;
    --sbh-cream: var(--tlo-background, #fff7f3);
    --sbh-search-bg: #fdf1ec;
    --sbh-text: var(--text, #22262a);
    --sbh-muted: #6f6a76;
    --sbh-line: #ebe7f0;
    --sbh-red: var(--accent-red, #f65853);
    --sbh-font: var(--font-secondary-regular-family), sans-serif;
    --sbh-font-bold: var(--font-secondary-bold-family), sans-serif;
    --sbh-wrap: 1312px;
    --sbh-top-h: 36px;
    --sbh-main-h: 80px;
}

.sbh *,
.sbh *::before,
.sbh *::after {
    box-sizing: border-box;
}

/* Reguły motywu dla "header" (style.css: flex, gap) nie dotyczą nowego headera */
header.sbh {
    display: block;
    gap: 0;
    position: sticky;
    top: calc(-1 * (var(--sbh-top-h) + var(--sbh-main-h) + 1px)); /* desktop: przy przewijaniu zostaje rząd menu */
    z-index: 900;
    background: #fff;
    font-family: var(--sbh-font);
    color: var(--sbh-text);
}

.admin-bar header.sbh {
    top: calc(32px - (var(--sbh-top-h) + var(--sbh-main-h) + 1px));
}

.sbh a {
    color: inherit;
    text-decoration: none;
}

/* Motyw ustawia font na a/span/li bez zapasowego (Satoshi nie ma cyrylicy - RU wpadał w szeryfowy) */
.sbh :is(a, span, li, p, button, input),
.sbp-trust :is(li, span),
.sbh-crumbs :is(a, span) {
    font-family: inherit;
    letter-spacing: normal;
}

.sbh button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.sbh-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.sbh-icon {
    width: 24px;
    height: 24px;
    flex: none;
    display: block;
}

/* ======================== [ GÓRNY PASEK ] ======================== */

.sbh-top {
    background: var(--sbh-accent);
    color: #fff;
}

.sbh-top-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px 10px;
    min-height: var(--sbh-top-h);
    max-width: var(--sbh-wrap);
    margin: 0 auto;
    padding: 6px 16px;
    font-size: 14px;
    line-height: 1.3;
    text-align: center;
    color: #fff;
}

.sbh-top-inner span {
    font-size: inherit;
    color: inherit;
}

.sbh-top-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sbh-tip {
    position: relative;
    display: inline-flex;
}

.sbh-tip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border: 1.5px solid rgba(255, 255, 255, 0.85) !important;
    border-radius: 50%;
    font-family: Georgia, serif !important;
    font-size: 11px !important;
    font-weight: 700;
    font-style: italic;
    line-height: 1;
    color: #fff !important;
}

.sbh-tip-btn:hover,
.sbh-tip-btn:focus-visible {
    background: rgba(255, 255, 255, 0.18) !important;
}

.sbh-tip-box {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    z-index: 1000;
    width: 300px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(24, 6, 48, 0.18);
    color: var(--sbh-text) !important;
    font-size: 13px !important;
    line-height: 1.45;
    text-align: left;
    white-space: normal;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    pointer-events: none;
}

.sbh-tip-box::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: translateX(-50%) rotate(45deg);
}

.sbh-tip.is-open .sbh-tip-box {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (hover: hover) {
    .sbh-tip:hover .sbh-tip-box {
        opacity: 1;
        visibility: visible;
    }
}

/* ======================== [ WIERSZ GŁÓWNY ] ======================== */

.sbh-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo search actions";
    align-items: center;
    gap: 40px;
    height: var(--sbh-main-h);
    max-width: var(--sbh-wrap);
    margin: 0 auto;
    padding: 0 16px;
}

.sbh-logo {
    grid-area: logo;
    display: flex;
    align-items: center;
}

.sbh-logo img {
    display: block;
    width: auto;
    height: 38px;
    max-width: none;
}

.sbh-search {
    grid-area: search;
    min-width: 0;
}

.sbh-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 24px;
}

.sbh-action {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 16px !important;
    line-height: 1;
    white-space: nowrap;
    color: var(--sbh-text);
    transition: color 0.15s;
}

.sbh-action span {
    font-size: inherit !important;
    color: inherit;
}

.sbh-action:hover,
.sbh-action:focus-visible {
    color: var(--sbh-accent);
}

.sbh-action .sbh-icon,
.sbh-burger {
    display: none;
}

.sbh-cart-link .sbh-action-label {
    margin-right: 5px;
}

/* Serce = link do strony ulubionych (helpers/ux/95-ulubione-porownaj.php), bez licznika i bez podpisu.
   Desktop: jedyna ikona w rzędzie tekstowych akcji, większe pole kliknięcia bez wpływu na układ. Telefon: jak konto/koszyk. */
@media (min-width: 768px) {
    .sbh-action.sbh-wishlist {
        margin: -8px;
        padding: 8px;
    }

    .sbh-action.sbh-wishlist .sbh-icon {
        display: block;
    }
}

/* Licznik zmienia się po AJAX-ie - bez skoku szerokości. Nawiasy "Koszyk (N)" tylko na desktopie (CSS, tekst licznika ustawia JS) */
.sbh-count {
    font-variant-numeric: tabular-nums;
}

.sbh-count::before {
    content: "(";
}

.sbh-count::after {
    content: ")";
}

/* Przełącznik PL / RU */
.sbh-lang {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--sbh-muted);
}

.sbh-lang a,
.sbh-lang span {
    font-size: 13px !important;
    color: var(--sbh-muted);
}

.sbh-lang a {
    padding: 4px 2px;
}

.sbh-lang a:hover {
    color: var(--sbh-accent);
}

.sbh-lang a.is-active {
    color: var(--sbh-text);
    font-family: var(--sbh-font-bold);
}

/* FiboSearch: beżowe pole bez ramki, lupa z lewej */
.sbh-search .dgwt-wcas-search-wrapp {
    max-width: none !important;
    min-width: 0 !important;
    width: 100%;
    margin: 0 !important;
}

.sbh-search .dgwt-wcas-sf-wrapp {
    padding: 0 !important;
    border-radius: 10px !important;
    background: var(--sbh-search-bg) !important;
}

.sbh-search input.dgwt-wcas-search-input,
.sbh-search .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
    height: 44px !important;
    padding: 0 16px 0 46px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    background: transparent !important;
    box-shadow: none !important;
    font-family: var(--sbh-font) !important;
    font-size: 15px !important;
    color: var(--sbh-text) !important;
}

.sbh-search input.dgwt-wcas-search-input:focus {
    border-color: var(--sbh-accent) !important;
    background: #fff !important;
}

.sbh-search input.dgwt-wcas-search-input::placeholder {
    color: var(--sbh-muted) !important;
    opacity: 1;
}

.sbh-search .dgwt-wcas-style-pirx .dgwt-wcas-search-submit,
.sbh-search .dgwt-wcas-ico-magnifier-handler {
    top: 50% !important;
    left: 12px !important;
    transform: translateY(-50%);
}

.sbh-search .dgwt-wcas-ico-magnifier,
.sbh-search .dgwt-wcas-ico-magnifier-handler {
    max-width: 18px !important;
    fill: var(--sbh-text) !important;
}

/* ======================== [ MENU (DESKTOP) ] ======================== */

.sbh-nav {
    border-top: 1px solid var(--sbh-line);
    border-bottom: 1px solid var(--sbh-line);
    background: #fff;
}

.sbh-nav-panel {
    max-width: var(--sbh-wrap);
    margin: 0 auto;
    padding: 0 16px;
}

.sbh-nav-backdrop,
.sbh-nav-head,
.sbh-nav-extra {
    display: none;
}

.sbh-menu {
    display: flex;
    align-items: stretch;
    gap: 0 36px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sbh-menu li {
    height: auto; /* motyw: .menu-item { height: 100% } */
    margin: 0;
    list-style: none;
}

.sbh-menu > li {
    position: relative;
    display: flex;
    align-items: center;
}

.sbh-menu > li > a {
    display: flex;
    align-items: center;
    height: 48px;
    font-size: 16px !important;
    color: var(--sbh-text);
    white-space: nowrap;
    transition: color 0.15s;
}

.sbh-menu > li > a:hover,
.sbh-menu > li.current-menu-item > a,
.sbh-menu > li.current-menu-ancestor > a,
.sbh-menu > li.is-open > a {
    color: var(--sbh-accent);
}

.sbh-menu > li.current-menu-item > a,
.sbh-menu > li.current-menu-ancestor > a {
    box-shadow: inset 0 -2px 0 var(--sbh-accent);
}

/* Promocje na belce (klasa sbh-hot pozycji menu): kolor promocji jak w kafelkach i stopkach paneli */
.sbh-menu > li.sbh-l1--hot > a,
.sbh-menu > li.sbh-l1--hot > a:hover {
    color: var(--sbh-red);
    font-family: var(--sbh-font-bold);
}

.sbh-menu > li.sbh-l1--hot.current-menu-item > a {
    box-shadow: inset 0 -2px 0 var(--sbh-red);
}

.sbh-sub-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 32px;
    margin-left: 0;
    color: var(--sbh-muted) !important;
}

.sbh-sub-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.15s;
}

.sbh-menu > li.is-open > .sbh-sub-toggle svg {
    transform: rotate(180deg);
}

/* ---------- Panele (menu v2): pełna szerokość pod rzędem menu (mega) albo lista pod pozycją (drop) ---------- */

.sbh-nav {
    position: relative;
}

.sbh-menu > li.sbh-has-mega {
    position: static;
}

.sbh-l1-img,
.sbh-col-toggle {
    display: none;
}

/* Motyw nadaje span własny rozmiar - etykieta pozycji dziedziczy z linku */
.sbh-menu > li > a > span,
.sbh-links a > span {
    font-size: inherit !important;
    font-family: inherit;
}

.sbh-menu .sub-menu {
    display: none; /* display:none - zdjęcia lazy nie ładują się, dopóki panel jest zamknięty */
    position: absolute;
    top: 100%;
    z-index: 950;
    margin: 0;
    background: #fff;
    text-align: left;
}

.sbh-menu > li.is-open > .sub-menu,
.sbh-menu > li:focus-within > .sub-menu {
    display: block;
    animation: sbh-in 0.14s ease-out;
}

@keyframes sbh-in {
    from { opacity: 0; transform: translateY(4px); }
}

/* Bez JS: zwykłe najechanie (z JS - opóźnienie w header-v2.js, żeby panel nie wyskakiwał przy przejeździe myszą) */
@media (hover: hover) and (min-width: 768px) {
    .sbh:not(.sbh-js) .sbh-menu > li:hover > .sub-menu {
        display: block;
    }
}

.sbh-panel--drop {
    left: -16px;
    min-width: 260px;
    padding: 8px;
    border: 1px solid var(--sbh-line);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(24, 6, 48, 0.12);
}

/* Ostatnie pozycje rzędu: lista wyrównana do prawej, żeby nie wychodziła poza ekran */
.sbh-menu > li.sbh-has-drop:nth-last-child(-n+2) > .sbh-panel--drop {
    left: auto;
    right: 0;
}

/* Mega-panel (menu v3, 2026-11-03): treść | boczna kolumna Nowości, stopka. Wysokość z treści, nie z najdłuższej kolumny.
   Tło strony pod panelem przyciemnione (cień + clip-path - bez dodatkowego elementu i JS). */
.sbh-panel--mega {
    left: 0;
    right: 0;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid var(--sbh-line);
    box-shadow: 0 24px 40px rgba(24, 6, 48, 0.14), 0 0 0 100vmax rgba(24, 6, 48, 0.32);
    clip-path: inset(0 -100vmax -100vmax -100vmax);
}

.admin-bar .sbh-panel--mega {
    max-height: calc(100vh - 182px);
}

.sbh-panel-in {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px 40px;
    max-width: var(--sbh-wrap);
    margin: 0 auto;
    padding: 28px 16px 0;
}

.sbh-panel--mega.has-new .sbh-panel-in {
    grid-template-columns: minmax(0, 1fr) 340px;
}

.sbh-main-area {
    display: grid;
    gap: 28px;
    align-content: start;
    min-width: 0;
}

.sbh-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 28px 32px;
    align-content: start;
    align-items: start;
}

.sbh-menu ul.sbh-links,
.sbh-menu ul.sbh-subs,
.sbh-menu ul.sbh-tiles {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sbh-menu .sub-menu a {
    color: var(--sbh-text);
}

.sbh-menu .sub-menu a:hover,
.sbh-menu .sub-menu a:focus-visible,
.sbh-menu .sub-menu a[aria-current] {
    color: var(--sbh-accent);
}

/* Kolumna: nagłówek (zdjęcie + nazwa) i linki */
.sbh-col-row {
    display: flex;
    align-items: center;
}

.sbh .sbh-col-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    font-family: var(--sbh-font-bold);
    font-size: 15px !important;
    line-height: 1.25;
}

.sbh .sbh-col-head span {
    font-family: inherit;
    font-size: inherit !important;
}

.sbh-col-pic {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 4px;
    border-radius: 12px;
    background: var(--sbh-cream);
}

.sbh-col-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply; /* białe tło zdjęć produktów zlewa się z kremowym kafelkiem */
}

.sbh-col .sbh-links {
    margin-top: 12px !important;
    padding-top: 10px !important;
    border-top: 1px solid var(--sbh-line);
}

.sbh-links a {
    display: block;
    padding: 5px 0;
    font-size: 14px !important;
    line-height: 1.3;
    color: #3d3846 !important;
}

/* Podkategorie podkategorii: jedna zwarta linia pod rodzicem zamiast wciętej listy */
.sbh-subs {
    display: flex;
    flex-wrap: wrap;
    margin: -1px 0 5px !important;
    overflow: hidden; /* kropka na początku wiersza wystaje w lewo i jest ucięta */
}

.sbh-subs li {
    display: inline-flex;
    align-items: center;
    margin-right: 14px;
}

.sbh-subs li::before {
    content: "·";
    flex: none;
    width: 14px;
    margin-left: -14px;
    text-align: center;
    color: #b9b2c2;
    font-size: 13px;
}

.sbh-links .sbh-subs a {
    padding: 1px 0;
    font-size: 13px !important;
    color: var(--sbh-muted) !important;
}

/* Akcesoria (dużo kolumn, różna długość, bez bocznej kolumny): układ gazetowy, kolumny się wyrównują */
.sbh-lay-deep:not(.has-new) .sbh-cols {
    display: block;
    columns: 5 200px;
    column-gap: 36px;
}

.sbh-lay-deep:not(.has-new) .sbh-col {
    break-inside: avoid;
    margin-bottom: 24px;
}

/* Zestawy, Węgle (same kategorie): kafle ze zdjęciem */
.sbh-lay-flat .sbh-cols {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.sbh-col--tile .sbh-col-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    height: 100%;
    text-align: center;
}

.sbh-col--tile .sbh-col-pic {
    width: 100%;
    height: 132px;
    padding: 14px;
    border-radius: 14px;
    transition: background 0.15s;
}

.sbh-col--tile .sbh-col-head:hover .sbh-col-pic {
    background: #f9e9e1;
}

/* Karta promo (strona bez podpozycji, np. Konfigurator shishy) - styl karty Konfiguratora z M9.
   Desktop (2026-11-20, bez bloku Marki): pasek na szerokość kolumn - tekst | przycisk, dosunięty do dołu
   obszaru treści, żeby kończył się równo z kolumną Nowości (bez pustego pola obok karty). */
.sbh-main-area:has(> .sbh-extras) {
    grid-template-rows: auto 1fr;
    align-content: stretch;
}

.sbh-extras {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px 32px;
    align-content: end;
}

.sbh-promo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 24px;
    padding: 18px 22px;
    border-radius: 18px;
    background: var(--sbh-accent);
    color: #fff !important;
    transition: background 0.15s;
}

.sbh-promo:hover {
    background: var(--sbh-accent-dark);
}

.sbh .sbh-promo span {
    color: #fff;
    font-family: var(--sbh-font);
}

.sbh .sbh-promo-title {
    font-family: var(--sbh-font-bold) !important;
    font-size: 18px !important;
}

.sbh .sbh-promo-title,
.sbh-promo-text {
    grid-column: 1;
}

.sbh-promo-text {
    font-size: 14px !important;
    line-height: 1.4;
    opacity: 0.85;
}

.sbh .sbh-promo-cta {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-self: end;
    white-space: nowrap;
    padding: 8px 16px;
    border-radius: 999px;
    background: #fff;
    color: var(--sbh-accent) !important;
    font-family: var(--sbh-font-bold) !important;
    font-size: 14px !important;
}

/* Drop (strony): prosta lista */
.sbh-panel--drop .sbh-links a {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 15px !important;
    white-space: nowrap;
}

.sbh-panel--drop .sbh-links a:hover {
    background: #f4effb;
}

/* Tytuły bloków (Nowości, Marki) */
.sbh .sbh-block-title {
    margin: 0 0 12px;
    font-family: var(--sbh-font-bold);
    font-size: 15px !important;
}

.sbh .sbh-block-title a,
.sbh .sbh-block-title span {
    font-family: inherit;
    font-size: inherit !important;
}

/* Boczna kolumna Nowości: kremowa karta, zwarta lista (zdjęcie, nazwa, cena), opcjonalnie zakładki */
.sbh-aside {
    align-self: start;
    padding: 18px 18px 10px;
    border-radius: 18px;
    background: var(--sbh-cream);
}

.sbh-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    padding: 4px;
    border-radius: 999px;
    background: #fff;
}

.sbh .sbh-tab {
    flex: 1;
    padding: 7px 10px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--sbh-text);
    font-family: var(--sbh-font-bold);
    font-size: 13px;
    cursor: pointer;
}

.sbh .sbh-tab[aria-selected="true"] {
    background: var(--sbh-accent);
    color: #fff;
}

.sbh-aside.has-tabs .sbh-block-title {
    display: none; /* zakładki pełnią rolę tytułu; link do kategorii zostaje na dole listy */
}

.sbh-js .sbh-aside.has-tabs .sbh-new.is-hidden {
    display: none;
}

.sbh-tiles {
    display: grid;
    gap: 2px;
}

.sbh-tile {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 1px 12px;
    padding: 5px 6px;
    border-radius: 12px;
    transition: background 0.15s;
}

.sbh-tile:hover {
    background: #fff;
}

.sbh-tile-img {
    grid-row: 1 / 3;
    width: 44px;
    height: 44px;
    padding: 3px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
}

.sbh-tile-name {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    align-self: end;
    font-size: 13px !important;
    line-height: 1.3;
}

.sbh .sbh-tile-price {
    align-self: start;
    font-family: var(--sbh-font-bold);
    font-size: 13px !important;
    color: var(--sbh-text);
}

.sbh-tile:not(:has(.sbh-tile-price)) .sbh-tile-name {
    grid-row: 1 / 3;
    align-self: center;
}

/* Stopka panelu: przycisk "Zobacz wszystkie" + Promocje, Wszystkie produkty */
.sbh-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 28px;
    grid-column: 1 / -1;
    margin: 0 -16px;
    padding: 14px 16px 18px;
    border-top: 1px solid var(--sbh-line);
}

.sbh-foot-link {
    font-size: 14px !important;
}

.sbh .sbh-foot-all {
    display: inline-flex;
    align-items: center;
    margin-right: auto;
    padding: 9px 18px;
    border-radius: 999px;
    background: #f4effb;
    font-family: var(--sbh-font-bold);
    color: var(--sbh-accent) !important;
    transition: background 0.15s;
}

.sbh-foot-all:hover {
    background: #e9e0f7;
}

.sbh .sbh-foot-all span {
    font-family: inherit;
}

.sbh-foot-img {
    display: none;
}

.sbh .sbh-foot-link.sbh-hot {
    color: var(--sbh-red) !important;
    font-family: var(--sbh-font-bold);
}

@media (min-width: 768px) and (max-width: 1180px) {
    .sbh-panel--mega.has-new .sbh-panel-in {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 24px;
    }
}

@media (min-width: 768px) and (max-width: 960px) {
    .sbh-panel--mega.has-new .sbh-panel-in {
        grid-template-columns: minmax(0, 1fr);
    }

    .sbh-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Tablet: mniejsze odstępy, żeby 8 pozycji zmieściło się w jednym rzędzie */
@media (min-width: 768px) and (max-width: 1180px) {
    .sbh-main {
        gap: 24px;
    }

    .sbh-actions {
        gap: 16px;
    }

    .sbh-menu {
        gap: 0 18px;
    }

    .sbh-menu > li > a {
        font-size: 15px !important;
    }

    .sbh-sub-toggle {
        width: 18px;
    }
}

@media (min-width: 768px) and (max-width: 960px) {
    .sbh-menu {
        gap: 0 10px;
    }

    .sbh-menu > li > a {
        font-size: 14px !important;
    }

    .sbh-logo img {
        height: 32px;
    }

    .sbh-main {
        gap: 16px;
    }

    .sbh-actions {
        gap: 12px;
    }
}

/* ======================== [ TELEFON ] ======================== */

@media (max-width: 767px) {
    .sbh {
        --sbh-main-h: auto;
    }

    header.sbh {
        position: relative;
        top: auto;
    }

    .admin-bar header.sbh {
        top: auto;
    }

    .sbh-top-inner {
        min-height: 30px;
        gap: 0 5px;
        padding: 7px 8px;
        font-size: 11px;
    }

    /* Pozycje nie łamią się w środku; za długie (RU) przechodzą w całości do 2. linii */
    .sbh-top-item {
        white-space: nowrap;
    }

    .sbh-top-item {
        gap: 4px;
    }

    .sbh-tip-btn {
        width: 14px;
        height: 14px;
        font-size: 9px !important;
        border-width: 1px !important;
    }

    .sbh-top-item {
        min-width: 0;
    }

    /* Na telefonie dymek wyśrodkowany na ekranie, nie przy ikonie */
    .sbh-tip {
        position: static;
    }

    .sbh-top {
        position: relative;
    }

    .sbh-tip-box {
        top: calc(100% + 6px);
        left: 12px;
        right: 12px;
        width: auto;
        transform: none;
    }

    .sbh-tip-box::before {
        display: none;
    }

    .sbh-main {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "logo actions"
            "search search";
        gap: 12px 8px;
        height: auto;
        padding: 12px 16px 14px;
    }

    .sbh-logo img {
        height: 30px;
    }

    .sbh-actions {
        justify-content: flex-end;
        gap: 4px;
    }

    .sbh-lang--desktop,
    .sbh-action-label {
        display: none;
    }

    .sbh-count::before,
    .sbh-count::after {
        content: none;
    }

    .sbh-action {
        position: relative;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 50%;
    }

    .sbh-action .sbh-icon,
    .sbh-burger {
        display: inline-flex;
    }

    .sbh-burger .sbh-icon {
        display: block;
    }

    .sbh-cart-link .sbh-count {
        position: absolute;
        top: 3px;
        right: 1px;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        border-radius: 9px;
        background: var(--sbh-accent);
        color: #fff !important;
        font-family: var(--sbh-font-bold);
        font-size: 11px !important;
        line-height: 18px;
        text-align: center;
    }

    .sbh-cart.is-empty .sbh-count {
        display: none;
    }

    .sbh-search input.dgwt-wcas-search-input,
    .sbh-search .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
        height: 46px !important;
        font-size: 16px !important; /* iOS nie powiększa strony przy fokusie */
    }

    /* Menu pod burgerem: panel z lewej */
    .sbh-nav {
        position: fixed;
        inset: 0;
        z-index: 99990;
        border: 0;
        background: transparent;
        visibility: hidden;
        pointer-events: none;
    }

    .sbh-nav.is-open {
        visibility: visible;
        pointer-events: auto;
    }

    .sbh-nav-backdrop {
        display: block;
        position: absolute;
        inset: 0;
        background: rgba(20, 8, 40, 0.45);
        opacity: 0;
        transition: opacity 0.25s;
    }

    .sbh-nav.is-open .sbh-nav-backdrop {
        opacity: 1;
    }

    .sbh-nav-panel {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        width: min(88vw, 380px);
        max-width: none;
        margin: 0;
        padding: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #fff;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.18);
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .sbh-nav.is-open .sbh-nav-panel {
        transform: none;
    }

    .sbh-nav-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 8px 10px 20px;
        border-bottom: 1px solid var(--sbh-line);
    }

    .sbh-nav-title {
        font-family: var(--sbh-font-bold);
        font-size: 17px !important;
    }

    .sbh-nav-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
    }

    .sbh-menu {
        display: block;
        padding: 6px 0;
    }

    .sbh-menu > li {
        flex-wrap: wrap;
        border-bottom: 1px solid var(--sbh-line);
    }

    .sbh-menu > li > a {
        flex: 1;
        height: auto;
        min-height: 52px;
        padding: 0 20px;
        font-size: 17px !important;
    }

    .sbh-menu > li.current-menu-item > a,
    .sbh-menu > li.current-menu-ancestor > a {
        box-shadow: none;
    }

    .sbh-sub-toggle {
        width: 56px;
        height: 52px;
        border-left: 1px solid var(--sbh-line) !important;
    }

    .sbh-sub-toggle svg {
        width: 18px;
        height: 18px;
    }

    /* Panele w menu pod burgerem: akordeon (kolumny rozwijane osobno), małe zdjęcia przy kategoriach */
    .sbh-nav:not(.is-open) .sbh-l1-img {
        display: none;
    }

    .sbh-l1-img {
        display: block;
        flex: none;
        width: 32px;
        height: 32px;
        margin-right: 12px;
        object-fit: contain;
        border-radius: 8px;
        background: var(--sbh-cream);
    }

    .sbh-menu > li > a > span {
        font-size: inherit !important;
    }

    .sbh-menu .sub-menu,
    .sbh-panel--drop,
    .sbh-panel--mega {
        position: static;
        flex-basis: 100%;
        min-width: 0;
        max-height: none;
        overflow: visible;
        padding: 0 0 10px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        animation: none;
    }

    .sbh-menu > li:focus-within > .sub-menu {
        display: none;
    }

    .sbh-menu > li.is-open > .sub-menu {
        display: block;
    }

    .sbh-panel-in,
    .sbh-panel--mega.has-new .sbh-panel-in {
        display: block;
        padding: 0;
    }

    .sbh-cols {
        display: block;
    }

    .sbh-foot-img {
        display: none;
    }

    .sbh-col-row {
        min-height: 46px;
    }

    .sbh .sbh-col-head {
        flex: 1;
        padding: 6px 12px 6px 20px;
        font-family: var(--sbh-font);
        font-size: 15px !important;
    }

    .sbh-col-img {
        width: 100%;
        height: 100%;
    }

    .sbh-col-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: none;
        width: 56px;
        height: 46px;
        color: var(--sbh-muted) !important;
    }

    .sbh-col-toggle svg {
        width: 16px;
        height: 16px;
        transition: transform 0.15s;
    }

    .sbh-col.is-open .sbh-col-toggle svg {
        transform: rotate(180deg);
    }

    .sbh-col .sbh-links {
        display: none;
        margin: 0 !important;
        padding: 0 16px 8px 58px !important;
    }

    .sbh-col:not(.has-img) .sbh-links {
        padding-left: 32px !important;
    }

    .sbh-col.is-open .sbh-links {
        display: block;
    }

    .sbh-links a {
        padding: 9px 0;
        font-size: 15px !important;
        color: #4a4552;
    }

    .sbh-panel--drop .sbh-links a {
        padding: 10px 16px 10px 32px;
        white-space: normal;
    }

    .sbh-new {
        margin: 6px 0 0;
        padding: 10px 0 0 20px;
        border: 0;
    }

    .sbh-tiles {
        display: flex;
        gap: 10px;
        padding: 0 20px 6px 0 !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .sbh-tiles li {
        flex: 0 0 150px;
        scroll-snap-align: start;
    }

    .sbh-tile {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .sbh-tile-img {
        grid-row: auto;
        width: 100%;
        height: 96px;
    }

    .sbh-foot {
        margin: 10px 20px 0;
        padding-top: 10px;
    }

    /* Menu v3 na telefonie: akordeon jak w v2, nowe bloki w uproszczonej postaci */
    .sbh-panel--mega {
        clip-path: none;
    }

    .sbh-main-area,
    .sbh-extras {
        display: block;
    }

    .sbh-lay-deep:not(.has-new) .sbh-cols {
        columns: auto;
    }

    .sbh-lay-deep:not(.has-new) .sbh-col {
        margin-bottom: 0;
    }

    .sbh-col-pic,
    .sbh-col--tile .sbh-col-pic {
        width: 28px;
        height: 28px;
        padding: 2px;
        border-radius: 6px;
    }

    .sbh .sbh-col--tile .sbh-col-head {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        height: auto;
        padding: 6px 12px 6px 20px;
        border-radius: 0;
        text-align: left;
    }

    .sbh-col .sbh-links {
        padding-top: 0 !important;
        border-top: 0;
    }

    .sbh-subs {
        margin: -4px 0 6px !important;
    }

    .sbh-links .sbh-subs a {
        padding: 6px 0;
        font-size: 14px !important;
    }

    .sbh-promo {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
        margin: 10px 20px 0;
        padding: 16px 18px;
    }

    .sbh .sbh-promo-cta {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
        margin-top: 8px;
    }

    .sbh-aside {
        padding: 0;
        border-radius: 0;
        background: none;
    }

    .sbh-tabs {
        display: none;
    }

    .sbh-aside.has-tabs .sbh-block-title {
        display: block;
    }

    .sbh-js .sbh-aside.has-tabs .sbh-new.is-hidden {
        display: block;
    }

    .sbh-tile {
        border: 1px solid var(--sbh-line);
    }

    .sbh-tile .sbh-tile-name {
        grid-row: auto !important;
        align-self: start;
        -webkit-line-clamp: 2;
    }

    .sbh-tile-img {
        padding: 6px;
        background: #fff;
    }

    .sbh-foot {
        padding-bottom: 0;
    }

    .sbh-foot-all {
        padding: 0;
        background: none;
    }

    .sbh-nav-extra {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: auto;
        padding: 18px 20px 28px;
        border-top: 1px solid var(--sbh-line);
        background: var(--sbh-cream);
    }

    .sbh-nav-account {
        font-family: var(--sbh-font-bold);
        font-size: 16px !important;
    }

    .sbh-lang--menu,
    .sbh-lang--menu a,
    .sbh-lang--menu span {
        font-size: 16px !important;
    }

    .sbh-lang--menu a {
        padding: 8px 6px;
    }
}

body.sbh-lock {
    overflow: hidden;
}

/* ======================== [ PASEK ZAUFANIA (WSZYSTKIE STRONY POZA KOSZYKIEM I ZAMÓWIENIEM) ] ======================== */

.sbp-trust {
    background: var(--sbh-cream);
    font-family: var(--sbh-font);
}

.sbp-trust-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 28px;
    max-width: var(--sbh-wrap);
    margin: 0 auto;
    padding: 20px 16px;
    list-style: none;
    color: var(--sbh-text);
    font-size: 14px;
}

.sbp-trust-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 14px !important;
    list-style: none;
}

.sbp-trust-mark {
    color: var(--sbh-red);
    font-size: 14px !important;
}

@media (max-width: 767px) {
    .sbp-trust-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px 16px;
        padding: 18px 16px;
    }

    .sbp-trust-list li {
        align-items: flex-start;
        font-size: 13px !important;
        line-height: 1.35;
    }
}

/* ======================== [ OKRUSZKI ] ======================== */

/* Ten sam wygląd co na karcie produktu (.sbp-breadcrumbs w product-v2.css) */
.sbh-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
    margin: 0 0 16px;
    color: var(--sbh-muted);
    font-family: var(--sbh-font);
    font-size: 13px;
}

.sbh-crumbs a,
.sbh-crumbs span {
    color: var(--sbh-muted);
    font-size: 13px !important;
    text-decoration: none;
}

.sbh-crumbs a:hover {
    color: var(--sbh-accent);
    text-decoration: underline;
}

.sbh-crumbs [aria-current] {
    color: var(--sbh-text);
}

/* ======================== [ MENU: PANEL MAREK (pozycja „Marki” na belce, 2026-11-19) ] ======================== */

/* Desktop: popularne marki z logo w jednym rzędzie, pod nimi wszystkie A-Z w kolumnach (litera z lewej), stopka */
.sbh-panel--brands .sbh-panel-in {
    gap: 18px;
    padding-top: 20px;
}

.sbh-menu ul.sbh-logos,
.sbh-menu ul.sbh-az-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sbh-logos {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
}

.sbh-logo-tile {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 6px 4px;
    border-radius: 14px;
    text-align: center;
    transition: background 0.15s;
}

.sbh-logo-tile:hover {
    background: var(--sbh-cream);
}

.sbh-logo-pic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
}

.sbh-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.sbh .sbh-logo-name {
    max-width: 100%;
    overflow: hidden;
    font-size: 13px !important;
    line-height: 1.25;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.sbh-az .sbh-col-row .sbh-block-title {
    margin: 0;
}

.sbh-menu .sbh-az .sbh-az-list {
    margin: 12px 0 0 !important;
    padding: 12px 0 0 !important;
    border-top: 1px solid var(--sbh-line);
    columns: 7 140px;
    column-gap: 24px;
}

/* Litera z lewej przy pierwszej marce grupy; lista płaska - kolumny równej wysokości */
.sbh-az-list li {
    display: flex;
    padding-left: 26px !important;
    break-inside: avoid;
}

.sbh-az-list li.sbh-az-first:not(:first-child) {
    margin-top: 6px !important;
}

.sbh .sbh-az-letter {
    flex: none;
    width: 26px;
    margin-left: -26px;
    padding-top: 2px;
    color: var(--sbh-accent);
    font-family: var(--sbh-font-bold);
    font-size: 13px !important;
}

.sbh-az-list a {
    padding: 2px 0 !important;
    font-size: 13.5px !important;
    overflow-wrap: anywhere;
}

@media (min-width: 768px) and (max-width: 1180px) {
    .sbh-logos {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* Telefon (menu pod burgerem): siatka logo 3 w rzędzie, lista A-Z zwinięta pod nagłówkiem (akordeon) */
@media (max-width: 767px) {
    .sbh-brand-pop {
        padding: 10px 20px 4px;
    }

    .sbh-logos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .sbh-logo-tile {
        padding: 8px 2px;
        border: 1px solid var(--sbh-line);
    }

    .sbh-logo-pic {
        width: 52px;
        height: 52px;
    }

    .sbh-az .sbh-col-row {
        padding-left: 20px;
        border-top: 1px solid var(--sbh-line);
        margin-top: 10px;
    }

    .sbh-az .sbh-col-row .sbh-block-title {
        flex: 1;
    }

    .sbh-menu .sbh-az .sbh-az-list {
        display: none;
        margin: 0 !important;
        padding: 4px 20px 8px !important;
        border-top: 0;
        columns: 2;
        column-gap: 16px;
    }

    .sbh-menu .sbh-az.is-open .sbh-az-list {
        display: block;
    }

    .sbh-az-list a {
        padding: 7px 0 !important;
        font-size: 15px !important;
    }

    .sbh .sbh-az-letter {
        padding-top: 8px;
    }

    .sbh-panel--brands .sbh-foot {
        margin-top: 0;
        border-top: 0;
    }
}
