.site-header {
    position: relative;
    z-index: 99990;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    isolation: isolate;
    color: var(--kidello-ink);
    background: var(--kidello-surface);
    box-shadow: 0 8px 24px rgb(31 31 31 / 6%);
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

.site-header,
.site-header *,
.site-header *::before,
.site-header *::after,
.cart-drawer,
.cart-drawer *,
.cart-drawer *::before,
.cart-drawer *::after {
    box-sizing: border-box;
}

.site-header a,
.cart-drawer a {
    color: inherit;
    text-decoration: none;
}

.site-header button,
.cart-drawer button {
    font: inherit;
}

body.menu-open,
body.cart-open {
    overflow: hidden;
}

/* Skip link */

.header__skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100010;
    padding: 12px 16px;
    border-radius: var(--kidello-radius-sm);
    background: var(--kidello-ink);
    box-shadow: var(--kidello-shadow-sm);
    color: var(--kidello-surface);
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform 160ms ease;
}

.header__skip-link:focus {
    transform: translateY(0);
}

/* Pasek informacyjny */

.header__announcement {
    display: none;
    color: var(--kidello-ink);
    background: var(--kidello-spectacular-background);
}

.header__announcement-inner {
    display: flex;
    min-height: 38px;
    padding-block: 8px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.header__contact,
.header__benefits {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 22px;
    color: rgba(255, 255, 255, 0.8);
    list-style: none;
}

.header__contact {
    margin-left: -14px;
}

.header__contact li,
.header__benefits li {
    position: relative;
    margin: 0;
    padding-left: 14px;
    color: rgba(0 0 0 / 70%);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.header__contact li::before,
.header__benefits li::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--kidello-brand);
    content: "";
    transform: translateY(-50%);
}

.header__main {
    border-bottom: 1px solid var(--kidello-line);
    background: rgb(255 255 255 / 96%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.header__main-inner {
    display: flex;
    min-height: 0;
    padding-block: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* Menu toggle */

.header__menu-toggle {
    display: flex;
    width: 54px;
    min-width: 54px;
    min-height: 58px;
    margin: 0;
    padding: 7px 6px 5px;
    align-items: center;
    justify-content: center;
    flex: 0 0 54px;
    flex-direction: column;
    order: 1;
    gap: 4px;
    border: 1px solid var(--kidello-line);
    border-radius: 13px;
    background: var(--kidello-surface);
    color: var(--kidello-ink);
    cursor: pointer;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        transform 160ms ease;
}

.header__menu-toggle:active {
    transform: scale(0.97);
}

.header__menu-toggle-icon {
    display: flex;
    width: 21px;
    height: 25px;
    padding: 6px 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.header__menu-toggle-icon span {
    display: block;
    width: 100%;
    height: 2px;
    flex: 0 0 2px;
    border-radius: 99px;
    background: var(--kidello-ink);
    transition:
        transform 180ms ease,
        opacity 180ms ease;
}

.header__menu-toggle-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}

.header__menu-toggle[aria-expanded="true"]
    .header__menu-toggle-icon
    span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.header__menu-toggle[aria-expanded="true"]
    .header__menu-toggle-icon
    span:nth-child(2) {
    opacity: 0;
}

.header__menu-toggle[aria-expanded="true"]
    .header__menu-toggle-icon
    span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Logo */

.header__brand {
    min-width: 0;
    flex: 1 1 auto;
    order: 2;
    text-align: center;
}

.header__brand .custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.header__brand .custom-logo {
    display: block;
    width: auto;
    max-width: 150px;
    height: auto;
    max-height: 42px;
    object-fit: contain;
}

.header__site-name {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    color: var(--kidello-ink);
    line-height: 1;
}

.header__site-name-main {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.header__site-name-tagline {
    margin-top: 5px;
    color: var(--kidello-brand-dark);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Actions */

.header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 54px;
    order: 3;
}

/* Cart button */

.header__cart {
    position: relative;
    display: flex;
    width: 54px;
    min-width: 54px;
    min-height: 58px;
    margin: 0;
    padding: 7px 6px 5px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 13px;
    color: var(--kidello-ink);
    cursor: pointer;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        transform 160ms ease;
}

.header__cart svg {
    transition: color 160ms ease;
}

.header__cart:hover {
    border-color: var(--kidello-brand);
    background: var(--kidello-surface);
}

.header__cart:hover svg {
    color: var(--kidello-brand-deep);
}

.header__cart:active {
    transform: scale(0.97);
}

.header__cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__cart-icon svg {
    display: block;
    width: 25px;
    height: 25px;
    fill: currentColor;
}

.header__cart-count {
    position: absolute;
    top: -7px;
    right: -8px;
    display: flex;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--kidello-brand-deep);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.header__cart-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}

.header__navigation {
    display: none;
    width: 100%;
    min-width: 0;
    padding: 0 0 8px;
    flex: 0 0 100%;
    order: 4;
}

.header__navigation.is-open {
    display: block;
}

.header__menu {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 10px;
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
    border: 1px solid var(--kidello-line);
    border-radius: var(--kidello-radius-md);
    background: var(--kidello-surface);
    box-shadow: var(--kidello-shadow-sm);
    list-style: none;
}

.header__menu li {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

.header__menu > li > a {
    display: flex;
    width: 100%;
    min-height: 46px;
    padding: 0 12px;
    align-items: center;
    border-radius: var(--kidello-radius-sm);
    color: var(--kidello-ink);
    font-size: 14px;
    white-space: normal;
    transition:
        background 160ms ease,
        color 160ms ease;
}

.header__menu > li > a:hover,
.header__menu > li > a:focus-visible,
.header__menu > .current-menu-item > a,
.header__menu > .current-menu-ancestor > a {
    background: var(--kidello-brand-soft);
    color: var(--kidello-ink);
}

.header__menu .sub-menu {
    position: static;
    display: flex;
    min-width: 0;
    margin: 0;
    padding: 0 0 4px 18px;
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
    border: 0;
    background: transparent;
    box-shadow: none;
    list-style: none;
}

.header__menu .sub-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: var(--kidello-radius-sm);
    color: var(--kidello-muted);
    font-size: 13px;
    font-weight: 700;
    white-space: normal;
}

.header__menu .sub-menu a:hover,
.header__menu .sub-menu a:focus-visible {
    background: var(--kidello-brand-soft);
    color: var(--kidello-ink);
}

/* Drawer */

.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 100000;
    visibility: hidden;
    pointer-events: none;
}

.cart-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
}

.cart-drawer__overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px);
    opacity: 0;
    cursor: pointer;
    transition: opacity 220ms ease;
}

