#header {
    left: 0;
    right: 0;

    // position: fixed;
    top: 0;
    transition: 0.3s ease;
    z-index: 999;

    // .sticky & {
    // 	background: $white;

    // 	@include breakpoint(lg) {
    // 		padding: 23px 0 24px 0;
    // 	}
    // }

    .container {
        position: relative;
    }

    // .container {
    // 	display: flex;
    // 	justify-content: space-between;
    // 	position: relative;

    // 	.sticky & {
    // 		@include breakpointMax(lg) {
    // 			align-items: center;
    // 		}
    // 	}
    // }
}

.header-top {
    background: $light-grey;
    padding: 6px 0;

    .container {
        @include breakpoint(lg) {
            align-items: center;
            display: flex;
            justify-content: space-between;
        }
    }

    a {
        font-family: $font-family-base;
        font-style: italic;
        font-weight: 600;
        font-size: 12px;
    }

    // Add a divider lines to header links.
    li a + a,
    .header-top-left li + li a {
        border-left: 1px solid rgba($gray-800, 0.6);
        margin-left: 12px;
        padding-left: 12px;

        @include breakpoint(lg) {
            margin-left: 15px;
            padding-left: 15px;
        }
    }

    &-left {
        display: none;
        margin-bottom: 10px;

        @include breakpoint(lg) {
            display: block;
            margin-bottom: 0;
        }

        ul {
            @extend %listreset;

            display: flex;
            text-transform: uppercase;

            li {
                letter-spacing: 1px;
                line-height: 1.3;
                margin-bottom: 0;

                // & + li {
                //     &::before {
                //         background: $mid-grey;
                //         content: '';
                //         display: inline-block;
                //         height: 12px;
                //         margin: 6px 16px 0;
                //         vertical-align: top;
                //         width: 2px;
                //     }
                // }
            }
        }
    }

    &-right {
        display: flex;
        flex-grow: 1;
        justify-content: flex-end;

        @include breakpoint(lg) {
            // justify-content: flex-end;
        }

        > ul {
            @extend %listreset;

            display: flex;

            &:has(.header-multi-login) {
                justify-content: space-between;
                width: 100%;
            }

            > li {
                align-items: center;
                display: flex;
                letter-spacing: 1px;
                line-height: 1.3;
                margin: 0;

                & + li {
                    margin-left: 16px;

                    @include breakpoint(lg) {
                        margin-left: 20px;
                    }

                    @include breakpoint(xl) {
                        margin-left: 32px;
                    }
                }

                .custom-select {
                    .nice-select {
                        background: transparent;
                        min-width: 0;
                        position: relative;
                        z-index: 10;

                        @include breakpointMax(lg) {
                            height: 24px;
                            width: 24px;
                        }

                        &.open {
                            .current {
                                color: $primary;
                            }
                        }

                        &:has(.list) {
                            .current {
                                &:hover {
                                    color: $primary;
                                }
                            }
                        }

                        .current {
                            background: transparent;
                            color: $text;
                            font-size: 12px;
                            font-style: italic;
                            font-weight: 600;
                            letter-spacing: 3px;
                            line-height: 2;
                            margin-right: 5px;
                            padding: 0 0 0 30px;
                            text-transform: uppercase;

                            @include breakpointMax(lg) {
                                font-size: 0;
                            }

                            &::before {
                                background-repeat: no-repeat;
                                background-size: 100%;
                                border: none;
                                height: 24px;
                                left: 0;
                                margin: 0;
                                position: absolute;
                                right: auto;
                                top: 0;
                                transform: none;
                                width: 24px;
                            }
                        }

                        .list {
                            top: 42px;
                        }
                    }
                }

                &.header-language {
                    .custom-select {
                        .nice-select {
                            &:has(.list):hover,
                            &.open {
                                .current {
                                    &::before {
                                        background: url('assets/images/icon-country-green.svg');
                                        margin: 0;
                                    }
                                }
                            }

                            .current {
                                &::before {
                                    background: url('assets/images/icon-country.svg');
                                }
                            }

                            .list {
                                min-width: 160px;
                            }
                        }
                    }
                }

                &.header-country {
                    .custom-select {
                        .nice-select {
                            &:has(.list):hover,
                            &.open {
                                .current {
                                    &::before {
                                        background: url('assets/images/icon-pin-map-green.svg');
                                        margin: 0;
                                    }
                                }
                            }

                            &:not(:has(.list)) {
                                cursor: default !important;
                            }

                            .list {
                                max-height: none;
                                padding: 5px;
                            }

                            .current {
                                &::before {
                                    background: url('assets/images/icon-pin-map.svg');
                                }
                            }
                        }
                    }
                }

                > a {
                    align-items: center;
                    display: inline-flex;
                    font-size: 12px;
                    font-style: italic;
                    font-weight: 600;
                    letter-spacing: 1px;
                    line-height: 1.3;
                    margin-right: 5px;
                    text-transform: uppercase;

                    // & + a {
                    //     margin: 0 0 0 5px;
                    // }

                    img {
                        margin-right: 8px;
                    }
                }
            }
        }
    }

    .cart-nav {
        margin-left: 16px;

        @include breakpoint(lg) {
            margin-left: 32px;
        }

        .cart-opener {
            align-items: center;
            display: flex;
            font: 600 italic 12px/2 $font-family-secondary;
            letter-spacing: 3px;
            text-decoration: none;

            img {
                margin-right: 8px;
            }

            span {
                border: none;
            }

            &:hover {
                span {
                    border: none;
                }
            }
        }
    }
}

