/* =========================================================
   CUSTOM MENU — KAROLINA KRAJNIK
   DESKTOP + MOBILE
   ========================================================= */

:root {
    --menu-line: #e8e8e8;
    --menu-black: #000;
    --menu-white: #fff;
    --menu-beige: #f4f1e9;
}

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

.custom-menu {
    position: relative;
    z-index: 9999;
    width: 100%;
    background: #f4f1e9;
    color: #000;
    font-family: "Work Sans", sans-serif;
}

.custom-menu__inner {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 65px;
    padding: 0 40px;
    gap: 30px;
    background: #f4f1e9;
}

/* LOGO */

.custom-menu__logo {
    position: relative;
    z-index: 2;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 180px;
    width: 180px;
    min-width: 0;
    height: 58px;
    margin: 0;
    padding: 0;
    overflow: visible;
    opacity: 1 !important;
    visibility: visible !important;
    text-decoration: none;
}

.custom-menu__logo img {
    display: block !important;
    width: 180px !important;
    height: 58px !important;
    min-width: 0;
    max-width: 100%;
    max-height: 58px;
    margin: 0;
    padding: 0;
    object-fit: contain;
    object-position: left center;
    opacity: 1 !important;
    visibility: visible !important;
}

/* MENU DESKTOPOWE */

.custom-menu__nav {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: auto;
}

.custom-menu__item {
    position: relative;
    display: flex;
    align-items: center;
}

.custom-menu__item > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    color: #000;
    text-decoration: none;
    white-space: nowrap;
    font-family: "Work Sans", sans-serif;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 400;
    letter-spacing: .05em;
    transition: opacity .2s ease;
}

.custom-menu__item > a:hover {
    opacity: .55;
}

/* STRZAŁKI */

.custom-menu__arrow {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
}

.custom-menu__item--dropdown:hover > a .custom-menu__arrow,
.custom-menu__item--dropdown:focus-within > a .custom-menu__arrow,
.custom-menu__item--mega.is-open > a .custom-menu__arrow {
    transform: rotate(225deg) translate(-1px, -1px);
}

/* ZWYKŁE PODMENU */

.custom-menu__item--dropdown {
    position: relative;
}

.custom-menu__dropdown {
    position: absolute;
    top: 100%;
    left: -18px;
    display: block;
    min-width: 205px;
    padding: 12px 18px;
    background: #f4f1e9;
    border: 1px solid var(--menu-line);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .05);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(7px);
    transition:
        opacity .2s ease,
        transform .25s ease,
        visibility 0s linear .25s;
    z-index: 10001;
}

.custom-menu__item--dropdown:hover .custom-menu__dropdown,
.custom-menu__item--dropdown:focus-within .custom-menu__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition:
        opacity .2s ease,
        transform .25s ease,
        visibility 0s linear 0s;
}

.custom-menu__dropdown a {
    display: block;
    padding: 11px 0;
    color: #000;
    text-decoration: none;
    font-family: "Work Sans", sans-serif;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: .04em;
    transition: opacity .2s ease;
}

.custom-menu__dropdown a:hover {
    opacity: .55;
}

/* MEGA MENU — WYŁĄCZNIE SKLEP */

.custom-menu__item--mega {
    position: static;
}

.custom-menu__mega {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    padding: 42px 60px 48px;
    background: #f4f1e9;
    border-top: 1px solid var(--menu-line);
    box-shadow: 0 18px 32px rgba(0, 0, 0, .035);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition:
        opacity .25s ease,
        transform .3s cubic-bezier(.22, 1, .36, 1),
        visibility 0s linear .3s;
    z-index: 10000;
}

.custom-menu__item--mega:hover .custom-menu__mega,
.custom-menu__item--mega:focus-within .custom-menu__mega,
.custom-menu__item--mega.is-open .custom-menu__mega {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition:
        opacity .25s ease,
        transform .3s cubic-bezier(.22, 1, .36, 1),
        visibility 0s linear 0s;
}

.custom-menu__mega-inner {
    display: grid;
    grid-template-columns: minmax(200px, .75fr) minmax(0, 2fr);
    align-items: start;
    gap: 48px;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
}

.custom-menu__mega-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 5px;
}

.custom-menu__mega-eyebrow {
    display: block;
    margin-bottom: 17px;
    color: #777;
    font-family: "Work Sans", sans-serif;
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: .16em;
}

.custom-menu__mega-intro h2 {
    margin: 0 0 14px;
    padding: 0;
    color: #000;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.25;
    font-weight: 400;
    letter-spacing: -.025em;
}

.custom-menu__mega-intro p {
    margin: 0 0 24px;
    color: #555;
    font-family: "Work Sans", sans-serif;
    font-size: 13px;
    line-height: 1.7;
    font-weight: 400;
}

