.topBar{
    position: fixed;
    top: 0px;
    padding-top: 20px;
    padding-bottom: 20px;
    width: 100%;
    left: 0px;
    z-index: 11;
    -webkit-transition: background 0.3s ease-in-out;
    -o-transition: background 0.3s ease-in-out;
    -moz-transition: background 0.3s ease-in-out;
    transition: background 0.3s ease-in-out;
    /* background: #f5f6fa; */
    background: #fff;
    /* cień cały czas, nie tylko po przewinięciu (wcześniej tylko .withShadow) */
    box-shadow: 0px 0px 5px #e2e7ef;
}

.topBar.withBackground{
    background: #fff;
}

.topBar .topButton{
    float: right;
    margin-right: 40px;
    height: 35px;
    line-height: 35px;
    font-size: 14px;
    font-weight: bold;
    position: relative;
    text-decoration: none;
    color: #2e3049; /* jak w /pomoc i /blog */
}

.topBar .topButton > a,
.topBar .topButtonContent > div > a{
    text-decoration: none;
    color: #2e3049;
    display: block;
}

.topBar > div > .hrefButton{
    line-height: 35px !important;
}

.topBar .topButton > span:first-of-type, .topBar .topButton > a:first-of-type, .topBar .topButtonContent > div > div, .topBar .topButtonContent > div > a{
    cursor: pointer;
    -webkit-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    -moz-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
}

.topBar .topButtonContent{
    position: absolute;
    padding-top: 20px;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease-in-out;
    width: auto;
    left: 50%;
    margin-left: -84px;
}

.topBar .topButtonContent > div{
    position: relative;
    background: #fff;
    top: -1px;
    width: -moz-calc(100% - 40px);
    width: -webkit-calc(100% - 40px);
    width: -o-calc(100% - 40px);
    width: calc(100% - 40px);
    padding: 20px;
    padding-top: 0px;
    padding-bottom: 0px;
    border: 1px solid #edeff3;
    -webkit-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    -moz-transition: all 0.2s ease-in-out;
    transition: all 0.2s ease-in-out;
    line-height: 18px;
}

.topBar.withShadow .topButtonContent > div{
    border: 1px solid #fff;
    box-shadow: 0px 5px 5px #e2e7ef;
}

/* rozwijane menu łączy się z paskiem menu: bez górnej ramki, zachodzi 1 px na pasek i zakrywa jego cień */
.topBar .topButtonContent > div,
.topBar.withShadow .topButtonContent > div{
    border-top: 0;
    top: -1px;
}

.topBar .topButtonContent > div > div,
.topBar .topButtonContent > div > a{
    border-bottom: 1px solid #edeff3;
    padding-top: 20px;
    padding-bottom: 20px;
    cursor: pointer;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

.topBar .topButtonContent > div > div:last-of-type,
.topBar .topButtonContent > div > a:last-of-type{
    border-bottom: 0px;
}

.topBar button,
.topBar a.hrefButton{
    float: right;
    margin-right: 20px;
}

/* przyciski w menu zaokrąglone jak pozostałe przyciski strony (buttons.css: 5px) */
.topBar .mat-raised-button,
.topBar a.hrefButton {
    border-radius: 10px !important;
}

/* Panel, Poczta i koszyk pogrubione jak w /pomoc i /blog (buttons.css wymusza 400 na <button>) */
.topBar .hrefButton .buttonName,
.topBar .shoppingCart .buttonName{
    font-weight: 700;
}

.topBar .topButton > span:first-of-type{
    display: block;
    height: 100%;
}

.topBar .topButton:hover > span:first-of-type, .topBar .topButton:hover > a:first-of-type, .topBar .topButton > .topButtonContent > div > div:hover, .topBar .topButton > .topButtonContent > div > a:hover{
    color: #36beca;
}

.topBar .topButton:hover > .topButtonContent{
    visibility: visible;
    opacity: 1;
}

.topBar .shoppingCart{
    float: right;
    margin-right: 20px;
}

.topBar > div button:first-child,
.topBar > div a.hrefButton:first-child{
    margin-right: 0px;
}

/* konto zalogowanego użytkownika (przycisk, karta, sekcja w menu mobilnym): components/account.css */

#shoppingCartButtonMobile{
    display: none;
    margin-right: 70px;
    margin-top: 0px;
    height: 35px;
    line-height: 35px;
}