.header-middle {
    padding: 18px 0;

    @include breakpoint(lg) {
        padding: 20px 0;
    }

    .container {
        @include breakpoint(md) {
            align-items: center;
            display: flex;
            justify-content: space-between;
        }
    }

    .logo {
        position: relative;
        z-index: 9;

        @include breakpointMax(lg) {
            max-width: 144px;
        }

        img {
            @include breakpointMax(xl) {
                max-width: 205px;
            }

            @include breakpointMax(lg) {
                max-width: 144px;
            }
        }

        sub {
            bottom: -19px;
            font: 600 italic 18px/1.5 $font-family-secondary;
            text-transform: uppercase;

            @include breakpointMax(lg) {
                display: none;
            }
        }
    }

    .search {
        @include breakpointMax(lg) {
            margin-right: 80px;
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
        }

        .search-opener {
            @include breakpointMax(lg) {
                font-size: 0;
            }
        }
    }
}

.header-bottom {
    background: $light-grey;
    padding: 7px 0;
    text-transform: uppercase;

    @include breakpoint(lg) {
        padding: 13px 0;
    }

    .container {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;

        @include breakpoint(lg) {
            justify-content: space-between;
        }
    }

    ul {
        @extend %listreset;

        &.social-networks {
            display: flex;
            justify-content: center;

            // margin-bottom: 10px;
            order: 1;
            width: 100%;

            @include breakpoint(lg) {
                // margin-bottom: 0;
                order: 0;
                width: auto;
            }

            li {
                & + li {
                    margin-left: 48px;
                }

                a {
                    &:hover {
                        opacity: 0.7;
                    }
                }
            }
        }
    }

    .header-text {
        // display: flex;
        // align-items: flex-end;
        font-family: $font-family-secondary;
        font-weight: 600;
        margin-bottom: 7px;
        text-align: center;
        width: 100%;

        @include breakpoint(lg) {
            margin: 0 0 0 60px;
            text-align: left;
            width: auto;
        }

        .learn-more {
            font-size: 16px;
            font-style: italic;
            letter-spacing: 0.015em;
            line-height: 2.5;
            margin-left: 15px;
            text-decoration: underline;

            @include breakpointMax(lg) {
                display: none;
            }
        }
    }

    p {
        display: inline;
        font-size: 16px;
        letter-spacing: 1px;

        // line-height: 2.5;
        line-height: 1.5;
        margin-bottom: 0;

        @include breakpoint(lg) {
            font-size: 20px;
            line-height: 2;
        }
    }
}

