/** Shopify CDN: Minification failed

Line 39:5 Cannot use type selector "__top" directly after nesting selector "&"
Line 48:9 Cannot use type selector "-inner" directly after nesting selector "&"
Line 62:9 Cannot use type selector "-btns" directly after nesting selector "&"
Line 78:5 Cannot use type selector "__controls" directly after nesting selector "&"
Line 81:53 Comments in CSS use "/* ... */" instead of "//"
Line 94:5 Cannot use type selector "__logo" directly after nesting selector "&"
Line 105:5 Cannot use type selector "__box" directly after nesting selector "&"
Line 119:5 Cannot use type selector "__desktop-content" directly after nesting selector "&"
Line 131:5 Cannot use type selector "__content" directly after nesting selector "&"
Line 144:5 Cannot use type selector "__worktime" directly after nesting selector "&"
... and 6 more hidden warnings

**/
.header {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 30;
    transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
    transition: all 0.4s, padding 0.2s;
    transform: translate(0, 0);
    background: var(--bg-a);
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;

    &.sticky {
        box-shadow: 0px 10px 42px -4px rgba(0, 0, 0, 0.25);
    }

    &.open-menu {
        transition: background 0.2s;
        transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
    }

    &__top {
        background-color: var(--bg-c);

        @include tablet {
            .container {
                padding: 0;
            }
        }

        &-inner {
            display: flex;
            align-items: center;
            justify-content: space-between;

            @include for-tablet {
                padding: 16px 0;
            }

            @include tablet {
                flex-direction: column;
            }
        }

        &-btns {
            display: flex;
            align-items: center;

            @include for-tablet {
                gap: 64px;
            }

            @include tablet {
                width: 100%;
                padding: 16px;
                justify-content: space-between;
            }
        }
    }

    &__controls {
        @include for-small-tablet {
            display: grid;
            grid-template-columns: repeat(2, 138px); // или auto-fit/minmax, если нужно
            gap: 8px;
        }

        @include small-tablet {
            display: contents;

            .btn-checkout {
                display: none;
            }
        }
    }

    &__logo {
        width: clamp(124px, 21.777vw, 223px);
        height: clamp(28px, 4.883vw, 50px);

        img,
        svg {
            width: 100%;
            object-fit: contain;
        }
    }

    &__box {
        position: relative;
        padding-bottom: clamp(16px, 2.361vw, 24px);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px 20px;

        @include mobile {
            flex-wrap: wrap;
            padding-bottom: 0;
        }
    }

    &__desktop-content {
        flex-grow: 1;
        gap: clamp(15px, 2.93vw, 30px);
        display: flex;
        align-items: center;
        justify-content: flex-end;

        @include mobile {
            display: contents;
        }
    }

    &__content {
        display: flex;
        align-items: center;

        @include for-small-tablet {
            gap: clamp(15px, 2.93vw, 30px);
        }

        @include small-tablet {
            gap: 35px;
        }
    }

    &__worktime {
        flex-shrink: 0;
        padding: 5px clamp(16px, 2.344vw, 24px);
        display: flex;
        align-items: center;
        gap: clamp(12px, 2.344vw, 24px);
        color: var(--cl-f);
        border-radius: 12px;
        background-color: var(--bg-e);

        @include small-tablet {
            display: none;
        }
    }

    &__delivery {
        @include for-tablet {
            &:hover,
            &:active {
              color: var(--cl-a);
            }
        }

        @include tablet {
            width: 100%;
            padding: clamp(4px, 1.172vw, 12px);
            background-color: var(--bg-d);
            justify-content: center;
            color: var(--cl-h);
        }
    }

    &__basket {
        display: none;

        @include mobile {
            position: relative;
            display: flex;
        }

        &-counter {
            position: absolute;
            right: -5px;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 14px;
            height: 14px;
            border-radius: 100%;
            background-color: var(--bg-c);
            font-size: 9px;
            line-height: 100%;
            letter-spacing: 0.03em;
            font-weight: 600;
            color: var(--cl-a);
        }

        svg {
            fill: var(--cl-b);
        }
    }

    &__cart {
        position: relative;

        @include small-tablet {
            display: contents;

            .btn-cart {
                display: none;
            }
        }
    }

    &__search {
        @include for-tablet { 
            max-width: clamp(290px, 39.113vw, 485px);
        }

        @include tablet { 
            @include for-mobile { 
                max-width: fit-content;
            }
        }
        
        @include for-mobile { 
            width: 100%;
            display: flex;
            align-items: center;
        }

        @include mobile { 
            order: 1;
        }
    }

    &__nav {
        @include for-tablet {
            .menu {
                display: flex;
                align-items: center;
                justify-content: space-between;
                border: 1px solid var(--br-c);
                border-radius: 12px;
    
                .menu-item {
                    position: relative;
                    flex-grow: 1;
                    border-left: 1px solid var(--br-d);

                    &:nth-last-child(2) a {
                        border-top-right-radius: 12px;
                        border-bottom-right-radius: 12px;
                    }

                    &:hover {
                        .sub-menu {
                            width: max-content;
                            opacity: 1;
                            visibility: visible;
                            max-height: initial !important;
                        }
                    }
                }
    
                .menu-item:first-child,
                .menu-item:last-child {
                    border-left: none;
                }

                .menu-item:first-child {
                    .menu-link {
                        &:hover,
                        &:active {
                            background-color: var(--bg-g);;
                            color: var(--cl-a);
                            border-top-left-radius: 12px;
                            border-bottom-left-radius: 12px;
                        }
                    }
                }

                .menu-item:nth-last-child(-n+3):hover {
                    .sub-menu {
                        left: initial;
                        right: 0;
                    }
                }
    
                .menu-link {
                    justify-content: center;
                    width: 100%;
                    padding: 11px 0;
                    font-size: clamp(14px, 1.29vw, 16px);
                    line-height: 137%;
                    font-weight: 500;
                    transition: all 0.3s;
                    text-wrap: nowrap;

                    &.sale {
                        background-color: var(--bg-f);
                        border-radius: 12px;
                        color: var(--cl-a);
                    }
    
                    &:hover,
                    &:active {
                        background-color: var(--bg-g);;
                        color: var(--cl-a);
                    }
                }
            }

            .menu-button {
                display: none;
            }

            .sub-menu {
                position: absolute;
                opacity: 0;
                visibility: hidden;
                background-color: #fff;
                top: 100%;
                left: 0;
                padding: clamp(30px, 2.083vw, 40px) clamp(40px, 3.385vw, 65px);
                border: 1px solid var(--br-c);
                border-radius: 0 0 7px 7px;
                box-shadow: 0 4px 10px #00000040;
                z-index: 2;
                display: grid;
                grid-template-columns: repeat(2, 1fr);
                gap: 25px clamp(65px, 8.594vw, 165px); 

                a {
                    padding: 10px 0;
                    display: flex;
                    align-items: center;
                    gap: 16px;
                    font-size: 16px;
                    line-height: 100%;
                    letter-spacing: .03em;
                    text-wrap: nowrap;
                    transition: all .3s;

                    &:hover,
                    &:active {
                        color: var(--cl-i);
                    }
                }
            }
        }

        @include tablet{
            width: 100%;
            overflow-y: auto;

            &::-webkit-scrollbar {
                display: none;
            }

            .menu {
                width: 100%;
                display: flex;
                flex-direction: column;
    
                .menu-item {
                    position: relative;
                    padding: 17px 0;
                    display: grid;
                    grid-template-columns: 1fr auto;
                    align-items: center;
                    border-top: 1px solid var(--br-f);
                    transition: all 0.2s ease;

                    &:first-child {
                        border-color: transparent;                    
                    }

                    &.menu-has-child.active {
                        border-color: transparent;
                        padding-top: 0;

                        .menu-item-wrapp {
                            padding: 17px 8px;
                            border-radius: 12px;
                            background-color: var(--bg-h);
                            flex-direction: row-reverse;
                            gap: 10px;

                            & > a {
                                color: var(--cl-g);
                            }
                        }

                        .menu-button svg {
                            transform: scale(-1);
                            fill: var(--cl-g);
                        }
                    }
                }
    
                .menu-link {
                    width: 100%;
                    font-size: 12px;
                    line-height: 137%;
                    font-weight: 500;
                    transition: all 0.3s;
                    text-wrap: nowrap;

                    &.sale {
                        color: var(--bg-f);
                    }
                }
                
                .menu-item-wrapp {
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    transition: all 0.2s ease;
                }
            }

            .sub-menu {
                grid-column: 1 / -1;
                transition: all 0.2s ease;

                a {
                    width: 100%;
                    padding: 17px 40px;
                }
            }

            .menu-button {
                svg {
                    fill: #9F9F9F;
                }
            }
        }
    }

    .burger {
        justify-self: end;

        @include for-tablet {
            display: none;
        }

        @include tablet {
            @include burger;
        }
    }
}