#shoppingCartButtonMobile .icon,
#shoppingCartButtonMobile i{
    font-size: 20px;
    color: #b0b4c9;
    margin: 0px;
}

#shoppingCartButtonMobile i{
    position: relative;
    top: 2px;
}

#shoppingCartButtonMobile.active .icon, #shoppingCartButtonMobile.active > i{
    color: #36beca;
}

/* przycisk (button): bez domyślnej ramki, tła i odstępów przeglądarki */
.hamburger{
    display: none;
    position: absolute;
    top: 1px;
    right: 20px;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

/* stary mobile.css ukrywa przyciski w menu (.topBar button) poniżej 1130 px; hamburger ma zostać widoczny */
@media (max-width: 1130px) {
    .topBar .hamburger{
        display: block !important;
    }
}

.hamburger .line{
    width: 30px;
    height: 3px;
    background-color: #445056;
    display: block;
    -webkit-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    margin: 6px auto;
}

.hamburger.is-active .line{
    margin: 10px auto;
    margin-top: 2px;
}

.hamburger.is-active .line:nth-child(2){
    opacity: 0;
}

.hamburger.is-active .line:nth-child(1){
    -webkit-transform: translateY(13px) rotate(45deg);
    -ms-transform: translateY(13px) rotate(45deg);
    -o-transform: translateY(13px) rotate(45deg);
    transform: translateY(13px) rotate(45deg);
}

.hamburger.is-active .line:nth-child(3){
    -webkit-transform: translateY(-13px) rotate(-45deg);
    -ms-transform: translateY(-13px) rotate(-45deg);
    -o-transform: translateY(-13px) rotate(-45deg);
    transform: translateY(-13px) rotate(-45deg);
}

.topBar .partnerProgramLabelShort{
    display: none;
}

/* ---------- menu mobilne (hamburger, poniżej 1130 px): panel wysuwany z prawej (main.js: commonObj.toggleHamburger
   animuje right i pokazuje .hamburgerContent > div). Przyciski Panel/Poczta/Koszyk, lista jak „Najczęściej czytane”, kontakt ---------- */

.hamburgerContent.h24-mnav {
    position: fixed;
    top: 75px;
    right: -100%;
    z-index: 2147483647;
    display: none;
    width: 420px;
    max-width: 100%;
    height: calc(100% - 75px);
    box-sizing: border-box;
    overflow-y: auto;
    background: var(--h24-card-bg);
    box-shadow: -16px 16px 36px rgba(46, 48, 73, .12);
    /* cień tylko w bok i w dół: rozmycie w górę przyciemniało dół paska menu i między paskiem a panelem była widoczna linia */
    clip-path: inset(0 0 -80px -80px);
    text-align: left;
}

.hamburgerContent.hamburgerContentActive {
    display: block;
}

/* przyciemnienie strony pod otwartym menu: ten sam kolor i czas co przy koszyku (components/bin.css: .bin.h24-cart::before);
   pasek menu zostaje jasny, bo jest w nim przycisk zamykania */
.h24-mnav-overlay {
    position: fixed;
    top: 75px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2147483646;
    background: rgba(46, 48, 73, .35);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility 0s .35s;
}

.h24-mnav-overlay.h24-mnav-overlay--open {
    opacity: 1;
    visibility: visible;
    transition: opacity .35s ease, visibility 0s;
}

@media (min-width: 1131px) {
    .h24-mnav-overlay { display: none; }
}

/* bez odstępu u góry: pierwsza karta (albo pasek konta) zaczyna się tuż pod górnym paskiem */
.h24-mnav__inner {
    padding: 0 20px 28px;
    opacity: 0;
}

/* konto zalogowanego (account.css) bez bocznych marginesów, bo panel ma własny odstęp */
.h24-mnav .h24-account-mobile {
    margin: 0 0 16px;
}

.h24-mnav__actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.h24-mnav__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 10px;
    border-radius: var(--h24-radius-small);
    background: var(--h24-brand);
    box-shadow: var(--h24-shadow-button);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: box-shadow var(--h24-transition);
}

.h24-mnav__btn:hover {
    box-shadow: none;
}

.h24-mnav__btn--pink {
    background: var(--h24-pink);
    box-shadow: 5px 5px 5px rgba(230, 93, 209, .4);
}