#nav {
    font-family: $font-family-secondary;
    text-transform: uppercase;

    @include breakpoint(lg) {
        align-items: center;
        display: flex;
        justify-content: flex-end;
    }

    .drop {
        background: $white;
        bottom: 0;
        left: 0;
        padding: 55px 0 0;
        position: fixed;
        top: 37px;
        transform: translateX(-100vw);
        transition: transform 0.4s linear;
        width: 100%;
        z-index: 5;

        @include breakpoint(lg) {
            background: transparent;
            padding: 0;
            position: static;
            transform: none;
        }

        ul {
            @extend %listreset;

            @include breakpoint(lg) {
                display: flex;
            }

            > li {
                position: relative;

                @include breakpoint(lg) {
                    margin: 0 0 0 30px;
                }

                &:hover {
                    > a {
                        @include breakpoint(lg) {
                            color: $primary;

                            &::after {
                                width: 100%;
                            }
                        }
                    }

                    ul {
                        @include breakpoint(lg) {
                            display: block;
                            opacity: 1;
                            transform: translateY(0);
                            transition: all 0.3s ease-in-out;
                            visibility: visible;
                        }
                    }
                }

                & + li {
                    @include breakpoint(lg) {
                        border: none;
                    }
                }

                &.menu-item-has-children {
                    > a {
                        position: relative;
                        z-index: 1;

                        @include breakpoint(lg) {
                            padding-right: 28px;
                        }

                        &::before {
                            @include breakpoint(lg) {
                                border-color: $grey-800 $grey-800 transparent
                                    transparent;
                                border-style: solid;
                                border-width: 2px 2px 0 0;
                                content: '';
                                height: 10px;
                                position: absolute;
                                right: 4px;

                                // top: 50%;
                                top: 4px;
                                transform: rotate(136deg);
                                width: 10px;

                                // margin: -4px 0 0;
                            }
                        }
                    }

                    .arrow {
                        font-size: 0;
                        height: 26px;
                        position: absolute;
                        right: 15px;
                        top: 10px;
                        width: 30px;
                        z-index: 1;

                        @include breakpoint(lg) {
                            display: none;
                            margin: -8px -8px 0 0;
                        }

                        &::before {
                            border-color: $grey-800 $grey-800 transparent
                                transparent;
                            border-style: solid;
                            border-width: 1px 1px 0 0;
                            content: '';
                            height: 10px;
                            margin: -10px 0 0 -5px;
                            position: absolute;
                            right: 10px;
                            top: 50%;
                            transform: rotate(136deg);
                            transition: transform 0.4s ease;
                            width: 10px;

                            @include breakpoint(lg) {
                                display: none;

                                // border-color: $text $text transparent transparent;
                            }
                        }
                    }

                    &.submenu-active {
                        .arrow {
                            top: 9px;

                            &::before {
                                border-color: $primary $primary transparent
                                    transparent;
                                margin-top: -3px;
                                transform: rotate(-45deg);
                            }
                        }
                    }

                    &:hover {
                        > a {
                            &::before {
                                border-color: $primary $primary transparent
                                    transparent;
                            }
                        }
                    }
                }

                &.current-menu-item,
                &.current-menu-parent {
                    > a {
                        color: $primary;

                        &::before {
                            border-color: $primary $primary transparent
                                transparent;
                        }

                        &::after {
                            width: 100%;
                        }
                    }

                    // .arrow{
                    // 	&:before {
                    // 		border-color: $orange $orange transparent transparent;
                    // 	}
                    // }
                }

                > a {
                    color: $text;
                    display: block;
                    font-size: 18px;
                    font-style: italic;
                    font-weight: 600;
                    line-height: 1.1;
                    padding: 10px 40px 10px 18px;
                    position: relative;

                    @include breakpoint(lg) {
                        padding: 0;
                    }

                    &::after {
                        background: $white;
                        border-radius: 10px;
                        bottom: 0;
                        content: '';
                        display: none;
                        height: 2px;
                        left: 0;
                        position: absolute;
                        right: 0;
                        transition: width 0.2s linear;
                        width: 0;

                        @include breakpoint(lg) {
                            background: $primary;
                        }
                    }
                }
            }

            ul {
                display: none;
                margin: 6px 0 20px 18px;
                position: relative;

                @include breakpoint(lg) {
                    background: $white;
                    border: none;
                    border-radius: 0;
                    box-shadow: 0 2px 8px rgb(0 0 0 / 20%);
                    display: block;
                    left: 0;
                    margin: 0;
                    opacity: 0;
                    padding: 15px 16px;
                    position: absolute;
                    text-align: left;
                    top: 44px;
                    transform: translateY(-30%);
                    visibility: hidden;
                    width: 230px;
                    z-index: 1;
                }

                &::before {
                    content: '';
                    height: 29px;
                    left: 0;
                    position: absolute;
                    right: 0;
                    top: -29px;
                }

                li {
                    margin: 0;
                    width: 100%;

                    & + li {
                        margin: 16px 0 0;

                        @include breakpoint(lg) {
                        }
                    }

                    &:hover,
                    &.current-menu-item {
                        > a {
                            color: $primary;
                        }
                    }

                    a {
                        display: block;
                        font: 18px/1.5 $font-family-base;
                        padding: 0;
                        text-transform: initial;

                        &::after {
                            display: none;
                        }
                    }
                }
            }
        }
    }

    .drop-wrap {
        // height: calc(100vh - 50px);
        overflow: hidden auto;

        @include breakpoint(lg) {
            align-items: center;
            background: transparent;
            display: flex;
            height: auto;
            justify-content: flex-end;
            overflow: visible;
            padding-left: 20px;
        }
    }
}

