@use '../utils' as *;

/*----------------------------------------*/
/*  02. HEADER CSS
/*----------------------------------------*/


.header {
    &__top {
        &-left {
            @media #{$md} {
                text-align: center;
            }
            & span {
                color: var(--tp-common-white);
                font-size: 13px;
                & strong {
                    font-weight: 400;
                    color: var(--tp-text-1);
                    font-size: 13px;
                }
            }
        }
        &-right {
            justify-content: end;
            @media #{$md} {
                justify-content: center;
            }
        }
        &-link {
            & a {
                color: var(--tp-common-white);
                display: inline-block;
                font-size: 13px;
                margin-left: 25px;
                &:hover {
                    color: var(--tp-heading-secondary);
                }
                &:first-child {
                    margin-left: 0;
                }
            }
        }
        &-price {
            & .nice-select {
                background: var(--tp-heading-primary);
                color: #fff;
                border: none;
                font-size: 13px;
                height: 40px;
                width: 60px;
                padding-right: 16px;
                font-weight: 400;
                margin-left: 5px;
                &::after {
                    height: 6px;
                    margin-top: -5px;
                    right: 3px;
                    width: 6px;
                    border-bottom: 1px solid #B0AFCC;
                    border-right: 1px solid #B0AFCC;
                }
                & .list {
                    background: var(--tp-common-white);
                    box-shadow: 0px 8px 20px rgba(61, 110, 168, 0.1);
                    border-radius: 0px 0px 5px 5px !important;
                    color: var(--tp-text-2);
                    width: 65px;
                    padding: 0 0 20px 0;
                }
                & .option {
                    margin-bottom: -13px;
                    &:hover {
                        color: var(--tp-heading-secondary);
                    }
                }
            }
        }
    }
    &__lang {
        position: relative;
        z-index: 99;
        padding: 7px 0;
        &:hover {
            & .header__lang-select {
                opacity: 1;
                visibility: visible;
                top: 100%;
                & i {
                    transform: rotate(180deg);
                    color: var(--tp-text-primary);
                }
            }
            & .header__lang-submenu {
                visibility: visible;
                opacity: 1;
                transform: perspective(400px) rotateX(0deg);
            }
        }
        &-select {
            color: var(--tp-common-white);
            padding-left: 15px;
            margin-left: 15px;
            position: relative;
            &::before {
                position: absolute;
                content: '';
                left: 0;
                background-color: #5E5AA3;
                height: 15px;
                width: 1px;
                top: 50%;
                transform: translateY(-50%);
            }
            & i {
                font-size: 14px;
                margin-left: 2px;
                color: #B0AFCC;
            }
        }
        &-submenu {
            position: absolute;
            top: 110%;
            left: 0px;
            width: 120px;
            background: var(--tp-common-white);
            z-index: 9;
            padding: 14px 16px;
            border-radius: 4px;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease-out 0s;
            box-shadow: 0px 8px 20px rgba(61, 110, 168, 0.1);
            border-radius: 0px 0px 5px 5px;
            & li {
                list-style: none;
                margin-bottom: 5px;
                &:last-child {
                    margin-bottom: 0;
                }
                & a {
                    font-size: 14px;
                    font-weight: 400;
                    &:hover {
                        color: var(--tp-heading-secondary);
                    }
                }
            }
        }
    }
    &__main-area {
        border: 1px solid #E6EAF0
    }
    &__menu {
       @at-root{
            .main-menu {
                & ul {
                    & li {
                        position: relative;
                        display: inline-block;
                        line-height: 1;
                        list-style: none;
                        &:hover {
                            &.has-dropdown {
                                & a {
                                    &::after {
                                        color: var(--tp-heading-secondary);
                                    }
                                }
                            }
                            & .sub-menu {
                                visibility: visible;
                                opacity: 1;
                                top: 100%;
                            }
                        }
                        & a {
                            display: inline-block;
                            font-weight: 500;
                            font-size: 16px;
                            padding: 32px 12px;
                            @media #{$xl} {
                                padding: 32px 10px;
                            }
                            &:hover {
                                color: var(--tp-heading-secondary);
                            }
                        }
                        &.has-dropdown {
                            & > a {
                                position: relative;
                                &::after {
                                    content: "\e94f";
                                    font-size: 14px;
                                    color: var(--tp-common-black);
                                    font-family: 'icon-dukamarket';
                                    font-weight: 400;
                                    margin-left: 6px;
                                    display: inline-block;
                                    font-weight: var(--tp-fw-bold);
                                }
                            }
                        }
                        &.has-megamenu {
                            position: static;
                        }
                        &.has-homemenu {
                            position: static;
                        }
                        & .sub-menu {
                            position: absolute;
                            top: 120%;
                            left: 0;
                            min-width: 270px;
                            padding: 30px 0;
                            background-color: var(--tp-common-white);
                            z-index: 2;
                            transition: opacity 0.4s cubic-bezier(0.19, 1, 0.22, 1), visibility 0.4s cubic-bezier(0.19, 1, 0.22, 1), transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
                            box-shadow: 0px 8px 20px rgba(61, 110, 168, 0.1);
                            border-radius: 0px 0px 10px 10px;
                            border-top: 2px solid var(--tp-heading-secondary);
                            opacity: 0;
                            visibility: hidden;
                            @include transition(.3s);
                            & > li {
                                margin: 0;
                                list-style: none;
                                padding: 0 20px 0 40px;
                                display: block;
                                & > a {
                                    display: block;
                                    font-family: var(--font-body);
                                    text-transform: none;
                                    padding: 10px 0;
                                    padding-left: 0px;
                                    color: #334763;
                                    font-size: var(--menu-font-size);
                                    font-weight: normal;
                                    white-space: normal;
                                    word-wrap: break-word;
                                    word-break: normal;
                                    transition: 0.3s;
                                    line-height: 131%;
                                    text-align: left;
                                    @include transition(.3s);
                                    &:hover {
                                        color: var(--tp-heading-secondary);
                                        padding-left: 8px;
                                    }
                                    &::before {
                                        display: none;
                                    }
                                    &::after {
                                        display: none;
                                    }
                                }
                            }
                        }
                        & .mega-menu {
                            padding: 35px 40px 26px 40px;
                            position: absolute;
                            top: 120%;
                            width: 1200px;
                            background-color: var(--tp-common-white);
                            left: 0;
                            right: 0;
                            z-index: 9999;
                            transform-origin: top;
                            display: flex;
                            justify-content: space-between;
                            flex: 0 0 auto;
                            margin: 0 auto;
                            box-shadow: 0px 8px 20px rgba(61, 110, 168, 0.1);
                            border-radius: 0px 0px 10px 10px;
                            border-top: 2px solid var(--tp-heading-secondary);
                            @media #{$xl} {
                                width: 100%;
                            }
                            & li {
                                width: 260px;
                                text-align: left;
                                padding-left: 0;
                                padding-right: 0;
                                & .mega-menu-title {
                                    display: inline-flex;
                                    align-items: center;
                                    font-weight: 600;
                                    font-size: 13px;
                                    position: relative;
                                    text-transform: uppercase;
                                    color: var(--tp-heading-secondary);
                                    font-family: 'Jost', sans-serif;
                                    margin-bottom: 10px;
                                    &:hover {
                                        padding-left: 0;
                                    }
                                }
                                & ul {
                                    padding-left: 0;
                                    text-align: left;
                                    & li {
                                        padding-left: 0;
                                        text-align: left;
                                        & a {
                                            position: relative;
                                            padding: 10px;
                                            font-size: 16px;
                                            font-weight: 400;
                                            color: var(--tp-text-body);
                                            text-transform: capitalize;
                                            text-align: start;
                                            margin: 0;
                                            padding-left: 0;
                                            &:hover {
                                                color: var(--tp-heading-secondary);
                                                padding-left: 8px;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        & .home-menu-style {
                            width: 100%;
                            & li {
                                display: inline-block;
                                padding: 0 10px;
                                width: 230px;
                                @media #{$xxl} {
                                    width: 220px;
                                }
                                @media #{$xl} {
                                    width: 175px;
                                }
                                & a {
                                    text-align: center;
                                    @include transition(.3s);
                                    &:hover {
                                        padding-left: 0px;
                                        transform: scale(.92);
                                    }
                                    & img {
                                        border: 1px solid #DEE2E68F;
                                        border-radius: 10px;
                                        width: 100%;
                                        display: block;
                                        margin-bottom: 25px;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        } 
    }
    &__info {
        justify-content: end;
        & a,
        & button {
            & i {
                height: 40px;
                width: 40px;
                border-radius: 50px;
                background-color: var(--tp-grey-3);
                text-align: center;
                line-height: 40px;
                color: var(--tp-theme-1);
                display: block;
            }
        }
        &-cart {
            position: relative;
            & span {
                position: absolute;
                font-size: 11px;
                background-color: red;
                color: var(--tp-common-white);
                height: 18px;
                width: 18px;
                text-align: center;
                line-height: 18px;
                display: block;
                border-radius: 50px;
                top: -2px;
                right: -3px;
            }
        }
    }
}
.sub-menu.mega-menu {
    background-repeat: no-repeat;
    background-position: right bottom;
}

// Search
.tpsearchbar {
	background-color: var(--tp-common-white);
	text-align: start;
	position: fixed;
	right: 0;
    left: 0;
    margin: 0 auto;
	top: 0;
	width: 100%;
	min-height: 320px;
	box-shadow: rgba(5, 13, 54, 0.05) 5px 15px 30px 0px;
	transition: all 0.3s cubic-bezier(0.785, 0.135, 0.15, 0.86);
	z-index: 9999999;
	padding: 30px;
	transform: translateY(-100%);
    &__title {
        font-size: 18px;
        color: var(--tp-theme-1);
        text-transform: uppercase;
        font-weight: 700;
        font-family: 'Quicksand', sans-serif;
        margin-bottom: 35px;
        @media #{$sm} {
            font-size: 12px;
        }
    }
    &.tp-searchbar-opened{
        transform: translateY(0); 
    }
    &__close {
        color: var(--tp-theme-1);
        font-size: 30px;
        background: var(--tp-theme-secondary);
        width: 35px;
        height: 35px;
        position: absolute;
        top: 15%;
        right: 15%;
        &:hover {
            color: var(--tp-heading-secondary);
        }
    }
    &__form {
        position: relative;
        & input {
            width: 100%;
            height: 45px;
            border: 1px solid var(--tp-border-1);
            padding: 10px 45px 10px 20px;
            color: var(--tp-theme-1);
            font-size: 16px;
            font-weight: 500;
            &::placeholder {
                font-size: 13px;
                color: #ACAFB7;
            }
        }
    }
    &__search-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        right: 25px;
        color: var(--tp-theme-1);
        font-size: 16px;
    }
}
.search-body-overlay {
	background-color: rgba(0, 0, 0, 0.5);
	height: 100%;
	width: 100%;
	position: fixed;
	bottom: 0;
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease-out 0s;
    &.opened {
        opacity: 1;
        visibility: visible;
    }
}

// cart
.tp-cart-toggle {
	font-size: 16px;
    line-height: 0;
}
.tp-cart-info-area {
    &.tp-sidebar-opened{
        transform: translateX(0); 
    }
}
.tp-sidebar-close {
	color: var(--tp-common-white);
	position: absolute;
	left: -35px;
	font-size: 21px;
	background: #171151;
	width: 35px;
	height: 35px;
}
.tpcartinfo {
    background-color: var(--tp-common-white);
    text-align: start;
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    box-shadow: rgba(5, 13, 54, 0.05) 5px 15px 30px 0px;
    transition: all 0.3s cubic-bezier(0.785, 0.135, 0.15, 0.86);
    z-index: 9999999;
    width: 380px;
    transform: translateX(100%);
    @media #{$xs} {
        width: 280px;
    }
    & .tp-shop-sidebar-opened {
        transform: translateX(0); 
    }
}
.tpcart {
    &__close {
        color: var(--tp-heading-secondary);
        right: 30px;
        font-size: 18px;
        width: 35px;
        height: 35px;
        position: absolute;
        top: 8px;
        z-index: 2;
        @media #{$xs} {
            width: 30px;
            height: 30px;
        }
    }
}
.cartbody-overlay {
	background-color: rgba(0, 0, 0, 0.5);
	height: 100%;
	width: 100%;
	position: fixed;
	top: 0;
	z-index: 99;
	left: 0;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease-out 0s;
    &.opened {
        opacity: 1;
        visibility: visible;
    }
}
.tpcart {
    float: none;
	height: 100%;
	overflow: hidden;
	position: relative;
	display: -webkit-box;
	display: -moz-box;
	display: -ms-flexbox;
	display: -webkit-flex;
	display: flex;
	flex: 1 1 auto;
	align-items: stretch;
	flex-direction: column;
    &__product {
        position: relative;
        display: flex;
        flex: 1 1 auto;
        align-items: stretch;
        flex-direction: column;
        height: 100%;
        justify-content: space-between;
        padding: 0 30px;
    }
    &__title {
        padding: 16px 30px;
        background-color: var(--tp-grey-1);
        font-weight: 700;
        font-size: 14px;
        color: var(--tp-heading-primary);
        text-transform: uppercase;
        margin-bottom: 20px;
    }
    & ul {
        & li {
            list-style: none;
            padding-top: 15px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--tp-border-1);
        }
    }
    &__item {
        display: flex;
        align-items: center;
    }
    &__img {
        margin-right: 20px;
        position: relative;
        @media #{$xs} {
            margin-right: 4px;
        }
        & img {
            width: 70px;
            border-radius: 10px;
        }
    }
    &__del {
        position: absolute;
        color: var(--tp-heading-secondary);
        left: 0;
        top: 0;
    }
    &__content-title {
        font-size: 14px;
        font-weight: 400;
        color: var(--tp-heading-primary);
        & a {
            &:hover {
                color: var(--tp-heading-secondary);
            }
        }
    }
    &__cart-price {
        font-weight: 600;
        font-size: 12px;
        color: var(--tp-heading-primary);
        & .new-price {
            color: var(--tp-heading-secondary);
        }
    }
    &__total-price {
        font-weight: 600;
        font-size: 14px;
        text-transform: uppercase;
        color: var(--tp-heading-primary);
        margin-bottom: 25px;
        padding-top: 25px;
        border-top: 1px solid var(--tp-border-1);
        & .heilight-price {
            font-size: 18px;
            font-weight: 700;
        }
    }
    &__free-shipping {
        padding: 13px 30px;
        background-color: var(--tp-theme-5);
        @media #{$xs} {
            padding: 13px 15px;
        }
        & span {
            color: var(--tp-common-white);
            font-size: 14px;
            & b {
                font-weight: 600;
                text-transform: uppercase;
            }
        }
    }
    &__checkout {
        margin-bottom: 30px;
    }
}
.tpmobile-menu {
    padding: 20px 0;
    border-bottom: 1px solid var(--tp-border-1);
}

// mean menu
.tp-menu-toggle {
	font-size: 28px;
}
.tp-sidebar-close {
	color: #fff;
	position: absolute;
	left: -35px;
	font-size: 21px;
	background: #171151;
	width: 35px;
	height: 35px;
}
.body-overlay {
	background-color: rgba(0, 0, 0, 0.5);
	height: 100%;
	width: 100%;
	position: fixed;
	top: 0;
	z-index: 99;
	right: 0;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease-out 0s;
    &.opened {
        opacity: 1;
        visibility: visible;
    }
}
.mobile-menu-icon {
    font-size: 24px;
    color: var(--tp-heading-primary);
}


// tpsideinfo
.tpsideinfo {
    background: #2D2A6E;
	position: fixed;
	left: 0;
	top: 0;
	height: 100%;
	padding: 30px;
	width: 350px;
    transform: translateX(-120%);
    transition: .3s;
    z-index: 999;
    overflow-y: scroll;
    @media #{$xs} {
        width: 275px;
    }
    &.tp-sidebar-opened{
        transform: translateX(0); 
    }
    &__close {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        color: var(--tp-common-white);
        width: 100%;
        display: block;
        min-height: 45px;
        text-transform: uppercase;
        font-size: 13px;
        font-weight: 600;
        background-color: var(--tp-heading-secondary);
    }
    &__search-title {
        color: var(--tp-common-white);
        font-size: 13px;
        text-transform: uppercase; 
    }
    &__search {
        & form {
            position: relative;
            padding-top: 13px;
            padding-bottom: 20px;
            & input {
                width: 100%;
                height: 45px;
                border-radius: 3px;
                font-size: 14px;
                border: 1px solid transparent;
                background: #F3F3F9;
                padding: 10px 20px;
                padding-right: 45px;
                &::placeholder {
                    color: var(--tp-border-2);
                }
            }
        }
        & button {
            position: absolute;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
        }
    }
    &__nabtab {
        & .nav-link.active {
            border: 0;
            padding: 10px 15px;
            position: relative;        
            text-transform: uppercase;
            font-size: 13px;
            font-weight: 500;
            
            border-radius: 3px;
            background-color: var(--tp-heading-secondary);
        }
        & .nav-link {
            border: 0;
            padding: 10px 15px;
            position: relative;        
            text-transform: uppercase;
            font-size: 13px;
            font-weight: 500;
            border-radius: 3px;
            color: var(--tp-theme-1);
            background-color: var(--tp-common-white);
        }
        & button {
            width: 100%;
        }
        & .nav {
            & li {
                display: inline-block;
                width: 49%;
                margin-right: 4px;
                &:last-child {
                    margin-right: 0;
                }
            }
        }
        & .mega-menu-title {
            color: var(--tp-heading-secondary);
            font-size: 13px;
            text-transform: uppercase;
        }
        & .mean-container .mean-nav ul {
            background-image: none !important;
        }
        & .home-menu-style {
            & li {
                width: 50% !important;
                & a { 
                    font-size: 13px !important;
                    font-weight: 400 !important;
                }
            }
        }
    }
    &__account-link,
    &__wishlist-link {
        border-bottom: 1px #4D49A1 dotted;
        padding-top: 5px;
        padding-bottom: 5px;
        & a {
            font-size: 16px;
            color: var(--tp-common-white);
            &:hover {
                color: var(--tp-heading-secondary);
                & i {
                    color: var(--tp-heading-secondary);
                }
            }
            & i {
                font-size: 18px;
                color: var(--tp-common-white);
                line-height: 35px;
                text-align: center;
                margin-right: 10px;
            }
        }
    }
}
.tpsidebar-categories {
    & ul {
        & li {
            list-style: none;
            display: block;
            text-align: left;
            list-style: none;
            text-transform: capitalize;
            padding: 5px 0px 10px 0;
            border-bottom: 1px #4D49A1 dotted;
            font-family: Jost;
            & a {
                color: var(--tp-common-white);
            }
        }
    }
}
.secondary-header,
.secondary-mobile-menu {
    border-bottom: none;
}

.header-three {
    &__search {
        & form {
            position: relative;
            & input {
                height: 40px;
                width: 260px;
                border-radius: 30px;
                border: none;
                background-color: #F4F4F4;
                display: block;
                padding: 5px 20px 5px 45px;
                @include tp-placeholder {
                    font-weight: 400;
                    font-size: 13px;
                    color: #79819C;
                }
            }
            & i {
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                left: 20px;
                margin-right: 8px;
                font-size: 16px;
                color: var(--tp-common-black);
            }
        }
    }
}
.header-logo-border {
    padding: 30px 0;
    border-bottom: 1px solid var(--tp-border-1);
}
.mainmenu-three {
    & ul {
        & li {
            a {
                padding: 22px 12px;
            }
        }
    }
}
.header-sticky {
    position: fixed;
    left: 0;
    margin: auto;
    top: 0;
    width: 100%;
    box-shadow: 0 0 60px 0 rgba(0, 0, 0, 0.07);
    z-index: 99999;
    animation: 300ms ease-in-out 0s normal none 1 running fadeInDown;
    background: var(--tp-common-white);
}