.h24-mnav__btn--turquoise {
    background: var(--h24-turquoise);
    box-shadow: var(--h24-shadow-button-turquoise);
}

.h24-mnav__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* sekcje menu: biała karta z lawendowym nagłówkiem */
.h24-mnav__group {
    margin-top: 14px;
    border: 1px solid var(--h24-divider);
    border-radius: var(--h24-radius);
    background: var(--h24-card-bg);
    box-shadow: var(--h24-shadow);
    overflow: hidden;
}

.h24-mnav__group:first-of-type,
.h24-account-mobile + .h24-mnav__group {
    margin-top: 0;
}

.h24-mnav__group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--h24-lavender-from), var(--h24-lavender-to));
    color: var(--h24-heading);
    font-size: 15px;
    font-weight: 700;
}

.h24-mnav__group-title i {
    width: 20px;
    color: var(--h24-brand);
    font-size: 17px;
    text-align: center;
}

.h24-mnav__group .h24-mnav__actions {
    padding: 14px 12px 16px;
}

.h24-mnav__list {
    margin: 0;
    padding: 2px 12px;
    list-style: none;
}

.h24-mnav__list li + li {
    border-top: 1px solid var(--h24-divider);
}

.h24-mnav__list a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 4px;
    color: var(--h24-heading);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: color var(--h24-transition);
}

.h24-mnav__icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--h24-icon-bg);
    color: var(--h24-brand);
    font-size: 17px;
}

.h24-mnav__label {
    flex: 1;
    min-width: 0;
}

.h24-mnav__arrow {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--h24-icon-bg);
    color: var(--h24-brand);
    font-size: 14px;
    transition: background var(--h24-transition), color var(--h24-transition);
}

.h24-mnav__list a:hover {
    color: var(--h24-brand);
}

.h24-mnav__list a:hover .h24-mnav__arrow {
    background: var(--h24-brand);
    color: #fff;
}

.h24-mnav a:focus-visible,
.h24-mnav button:focus-visible {
    outline: 3px solid var(--h24-brand);
    outline-offset: 2px;
}

/* kontakt na dole: lawendowa ramka jak „W skrócie” */
.h24-mnav__help {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 18px 20px;
    border-radius: var(--h24-radius);
    background: linear-gradient(135deg, var(--h24-lavender-from), var(--h24-lavender-to));
}

.h24-mnav__help p {
    margin: 0;
}

.h24-mnav__help-title {
    color: var(--h24-heading);
    font-size: 15px;
    font-weight: 700;
}