#primary-menu li {
    align-items: center;
    display: flex;
}

.book-now-btn {
    margin-left: 1rem;

    .button {
        border-radius: 0;
        min-width: auto !important;
        padding: 10px 14px;

        &::before {
            right: -8px;
            bottom: -8px;
        }
    }
}

#nav {
    .drop {
        .drop-wrap {
            margin: 1rem 0;
        }

        .book-now-btn {
            @include breakpoint(lg) {
                display: none;
            }
        }
    }

    > .book-now-btn {
        display: none;
        margin-left: 2rem;

        @include breakpoint(lg) {
            display: block;
        }
    }
}

.nav-opener {
    height: 21px;
    outline: none;
    overflow: hidden;
    position: absolute;
    right: 37px;
    text-indent: -9999px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;

    @include breakpoint(lg) {
        display: none;
    }

    &::before,
    &::after,
    span {
        background: $text;
        border-radius: 50px;
        height: 2px;
        left: 0;
        position: absolute;
        top: 9px;
        transition: transform 0.3s ease;
        width: 100%;
    }

    &::before,
    &::after {
        content: '';
        top: 1px;
    }

    &::after {
        top: 17px;
    }

    // &:hover{
    // 	&:before,
    // 	&:after,
    // 	span {
    // 		background: $text;
    // 	}
    // }
}

.nav-close {
    height: 18px;
    outline: none;
    overflow: hidden;
    position: absolute;

    // right: 25px;
    right: 37px;
    text-indent: -9999px;
    top: 25px;
    width: 18px;

    &::before,
    &::after {
        background: $text;
        border-radius: 50px;
        content: '';
        height: 1px;
        left: 0;
        position: absolute;
        top: 9px;
        transition: transform 0.3s ease;
        width: 100%;

        @include breakpoint(lg) {
            display: none;
        }
    }

    &::before {
        transform: rotate(-45deg);
    }

    &::after {
        transform: rotate(45deg);
    }
}

.nav-active {
    &.sticky {
        #nav .drop {
            @include breakpoint(lg) {
                padding-top: 40px;
            }
        }
    }

    #nav {
        .drop {
            transform: translateX(0);

            @include breakpoint(lg) {
                padding-top: 70px;
            }
        }
    }
}

.admin-bar {
    #nav .drop {
        top: 0;

        @media only screen and (width <= 782px) {
            top: 32px;
        }
    }
}

.search-opener {
    display: inline-block;
    font: italic 600 18px/1.3 $font-family-secondary;
    margin-left: 25px;
    padding-bottom: 1px;
    padding-left: 28px;
    position: relative;
    text-transform: uppercase;
    vertical-align: top;

    @include breakpoint(lg) {
        vertical-align: middle;
    }

    &::before {
        background: url('assets/images/icon-search.svg') no-repeat;
        content: '';
        height: 24px;
        left: 0;
        position: absolute;
        top: 0;
        width: 24px;
    }
}