.custom-menu__mega-all {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding-bottom: 5px;
    border-bottom: 1px solid #000;
    color: #000;
    text-decoration: none;
    font-family: "Work Sans", sans-serif;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: .04em;
    transition: opacity .2s ease;
}

.custom-menu__mega-all:hover {
    opacity: .55;
}

.custom-menu__mega-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.custom-menu__mega-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    background: #f4f1e9;
    color: #000;
    text-decoration: none;
    transition: transform .3s ease, opacity .2s ease;
}

.custom-menu__mega-card:hover {
    transform: translateY(-3px);
}

.custom-menu__mega-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f4f1e9;
}

.custom-menu__mega-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}

.custom-menu__mega-card:hover .custom-menu__mega-image img {
    transform: scale(1.035);
}

.custom-menu__mega-card-title {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 13px 8px;
    color: #000;
    font-family: "Work Sans", sans-serif;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 400;
    letter-spacing: .1em;
    text-align: center;
}

/* IKONY, WYSZUKIWARKA I KOSZYK */

.custom-menu__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
    margin-left: 0;
}

.custom-menu__search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #000;
    cursor: pointer;
}

.custom-menu__search svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.custom-menu__cart {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-menu__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #000;
    text-decoration: none;
    transition: opacity .2s ease;
}

.custom-menu__icon:hover {
    opacity: .55;
}