.h24-mnav__help a {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    color: var(--h24-brand);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.h24-mnav__help a i {
    width: 18px;
    text-align: center;
}

.h24-mnav__help > div {
    flex: 1;
    min-width: 0;
}

.h24-mnav__help-hours {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px !important;
    padding-top: 12px;
    border-top: 1px solid var(--h24-divider);
    color: var(--h24-text);
    font-size: 13px;
}

.h24-mnav__help-hours i {
    width: 18px;
    text-align: center;
}

/* godziny łamią się w całości, nie w środku zakresu */
.h24-mnav__nowrap {
    white-space: nowrap;
}

/* grafika bąbelków czatu po prawej stronie ramki pomocy (dekoracyjna) */
.h24-mnav__help-art {
    display: block;
    flex: none;
    width: 84px;
    height: auto;
}

/* ---------- reguły przeniesione ze styles.css i mobile.css (ładowane po tym pliku, dlatego na końcu) ---------- */

.registerFooter > div,
.info > div,
.topBar > div:first-child {
    max-width: 1350px;
    height: auto;
    margin: 0 auto;
    position: relative;
}

.logo {
    float: left;
    width: 153px;
    height: 35px;
    background-image: url('/images/landingPage/logo.png');
    /* na ekranach o dużej gęstości (telefony 2-3x) ostra wersja zamiast rozciąganego PNG 177x40 */
    background-image: -webkit-image-set(url('/images/landingPage/logo.png') 1x, url('/images/landingPage/logo@3x.png') 2x);
    background-image: image-set(url('/images/landingPage/logo.png') 1x, url('/images/landingPage/logo@3x.png') 2x);
    background-size: 100% auto;
    background-repeat: no-repeat;
    cursor: pointer;
    -webkit-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    -moz-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
}

.top .messages,
.topBar .messages {
    float: right;
    margin-right: 10px;
    margin-top: 10px;
    color: #b0b4c9;
}

.top .messages.active,
.top .messages:hover,
.topBar .messages.active,
.topBar .messages:hover {
    color: #36beca;
}

.top .messages.active,
.topBar .messages.active {
    border-top-right-radius: 0px !important;
}

.top .messages .count,
.topBar .messages .count {
    position: absolute;
    font-size: 9px;
    top: 0px;
    right: 0px;
    background: #36beca;
    color: #fff;
    width: 16px;
    height: 16px;
    border-radius: 20px;
    line-height: 16px;
}

@media (max-width: 1455px) {
    .mainRegisterFooter > div,
    .info > div {
        max-width: 1200px !important;
    }
}

/* progi menu jak treść stron: do 1400 px kontener 1200 px, więc wtedy mniejsze odstępy */
@media (max-width: 1400px) {
    /* 22 px zamiast 30: w menu jest też przełącznik języka, a etykiety DE/UK są dłuższe */
    .topBar .topButton {
        margin-right: 22px !important;
    }
}

@media (max-width: 1310px) {
    .mainRegisterFooter > div,
    .info > div {
        max-width: 1024px !important;
    }
}

/* menu zwęża się razem z treścią stron: do 1400 px maks. 1200 px (jak .home-container) */
@media (max-width: 1400px) {
    .topBar > div:first-child {
        max-width: 1200px !important;
    }
}

/* Panel i Poczta przy 1131-1240 px: sam przycisk z ikoną (kwadrat jak koszyk na telefonie), nazwa w tooltipie
   po najechaniu lub zaznaczeniu klawiaturą; tooltip wygląda jak #powerTip na stronie (szary, 11 px) */
@media (min-width: 1131px) and (max-width: 1240px) {
    .topBar a.hrefButton {
        position: relative;
        width: 35px;
        padding-left: 0 !important;
        padding-right: 0 !important;
        text-align: center;
        overflow: visible !important;
    }

    .topBar a.hrefButton .buttonName {
        display: none !important;
    }

    .topBar a.hrefButton i {
        margin-right: 0 !important;
    }

    /* przyciski (koszyk, Panel, Poczta) co 12 px, jak przycisk konta; dzięki temu w menu są szersze odstępy */
    .topBar #panelButtonMain,
    .topBar #shoppingCartButton {
        margin-right: 12px !important;
    }

    .topBar a.hrefButton[data-tip]::after {
        content: attr(data-tip);
        position: absolute;
        top: calc(100% + 10px);
        left: 50%;
        transform: translateX(-50%);
        padding: 8px;
        border-radius: 5px;
        background: rgba(100, 100, 100, .95);
        color: #fff;
        font-size: 11px;
        font-weight: 400;
        line-height: 1.2;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s ease, visibility .2s ease;
        z-index: 2147483647;
    }

    .topBar a.hrefButton[data-tip]:hover::after,
    .topBar a.hrefButton[data-tip]:focus-visible::after {
        opacity: 1;
        visibility: visible;
    }
}

/* menu zwęża się razem z treścią stron (kontener do 1240 px: maks. 1000-1024 px), a nie wcześniej */
@media (max-width: 1240px) {
    /* 1000 px jak treść stron; mieści się, bo Panel i Poczta mają tu same ikony */
    .topBar > div:first-child {
        max-width: 1000px !important;
    }

    .topBar .partnerProgramLabel {
        display: none !important;
    }

    .topBar .partnerProgramLabelShort {
        display: inline-block !important;
    }

    .topBar .topButton {
        margin-right: 22px !important;
    }

}

@media (max-width: 1130px) {
    .hamburger {
        display: block !important;
    }

    .topBar .topButton,
    .topBar button,
    .topBar .accountBox,
    .topBar .hrefButton {
        display: none !important;
    }

    .mainRegisterFooter > div,
    .info > div,
    .topBar > div:first-child {
        max-width: 100% !important;
    }

    .topBar .logo {
        left: 20px !important;
        position: absolute !important;
        height: 40px !important;
        width: 152px !important;
    }

    #shoppingCartButtonMobile {
        display: block !important;
    }

}

/* ---------- koszyk i hamburger w pasku mobilnym (poniżej 1130 px) ----------
   oba przyciski 44 × 44 px (cel dotyku), wyśrodkowane w pionie w pasku 75 px, ikony w kolorze nagłówków;
   linie hamburgera i ikona koszyka cieńsze, w jednym stylu; licznik w kolorze marki (biały tekst, kontrast 4,6:1) */