.cart-drawer.is-open .cart-drawer__overlay {
    opacity: 1;
}

.cart-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: min(420px, 100%);
    height: 100%;
    max-height: 100dvh;
    flex-direction: column;
    overflow: hidden;
    background: var(--kidello-surface);
    box-shadow: -12px 0 40px rgb(0 0 0 / 18%);
    outline: 0;
    transform: translateX(100%);
    transition: transform 220ms ease;
}

.cart-drawer.is-open .cart-drawer__panel {
    transform: translateX(0);
}

.cart-drawer__header {
    display: flex;
    min-height: 72px;
    padding: 16px 20px;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    gap: 16px;
    border-bottom: 1px solid var(--kidello-line);
}

.cart-drawer__title {
    margin: 0;
    color: var(--kidello-ink);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.cart-drawer__close {
    position: relative;
    display: flex;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    border: 1px solid var(--kidello-line);
    border-radius: 12px;
    background: var(--kidello-surface);
    color: var(--kidello-ink);
    cursor: pointer;
}

.cart-drawer__close:hover,
.cart-drawer__close:focus-visible {
    border-color: var(--kidello-brand-dark);
    background: var(--kidello-brand-soft);
}

.cart-drawer__close:hover span,
.cart-drawer__close:focus-visible span {
    background-color: var(--kidello-brand-dark);
}

.cart-drawer__close span {
    position: absolute;
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
}

.cart-drawer__close span:first-child {
    transform: rotate(45deg);
}

.cart-drawer__close span:last-child {
    transform: rotate(-45deg);
}

.cart-drawer__content {
    flex: 1 1 auto;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.cart-drawer .woocommerce-mini-cart {
    display: flex;
    margin: 0;
    padding: 0;
    flex-direction: column;
    gap: 14px;
    list-style: none;
}

.cart-drawer .woocommerce-mini-cart-item {
    position: relative;
    min-height: 84px;
    margin: 0;
    padding: 0 30px 16px 82px;
    border-bottom: 1px solid var(--kidello-line);
}

.cart-drawer .woocommerce-mini-cart-item > a:not(.remove) {
    display: block;
    color: var(--kidello-ink);
    font-size: 14px;
    font-weight: 700;
}

.cart-drawer .woocommerce-mini-cart-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 68px;
    height: 68px;
    margin: 0;
    border-radius: 10px;
    object-fit: cover;
}

.cart-drawer .woocommerce-mini-cart-item .remove {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    width: 26px;
    height: 26px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--kidello-muted);
    font-size: 20px;
    line-height: 1;
}

.cart-drawer .woocommerce-mini-cart-item .remove:hover {
    background: var(--kidello-brand-soft);
    color: var(--kidello-brand-dark);
}

.cart-drawer .quantity {
    display: block;
    margin-top: 6px;
    color: var(--kidello-muted);
    font-size: 13px;
}

.cart-drawer .woocommerce-mini-cart__total {
    display: flex;
    margin: 20px 0;
    padding-top: 18px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--kidello-line);
    color: var(--kidello-ink);
    font-size: 16px;
}