.cart-drop {
    background: $white;
    border-radius: 0;
    box-shadow: 0 4px 8px rgb(0 0 0 / 9%);
    display: none;
    padding: 24px 0 20px 13px;
    position: absolute;

    // right: -30px;
    right: 0;
    top: 60px;
    width: 217px;
    z-index: 30;

    @media only screen and (width >= 375px) {
        width: 272px;
    }

    @include breakpoint(md) {
        right: 0;
        width: 415px;
    }

    @include breakpoint(lg) {
        top: 40px;
    }

    .header-cart-lists-wrap {
        margin-bottom: 14px;
    }

    .cart-list {
        max-height: 200px;
        overflow: hidden auto;
        padding-right: 13px !important;

        @include breakpoint(md) {
            padding-right: 38px !important;
        }
    }

    .woocommerce-mini-cart-item {
        display: block !important;
        margin-bottom: 0;
        padding-bottom: 15px;

        & + .woocommerce-mini-cart-item {
            border-top: 1px solid rgb(53 175 74 / 20%);
            margin-left: 0 !important;
            padding-top: 15px;
        }

        &:last-child,
        &:only-child {
            padding-bottom: 0;
        }

        .cart-item-wrapper {
            position: relative;

            @include breakpoint(md) {
                display: flex;
                flex-wrap: wrap;
            }

            .remove_from_cart_button {
                font-size: 0;
                height: 20px;
                position: absolute !important;
                right: 0;
                top: 0;
                width: 20px;

                @include breakpoint(md) {
                    right: -26px;
                    top: 4px;
                }

                &:hover {
                    background: none;

                    &::before,
                    &::after {
                        background: $primary;
                    }
                }

                &::before,
                &::after {
                    background: $black;
                    content: '';
                    height: 18px;
                    left: 10px;
                    position: absolute;
                    top: 1px;
                    transition: 0.3s ease;
                    width: 1px;
                }

                &::before {
                    transform: rotate(45deg);
                }

                &::after {
                    transform: rotate(-45deg);
                }
            }

            .icon-wrap {
                margin-bottom: 15px;
                margin-right: 11px;
                width: 56px;

                @include breakpoint(md) {
                    margin-bottom: 0;
                }

                a {
                    &:hover {
                        opacity: 0.7;
                    }
                }

                img {
                    border-radius: 0;
                }
            }

            .text-wrap {
                display: flex;
                flex-wrap: wrap;
                justify-content: space-between;
                width: 100%;

                @include breakpoint(md) {
                    width: calc(100% - 56px - 11px);
                }

                .text {
                    padding-right: 10px;

                    // width: calc(100% - 60px);
                    width: calc(100% - 70px);
                }

                .product-name {
                    font: 16px/1.5 $font-family-base;
                    margin-bottom: 3px;
                    text-transform: initial;

                    a {
                        color: $text-cart;

                        &:hover {
                            color: $primary;
                        }
                    }
                }

                .quantity {
                    color: $grey-60;
                    display: block;
                    font-size: 14px;
                    line-height: 1.42857;
                    text-transform: initial;
                }

                .price {
                    color: #323232;
                    font: italic 600 24px/1.3333 $font-family-secondary;
                    text-align: right;

                    // width: 90px;
                    width: 70px;
                }
            }
        }
    }

    .btn-list {
        .btn-view {
            // color: $primary;
            // font-size: 14px;
            // font-weight: 500;
            // line-height: 1.42857;
            text-transform: initial;
        }
    }
}

.header-search {
    // background: $white;
    background: #f5f5f5;
    display: none;
    left: 0;
    padding: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;

    // border-top: 1px solid transparent;

    &-form {
        padding-left: 15px;
        position: relative;

        &::before {
            background: rgba($text, 0.5);
            content: '';
            height: 25px;
            left: 3px;
            position: absolute;
            top: 6px;
            width: 1px;
        }
    }

    .search-form-wrap {
        padding-left: 30px;

        // max-width: 1000px;
        padding-right: 40px;
        position: relative;

        // @include breakpoint(md) {
        // 	padding-right: 40px;
        // }

        // @include breakpoint(lg) {
        // 	max-width: 870px;
        // }

        // @include breakpoint(xl) {
        // 	max-width: 1000px;
        // }

        &::before {
            background: url('assets/images/icon-search.svg') no-repeat;
            content: '';
            height: 24px;
            left: 0;
            position: absolute;
            top: 7px;
            width: 24px;
        }
    }

    input[type='search'] {
        background: transparent;
        border: none;
        color: $black;
        font-size: 14px;
        height: 37px;
        line-height: 1.8;
        padding: 0;

        @include placeholder {
            color: $black;
        }

        &:focus {
            background: transparent;
        }
    }
}

.search-close {
    font-size: 0;
    height: 30px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;

    &:hover {
        opacity: 0.7;
    }

    &::before,
    &::after {
        background: $grey-60;
        content: '';
        height: 20px;
        left: 13px;
        position: absolute;
        top: 5px;
        width: 2px;
    }

    &::before {
        transform: rotate(45deg);
    }

    &::after {
        transform: rotate(-45deg);
    }
}

.sticky {
    .header-search {
        border-top-color: rgb(53 175 74 / 20%);
        top: 66px;

        @include breakpoint(lg) {
            top: 83px;
            z-index: 999;
        }
    }
}