@media (max-width: 1130px) {
    .topBar #shoppingCartButtonMobile {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: relative;
        width: 44px;
        height: 44px;
        margin: -4.5px 53px -4.5px 0;
        padding: 0;
        border-radius: 12px !important; /* stary .messages.active zeruje prawy górny róg */
        line-height: 1;
        color: #2e3049;
        transition: background .2s ease;
    }

    .topBar #shoppingCartButtonMobile i,
    .topBar #shoppingCartButtonMobile.active > i {
        top: 0;
        color: #2e3049;
        font-size: 22px;
        transition: color .2s ease;
    }


    .topBar #shoppingCartButtonMobile .count {
        top: 2px;
        right: 0;
        min-width: 18px;
        width: auto;
        height: 18px;
        padding: 0 4px;
        box-sizing: border-box;
        border: 2px solid #fff;
        border-radius: 999px;
        background: #6556e7;
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        line-height: 14px;
        text-align: center;
    }

    .topBar .hamburger {
        top: -4.5px;
        right: 9px;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        border-radius: 12px !important;
        transition: background .2s ease !important;
    }


    .topBar .hamburger .line,
    .topBar .hamburger.is-active .line {
        width: 22px;
        height: 2px;
        margin: 0;
        border-radius: 2px;
        background-color: #2e3049;
    }

    .topBar .hamburger.is-active .line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .topBar .hamburger.is-active .line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* podświetlenie po najechaniu tylko przy myszy: na ekranie dotykowym zostawało po dotknięciu */
    @media (hover: hover) {
        .topBar #shoppingCartButtonMobile:hover,
        .topBar .hamburger:hover {
            background: #f3f2fd;
        }

        .topBar #shoppingCartButtonMobile:hover i {
            color: #6556e7;
        }
    }

    .topBar #shoppingCartButtonMobile:focus-visible,
    .topBar .hamburger:focus-visible {
        outline: 3px solid #6556e7;
        outline-offset: 0;
    }
}

/* ---------- przełącznik języka (fragments/top.html, fragments/footer.html) ---------- */

.topBar .h24-lang .h24-lang__current {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.topBar .h24-lang .h24-lang__current i {
    font-size: 15px;
}

.topBar .h24-lang .topButtonContent {
    margin-left: -70px;
}

.topBar .h24-lang .topButtonContent > div > a.h24-lang__active,
.h24-mnav__langs a.h24-lang__active,
.footerLangs a.h24-lang__active {
    color: #6556e7;
    font-weight: 700;
}

/* menu na komputerze: aktywny język na liście i bieżąca podstrona w kolorze turkusowym, jak po najechaniu */
.topBar .h24-lang .topButtonContent > div > a.h24-lang__active,
.topBar .topButton.h24-nav__active > span,
.topBar .topButton.h24-nav__active > a:first-of-type {
    color: #36beca;
}

.h24-mnav__langs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 12px 16px;
}

.h24-mnav__langs a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f3f2fd;
    color: #2e3049;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
}

.h24-mnav__langs a.h24-lang__active {
    background: #e9e7fc;
}

.footerLangs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
}

/* do 1400 px przełącznik języka bez kodu (sam globus, nazwa w aria-label), żeby menu mieściło się w jednej linii */
@media (max-width: 1400px) {
    .topBar .h24-lang .h24-lang__current span {
        display: none;
    }

    /* ukraińskie etykiety są dłuższe: mniejsza czcionka menu (13 px zamiast 14 px) */
    html[lang="uk"] .topBar .topButton {
        font-size: 13px;
    }
}

/* ukraińskie menu: mniejsze odstępy między pozycjami niż w innych językach (dłuższe etykiety) */
@media (min-width: 1241px) and (max-width: 1400px) {
    html[lang="uk"] .topBar .topButton {
        margin-right: 16px !important;
    }
}

@media (max-width: 1240px) {
    /* ukraińskie etykiety są dłuższe: przy 1131-1240 px mniejsze odstępy, żeby menu zostało w jednej linii */
    html[lang="uk"] .topBar .topButton {
        margin-right: 16px !important;
    }
}

@media (min-width: 1401px) {
    html[lang="uk"] .topBar .topButton {
        margin-right: 26px;
    }
}