.cart-drawer .woocommerce-mini-cart__buttons {
    display: flex;
    margin: 0;
    flex-direction: column;
    gap: 10px;
}

.cart-drawer .woocommerce-mini-cart__buttons .button {
    display: flex;
    min-height: 48px;
    padding: 10px 18px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--kidello-brand-dark);
    border-radius: var(--kidello-radius-sm);
    background: var(--kidello-surface);
    color: var(--kidello-brand-dark);
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.cart-drawer .woocommerce-mini-cart__buttons .checkout {
    background: var(--kidello-brand-dark);
    color: var(--kidello-surface);
}

.cart-drawer .woocommerce-mini-cart__empty-message {
    margin: 40px 0;
    color: var(--kidello-ink);
    text-align: center;
}

/* Focus */

.site-header a:focus-visible,
.site-header button:focus-visible,
.cart-drawer a:focus-visible,
.cart-drawer button:focus-visible {
    outline: 2px solid var(--kidello-brand);
    outline-offset: 3px;
}

/* Tablet */

@media (min-width: 768px) {
    .header__announcement {
        display: block;
    }

    .header__main-inner {
        padding-block: 14px;
    }

    .header__brand .custom-logo {
        max-width: 170px;
        max-height: 46px;
    }

    .header__site-name-main {
        font-size: 32px;
    }
}

/* Desktop */

@media (min-width: 1200px) {
    .menu-open {
        overflow: visible;
    }

    .header__main-inner {
        min-height: 82px;
        padding-block: 0;
        flex-wrap: nowrap;
        gap: 38px;
    }

    .header__menu-toggle {
        display: none;
    }

    .header__navigation--mobile {
        display: none;
    }

    .header__navigation--desktop,
    .header__navigation--desktop.is-open {
        display: block;
        width: auto;
        padding: 0;
        flex: 1 1 0;
        order: 1;
    }

    .header__brand {
        flex: 0 0 auto;
        order: 2;
    }

    .header__cart:hover,
    .header__cart:focus-visible {
        border-color: var(--kidello-brand-dark);
        background: var(--kidello-brand-soft);
    }

    .header__actions {
        flex: 1 1 0;
        order: 3;
    }

    .header__menu {
        width: auto;
        padding: 0;
        align-items: center;
        justify-content: flex-start;
        flex-direction: row;
        gap: 30px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .header__menu li {
        width: auto;
    }

    .header__menu > li > a {
        position: relative;
        width: auto;
        padding: 0;
        min-height: unset;
        border-radius: 0;
        font-size: 14px;
        white-space: nowrap;
    }

    .header__menu > li > a::after {
        position: absolute;
        right: 0;
        bottom: -6px;
        left: 0;
        height: 2px;
        border-radius: 99px;
        background: var(--kidello-brand);
        content: "";
        transform: scaleX(0);
        transform-origin: center;
        transition: transform 160ms ease;
    }

    .header__menu > li:hover > a,
    .header__menu > li:focus-within > a,
    .header__menu > .current-menu-item > a,
    .header__menu > .current-menu-ancestor > a {
        background: transparent;
        color: var(--kidello-ink);
    }

    .header__menu > li:hover > a::after,
    .header__menu > li:focus-within > a::after,
    .header__menu > .current-menu-item > a::after,
    .header__menu > .current-menu-ancestor > a::after {
        transform: scaleX(1);
    }

    .header__menu .sub-menu {
        position: absolute;
        top: calc(100% - 3px);
        left: 50%;
        z-index: 30;
        display: flex;
        min-width: 220px;
        margin: 0;
        padding: 10px;
        visibility: hidden;
        align-items: stretch;
        flex-direction: column;
        gap: 2px;
        border: 1px solid var(--kidello-line);
        border-radius: var(--kidello-radius-md);
        background: var(--kidello-surface);
        box-shadow: var(--kidello-shadow-sm);
        opacity: 0;
        transform: translate(-50%, 10px);
        transition:
            opacity 160ms ease,
            visibility 160ms ease,
            transform 160ms ease;
    }

    .header__menu li:hover > .sub-menu,
    .header__menu li:focus-within > .sub-menu {
        visibility: visible;
        opacity: 1;
        transform: translate(-50%, 0);
    }

    .header__menu .sub-menu a {
        padding: 11px 12px;
        white-space: nowrap;
    }

    .header__brand .custom-logo {
        max-width: 190px;
        max-height: 52px;
    }

    .header__site-name-main {
        font-size: 36px;
    }

    .header__cart {
        width: 46px;
        min-width: 46px;
        min-height: 46px;
        padding: 0;
        border-color: transparent;
    }

    .header__cart-label {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header *,
    .site-header *::before,
    .site-header *::after,
    .cart-drawer *,
    .cart-drawer *::before,
    .cart-drawer *::after {
        scroll-behavior: auto;
        transition-duration: 0.001ms;
        animation-duration: 0.001ms;
        animation-iteration-count: 1;
    }
}