.custom-menu__icon svg {
    display: block;
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.custom-menu__cart .ct-cart-item,
.custom-menu__cart .ct-cart-content {
    color: #000;
}

/* HAMBURGER */

.custom-menu__toggle {
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    box-shadow: none;
    color: #000;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.custom-menu__toggle:hover,
.custom-menu__toggle:focus,
.custom-menu__toggle:focus-visible,
.custom-menu__toggle:active {
    border: 0;
    outline: none;
    background: transparent;
    box-shadow: none;
}

.custom-menu__toggle span {
    position: absolute;
    left: 3px;
    display: block;
    width: 18px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #000;
    transform-origin: center;
    transition: top .28s ease, transform .28s ease, opacity .2s ease;
}

.custom-menu__toggle span:nth-child(1) {
    top: 7px;
}

.custom-menu__toggle span:nth-child(2) {
    top: 12px;
}

.custom-menu__toggle span:nth-child(3) {
    top: 17px;
}

.custom-menu.menu-open .custom-menu__toggle span:nth-child(1) {
    top: 12px;
    transform: rotate(45deg);
}

.custom-menu.menu-open .custom-menu__toggle span:nth-child(2) {
    opacity: 0;
}

.custom-menu.menu-open .custom-menu__toggle span:nth-child(3) {
    top: 12px;
    transform: rotate(-45deg);
}

/* MENU MOBILNE — STRUKTURA Z PHP */

.custom-menu__mobile {
    display: none;
}

/* IKONA KOSZYKA — KOMPUTER */

.custom-menu__cart .ct-cart-item .ct-icon {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    flex: 0 0 20px !important;
}

/* TABLET */

@media (min-width: 768px) and (max-width: 1100px) {
    .custom-menu__inner {
        min-height: 100px;
        padding: 0 24px;
        gap: 20px;
    }

    .custom-menu__logo {
        flex-basis: 135px;
        width: 135px;
        height: 44px;
    }

    .custom-menu__logo img {
        width: 135px !important;
        height: 44px !important;
        max-width: 100%;
        max-height: 44px;
    }

    .custom-menu__nav {
        gap: 16px;
    }

    .custom-menu__item > a {
        gap: 5px;
        font-size: 11px;
        letter-spacing: .02em;
    }

    .custom-menu__actions {
        gap: 11px;
    }

    .custom-menu__mega {
        padding: 32px 28px 36px;
    }

    .custom-menu__mega-inner {
        grid-template-columns: minmax(175px, .75fr) minmax(0, 2fr);
        gap: 28px;
    }

    .custom-menu__mega-cards {
        gap: 12px;
    }

    .custom-menu__mega-card-title {
        font-size: 10px;
        min-height: 42px;
    }
}

/* MOBILE */

@media (max-width: 767px) {
    .custom-menu {
        z-index: 99999;
    }

    .custom-menu__inner {
        min-height: 64px;
        padding: 0 20px;
        gap: 12px;
        z-index: 10002;
    }

    .custom-menu__logo {
        flex: 0 1 140px;
        width: 140px;
        max-width: 140px;
        height: 42px;
    }

    .custom-menu__logo img {
        width: 140px !important;
        height: 42px !important;
        max-width: 140px;
        max-height: 42px;
    }

    .custom-menu__nav {
        display: none !important;
    }

    .custom-menu__actions {
        position: relative;
        z-index: 10005;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 15px;
        margin-left: auto;
    }

    .custom-menu__search {
        width: 21px;
        height: 21px;
    }

    .custom-menu__search svg {
        width: 19px;
        height: 19px;
    }

    .custom-menu__cart .ct-header-cart,
    .custom-menu__cart .ct-cart-item {
        display: flex;
        align-items: center;
    }

    .custom-menu__cart .ct-cart-item {
        min-width: 23px;
    }

.custom-menu__cart .ct-cart-item .ct-icon {
display: block !important;
width: 18px !important;
height: 18px !important;
margin-left: 5px !important;
margin-right: 5px !important;
min-width: 18px !important;
max-width: 18px !important;
flex: 0 0 18px !important;
}

    .custom-menu__toggle {
        display: flex;
        position: relative;
        z-index: 10010;
        flex: 0 0 24px;
    }

    /* PANEL MENU MOBILNEGO */

    .custom-menu__mobile {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        display: block;
        width: 100%;
        height: calc(100dvh - 64px);
        max-height: calc(100dvh - 64px);
        overflow: hidden;
        border-top: 1px solid var(--menu-line);
        background: #f4f1e9;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translate3d(0, -10px, 0);
        z-index: 10000;
        transition: opacity .28s ease, transform .3s ease, visibility 0s linear .3s;
    }

    .custom-menu.menu-open .custom-menu__mobile {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate3d(0, 0, 0);
        transition: opacity .28s ease, transform .3s ease, visibility 0s linear 0s;
    }

    .custom-menu__mobile-level {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        padding: 8px 20px 28px;
        overflow-x: hidden;
        overflow-y: auto;
        background: #f4f1e9;
        transform: translate3d(100%, 0, 0);
        visibility: hidden;
        pointer-events: none;
        transition: transform .38s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .38s;
    }

    .custom-menu__mobile-level.is-active {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        pointer-events: auto;
        transition: transform .38s cubic-bezier(.22, 1, .36, 1), visibility 0s linear 0s;
    }

    .custom-menu__mobile-level.is-before {
        transform: translate3d(-100%, 0, 0);
        visibility: visible;
        pointer-events: none;
    }

    .custom-menu__mobile-link,
    .custom-menu__mobile-back {
        font-family: "Work Sans", sans-serif;
        appearance: none;
        -webkit-appearance: none;
    }

    .custom-menu__mobile-link {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 56px;
        margin: 0;
        padding: 15px 0;
        border: 0;
        border-bottom: 1px solid var(--menu-line);
        border-radius: 0;
        background: transparent;
        color: #000;
        text-align: left;
        text-decoration: none;
        font-family: "Work Sans", sans-serif;
        font-size: 13px;
        line-height: 1.4;
        font-weight: 400;
        letter-spacing: .08em;
        text-transform: uppercase;
        cursor: pointer;
        transition: opacity .2s ease;
    }

    .custom-menu__mobile-link:hover {
        opacity: .6;
    }

    .custom-menu__mobile-link .custom-menu__arrow {
        width: 8px;
        height: 8px;
        margin-right: 3px;
        transform: rotate(-45deg);
    }

    .custom-menu__mobile-back {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        min-height: 48px;
        margin: 0 0 8px;
        padding: 5px 0 12px;
        border: 0;
        border-bottom: 1px solid var(--menu-line);
        border-radius: 0;
        background: transparent;
        color: #000;
        font-family: "Work Sans", sans-serif;
        font-size: 11px;
        line-height: 1.4;
        font-weight: 400;
        letter-spacing: .08em;
        text-transform: uppercase;
        text-align: left;
        cursor: pointer;
    }

    .custom-menu__mobile-back span {
        font-size: 18px;
        line-height: 1;
    }

    body.custom-menu-open {
        overflow: hidden;
    }

    /* Na telefonie podmenu obsługują poziomy mobilne, nie dropdown desktopowy. */
    .custom-menu__dropdown,
    .custom-menu__mega {
        display: none !important;
    }
}

/* MAŁE TELEFONY */

@media (max-width: 390px) {
    .custom-menu__inner {
        padding: 0 16px;
        gap: 8px;
    }

    .custom-menu__logo {
        flex-basis: 120px;
        width: 120px;
        max-width: 120px;
    }

    .custom-menu__logo img {
        width: 120px !important;
        max-width: 120px;
    }

    .custom-menu__actions {
        gap: 11px;
    }
}

@media (max-width: 340px) {
    .custom-menu__inner {
        padding: 0 13px;
        gap: 6px;
    }

    .custom-menu__logo {
        flex-basis: 108px;
        width: 108px;
        max-width: 108px;
    }

    .custom-menu__logo img {
        width: 108px !important;
        max-width: 108px;
    }

    .custom-menu__actions {
        gap: 9px;
    }
}