@use '../../utils' as *;

/*----------------------------------------*/
/*  4.1 Main Menu
/*----------------------------------------*/

.header-sticky {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	opacity: 1;
	width: 100%;
	z-index: 10;
	visibility: visible;
    background: rgba(38, 37, 40, 0.9);
    box-shadow: 0 2px 6px 0 rgba(19, 19, 22, 0.08);
	animation: 0.95s ease 0s normal forwards 1 running headerSlideDown;
	-webkit-animation: 0.95s ease 0s normal forwards 1 running headerSlideDown;
    & .tp-header-menu > nav > ul > li > a {
        padding: 22px 0;
    }
    &.sticky-white-bg{
        background: rgba(255, 255, 255, 0.9);
        & .tp-header-menu > nav > ul > li > a {
            color: var(--tp-common-black);
        }
        & .tp-header-dropdown nav ul li.has-dropdown::after {
            color: var(--tp-common-black);
        }
        & .logo-white{
            display: none;
        }
        & .logo-black{
            display: block !important;
        }
        & .tp-header-lang a {
            color: rgba(0, 0, 0, 0.6);
            &.active{
                color: var(--tp-common-black);
            }
        }
        & .tp-header-bar button i {
            background-color: var(--tp-common-black);
        }
        & .tp-header-7-serach {
            color: var(--tp-common-black);
        }
        & .cr-header-login {
            & a{
                background: rgb(0, 0, 0);
                border-color: rgba($color: #000000, $alpha: 0.6);
                &:hover{
                    color: var(--tp-common-black);
                    background-color: transparent;
                }
            }
        }
        & .tp-header-btn-box{
            & .tp-btn-white-border{
                &:hover{
                    color: var(--tp-common-black);
                    border-color: rgba($color: #000000, $alpha: 0.6);
                }
            }
        }
        & .animated-border-box::before {
            background-image: conic-gradient(rgb(255, 255, 255), #000, rgb(255, 255, 255) 25%);
        }
        & .tp-btn-white-border.tp-btn-light-bg {
            color: #0E0F11;
            background-color: transparent;
            border: 1px solid rgba($color: #000000, $alpha: 0.1);
            &:hover{
                color: var(--tp-common-white);
                border-color: var(--tp-common-black);
                background-color: var(--tp-common-black);
            }
        }
    }
    &.tp-header-blur{
        &::after{
            position: absolute;
            content: "";
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            backdrop-filter: blur(40px);
            z-index: -1;
        }
    }
    &.tp-header-3-style {
        padding-top: 0;
        @media #{$lg,$md,$xs} {
            padding: 10px 0;
        }
    }
    &.tp-header-9-sticky{
        @media #{$lg,$md,$xs} {
            padding: 10px 0;
        }
    }
    &.tp-header-border {
        border-bottom: 0;
    }
    & .tp-header-logo {
        padding: 0;
    }
    & .tp-header-7-wrapper {
        padding: 0;
        padding-right: 0;
        border-radius: 0;
        background: initial;
        border: none;
        @media #{$lg,$md,$xs} {
            padding: 10px 0;
        }
    }
    &.tp-header-9-sticky{
        & .tp-header-9-logo{
            & .logo-1{
                display: none;
            }
            & .logo-2{
                display: block !important;
            }
        }
        & .tp-header-9-menu > nav > ul > li > a {
            padding: 25px 0;
            margin: 0 15px;
            color: var(--tp-common-black);
        }
        & .tp-header-9-menu > nav > ul > li {
            padding: 0;
        }
        & .tp-header-9-menu > nav > ul {
            padding: 0;
        }
        & .tp-header-9-box {
            margin-left: 0;
        }
        & .tp-header-9-search{
            & span{
                color: var(--tp-common-black);
            }
        }
        & .tp-header-9-btn{
            & .tp-btn-yellow-green {
                color: #fff;
                background-color: #2A4C3A;
            }
        }
    }
    &.tp-header-10-sticky{
        & .tp-header-10-wrapper {
            margin-top: 0;
            border-radius: 0;
            border: 0;
            box-shadow: none;
            background: transparent;
        }
    }
    &.tp-header-11-style{
        & .tp-header-10-wrapper {
            border: 0;
            background: 0;
            margin-top: 0;
            box-shadow: none;
            backdrop-filter: initial;
        }
    }
    &.tp-header-inner-style .tp-header-menu > nav > ul {
        padding: 0;
        border-radius: 0;
        display: inline-block;
        margin-bottom: 0;
        background-color: transparent;
    }
    &.tp-header-inner-style .tp-header-dropdown nav > ul > li .tp-submenu {
        top: 104%;
        & li{
            & .tp-submenu{
                top: 0;
            }
        }
    }
    &.tp-header-inner-style .tp-megamenu-wrapper {
        top: 104%;
    }
}
.sticky-white-bg{
    & .tp-megamenu-list ul li a {
        & span{
            font-weight: 700;
            &.new {
            color: rgb(182, 74, 222);
            background: rgb(182, 74, 222, 0.08);
            }
            &.pop{
                color: #0db50e;
                background-color: rgba($color: #0db50e, $alpha: 0.08);
            }
    }
    }
}
.tp-header{
    &-dropdown{
        & nav{
            & ul{
                & li{
                    position: relative;
                    list-style: none;
                    &.p-static{
                        position: static;
                    }
                    &.has-dropdown{
                        &::after{
                            content: "\f107";
                            font-size: 16px;
                            font-weight: 400;
                            margin-left: 2px;
                            display: inline-block;
                            color: var(--tp-common-white);
                            transition: all 0.3s 0s ease-out;
                            font-family: var(--tp-ff-fontawesome);
                        }
                        &:hover {
                            &::after {
                                transform: rotate(-180deg);
                            }
                        }
                    }
                    & .tp-submenu{
                        position: absolute;
                        top: 100%;
                        left: 0;
                        width: 260px;
                        z-index: 99;
                        opacity: 0;
                        padding: 12px 0;
                        transition: 0.5s;
                        text-align: start;
                        visibility: hidden;
                        border-radius: 14px;
                        transform-origin: 0 0;
                        transform: scale(1, 0);
                        backdrop-filter: blur(40px);
                        background: rgba(38, 37, 40, 0.9);
                        box-shadow: 0 20px 30px -8px rgba(19, 19, 22, 0.1);
                        & li{
                            width: 100%;
                            padding: 0 12px;
                            border-radius: 8px;
                            & a{
                                position: relative;
                                border-radius: 8px;
                                font-weight: 500;
                                font-size: 16px;
                                line-height: 1;
                                color: #bfbfc0;
                                padding: 12px 18px;
                                display: inline-block;
                                letter-spacing: -0.01em;
                                text-align: start;
                                width: 100%;
                                @media #{$x3l,$xxl,$xl}{
                                    font-size: 14px;
                                }
                            }
                            & .tp-submenu{
                                top: 0;
                                left: 100%;
                            }
                            &:hover{
                                & > a{
                                    background-color: #2c2b2e;
                                    color: var(--tp-common-white);
                                }
                            }

                            &.menu-item-has-children{
                                & > a{
                                    display: flex;
                                    align-items: center;
                                    justify-content: space-between;
                                    &::after{
                                        content: "\f107";
                                        font-size: 16px;
                                        font-weight: 400;
                                        margin-left: 2px;
                                        color: #bfbfc0;
                                        display: inline-block;
                                        transform: rotate(-90deg);
                                        transition: all 0.3s 0s ease-out;
                                        font-family: var(--tp-ff-fontawesome);
                                    }
                                }
                                &:hover {
                                    & a{
                                        &::after {
                                            transform: rotate(0deg);
                                            color: var(--tp-common-white);
                                        }
                                    }
                                }
                            }
                        }
                    }
                    &:hover > {
                        & .tp-submenu{
                            visibility: visible;
                            opacity: 1;
                            transform: scale(1);
                        }
                        & .tp-megamenu-wrapper{
                            visibility: visible;
                            opacity: 1;
                            transition-duration: .2s;
                            @include tp-transform(perspective(300px) rotateX(0deg));
                        }
                    }
                }
            }
        }
    }
}

.tp-megamenu{
    &-wrapper{
        position: absolute;
        transition: 0.3s;
        opacity: 0;
        visibility: hidden;
        padding-top: 45px;
        top: 100%;
        left: 0;
        right: 0;
        max-width: 1760px;
        margin: 0 auto;
        overflow: hidden;
        border-radius: 14px;
        transform-origin: top;
        transition-duration: 0.1s;
        @include tp-transform(perspective(300px) rotateX(-18deg));
        @media #{$x3l,$xxl,$xl}{
            max-width: calc(100% - 40px);
        }
        @media #{$lg,$md,$xs}{
            padding-top: 25px;
        }
        &.megamenu-black-bg{
            backdrop-filter: blur(40px);
            background: rgba(38, 37, 40, 0.9);
            box-shadow: 0 20px 30px -8px rgba(19, 19, 22, 0.1);
        }
        &.megamenu-white-bg{
            backdrop-filter: blur(40px);
            background: rgba(255, 255, 255, 0.9);
            box-shadow: 0 2px 6px 0 rgba(19, 19, 22, 0.1);
            & .tp-megamenu-title {
                color: #111013;
                border-bottom: 1px solid #F3F3F6;
            }
            & .tp-megamenu-list ul::after {
                background-color: #F3F3F6;
            }
            & .tp-megamenu-list ul li a {
                color: #636368;
            }
            & .tp-megamenu-list ul li a:hover {
                background-color: #f8f8fb;
                color: var(--tp-common-black);
            }
        }
    }
    &-title{
        font-weight: 600;
        font-size: 13px;
        line-height: 1;
        margin-bottom: 0;
        padding-left: 40px;
        padding-bottom: 25px;
        text-align: start;
        text-transform: uppercase;
        color: var(--tp-common-white);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        @media #{$xxl} {
            padding-left: 23px;
        }
        @media #{$xl}{
            padding-left: 20px;
        }
        @media #{$lg,$md,$xs}{
            padding-left: 20px;
        }
    }
    &-list{
        height: 100%;
        & ul{
            position: relative;
            height: 100%;
            padding-top: 18px;
            padding-bottom: 50px;
            &::after{
                position: absolute;
                content: '';
                top: 0;
                left: 0;
                width: 1px;
                height: 100%;
                background-color: rgba(255, 255, 255, 0.06);
                @media #{$lg,$md,$xs}{
                    display: none;
                }
            }
            & li{
                padding: 0px 20px;
                @media #{$x3l,$xxl,$xl}{
                    padding: 0px 10px;
                }
                &:not(:last-child){
                    margin-bottom: 10px;
                }
                & a{
                    position: relative;
                    width: 100%;
                    font-weight: 600;
                    font-size: 16px;
                    line-height: 1;
                    color: #bfbfc0;
                    padding: 12px 18px;
                    border-radius: 8px;
                    display: inline-block;
                    letter-spacing: -0.01em;
                    text-align: start;
                    @media #{$x4l,$x3l}{
                        font-size: 14px;
                    }
                    @media #{$xxl}{
                        font-size: 14px;
                        padding: 12px 12px;
                    }
                    @media #{$xl}{
                        font-size: 14px;
                        padding:12px 8px;
                    }
                    & span{
                        font-size: 13px;
                        line-height: 1;
                        font-weight: 800;
                        padding: 6px 8px;
                        border-radius: 20px;
                        display: inline-block;
                        margin-left: 3px;
                        text-transform: capitalize;
                        letter-spacing: .7px;
                        @media #{$xxl}{
                            font-size: 8px;
                            padding: 5px 6px;
                        }
                        @media #{$xl,$lg,$md,$xs}{
                            display: none;
                        }
                        &.hot{
                            color: #FF535B;
                            background-color: rgba($color: #FF535B, $alpha: 0.08);
                        }
                        &.new{
                            color: #fff669;
                            background-color: rgba($color: #fff669, $alpha: 0.08);
                        }
                        &.pop{
                            color: #19e41a;
                            background-color: rgba($color: #19e41a, $alpha: 0.08);
                        }
                    }
                    &:hover{
                        background-color: #2c2b2e;
                        color: var(--tp-common-white);
                    } 
                }
            }
        }
    }
    &-thumb{
        height: 100%;
        position: absolute;
        top: 0;
        right: 0;
        width: 17%;
        @media #{$lg,$md,$xs}{
            display: none;
        }
        & img{
            height: 100%;
            object-fit: cover;
            width: 100%;
            overflow:hidden;
        }
    }
}

.dropdown-white-bg {
    & nav ul li .tp-submenu {
        background: rgba(255, 255, 255, 0.9);
    }
    & nav ul li .tp-submenu {
        & li{
            & a{
                color: #636368;
            }
            &:hover {
                & > a {
                    background-color: #F8F8FB;
                    color: var(--tp-common-black);
                }
            }
            &.menu-item-has-children{
                & > a{
                    &::after{
                        color: #636368;
                    }
                }
                &:hover{
                    & > a{
                        &::after{
                            color: var(--tp-common-black);
                        }
                    }
                }
            }
        }
    }
}