@use '../utils' as *;

/*=============================
	02. Header
===============================*/
.transparent-header {
	position: absolute;
	left: 0;
	top: 0px;
	width: 100%;
	z-index: 9;
	height: auto;
    @media #{$xs} {
        top: 0;
    }
}
.tg-header {
    &__top {
        background-color: var(--tg-common-color-black-2);
        padding: 11px 0;
        @media #{$md} {
            display: none;
        }
        &-info {
            @include flexbox();
            align-items: center;
            gap: 10px 27px;
            @media #{$md} {
                display: none;
            }
            & li {
                @include flexbox();
                align-items: center;
                color: #E6EAEF;
                font-size: 14px;
                font-weight: var(--tg-fw-medium);
                gap: 7px;
                & img {
                    opacity: 0.6;
                }
                & i {
                    color: var(--tg-common-color-white);
                    font-size: 20px;
                }
                & a {
                    color: #E6EAEF;
                    &:hover {
                        color: var(--tg-common-color-white);
                    }
                }
                @media #{$md} {
                    &::after {
                        display: none;
                    }
                    &:last-child {
                        display: none;
                    }
                }
            }
        }
        &-right {
            @include flexbox();
            align-items: center;
            gap: 10px 27px;
            justify-content: flex-end;
            @media #{$md} {
                justify-content: center;
            }
        }
        &-social {
            @include flexbox();
            align-items: center;
            gap: 10px 12px;
            justify-content: flex-end;
            @media #{$xs} {
                justify-content: center;
            }
            & li {
                color: var(--tg-common-color-white);
                font-size: 14px;
                font-weight: var(--tg-fw-medium);
                &:first-child {
                    opacity: .5;
                }
                & a {
                    color: #E7EFFC;
                    &:hover {
                        color: var(--tg-common-color-white);
                    }
                }
            }
        }
    }
    &__phone {
            @include flexbox();
            align-items: center;
            gap: 10px;
            color: #E6EAEF;
            font-size: 14px;
            font-weight: var(--tg-fw-medium);
            & a {
                color: #E6EAEF;
                &:hover {
                    color: var(--tg-common-color-white);
                }
            }
            & img {
                opacity: .6;
            }
        }
    &__area {
        padding: 5px 0;
        @media #{$xl} {
            padding: 10px 0;
        }
        @media #{$lg} {
            padding: 20px 0;
        }
        & .mobile-nav-toggler {
            position: relative;
            font-size: 30px;
            cursor: pointer;
            line-height: 1;
            color: var(--tg-theme-primary);
            display: none;
            @media #{$lg} {
                display: block;
            }
        }
        &.sticky-menu {
            padding: 0 0;
            @media #{$lg} {
                padding: 20px 0;
            }
        }
    }
    &__style-two {
        & .tgmenu__search-form {
            width: 400px;
            @media #{$xl} {
                width: 290px;
            }
            @media #{$lg} {
                width: 400px;
            }
            @media #{$md} {
                width: auto;
            }
        }
        & .tgmenu__navbar-wrap {
            & ul {
                margin: 0 auto 0 50px;
                @media #{$xl} {
                    margin: 0 auto 0 25px;
                }
            }
        }
    }
}
.tgmenu {
    &__nav {
        @include flexbox();
        align-items: center;
        flex-wrap: wrap;
        justify-content: flex-start;
        @media #{$md} {
            justify-content: space-between;
        }
    }
    &__navbar-wrap {
        @include flexbox();
	    flex-grow: 1;
        & ul {
            @include flexbox();
            padding: 0;
            flex-direction: row;
            flex-wrap: wrap;
            margin: 0 auto 0 73px;
            @media #{$xl} {
                margin: 0 auto 0 20px;
            }
            & li {
                display: block;
                position: relative;
                list-style: none;
                & a {
                    font-size: 16px;
                    font-weight: var(--tg-fw-medium);
                    text-transform: capitalize;
                    color: var(--tg-heading-color);
                    font-family: var(--tg-heading-font-family);
                    padding: 37px 10px;
                    @include flexbox();
                    align-items: center;
                    line-height: 1;
                    position: relative;
                    z-index: 1;
                    @media #{$xl} {
                        padding: 37px 7px;
                    }
                }
                & .sub-menu {
                    position: absolute;
                    left: 0;
                    top: 100%;
                    min-width: 230px;
                    border: 1px solid #f5f5f5;
                    background: var(--tg-common-color-white);
                    margin: 0;
                    @include transform(scale(1, 0));
                    transform-origin: 0 0;
                    @include transition(0.3s);
                    -webkit-box-shadow: 0px 30px 70px 0px rgba(137, 139, 142, 0.15);
                    -moz-box-shadow: 0px 30px 70px 0px rgba(137, 139, 142, 0.15);
                    box-shadow: 0px 30px 70px 0px rgba(137, 139, 142, 0.15);
                    @include border-radius(6px);
                    padding: 18px 0;
                    display: block;
                    visibility: hidden;
                    opacity: 0;
                    z-index: 9;
                    & .sub-menu {
                        right: auto;
                        left: 100%;
                        top: 0;
                    }
                    & li {
                        margin-left: 0;
                        text-align: left;
                        display: block;
                        & a {
                            padding: 8px 15px 8px 25px;
                            line-height: 1.4;
                            display: block;
                            color: var(--tg-heading-color);
                            text-transform: capitalize;
                            font-size: 15px;
                        }
                        &:hover > a,
                        &.active > a {
                            color: var(--tg-theme-primary);
                        }
                    }
                }
                &:hover > .sub-menu {
                    opacity: 1;
                    visibility: visible;
                    transform: scale(1);
                }
            }
        }
        & > ul {
            & > li {
                &.active,
                &:hover {
                    & a {
                        color: var(--tg-theme-primary);
                    }
                }
            }
        }
    }
    &__main-menu {
        & li.menu-item-has-children {
            & .dropdown-btn {
                display: none;
            }
            & > a {
                &::after {
                    content: "\f105";
                    display: block;
                    font-family: "flaticon_skill_grow";
                    @include transform(rotate(90deg));
                    font-size: 14px;
                    font-weight: var(--tg-fw-bold);
                    margin-left: 6px;
                    @media #{$xl} {
                        margin-left: 4px;
                    }
                }
            }
            & > .sub-menu {
                & .menu-item-has-children {
                    position: relative;
                    & > a {
                        @include flexbox();
                        align-items: center;
                        justify-content: space-between;
                        &::after {
                            content: "\f105";
                            font-family: "flaticon_skill_grow";
                            @include transform(rotate(90deg));
                            font-size: 14px;
                            font-weight: var(--tg-fw-bold);
                            margin-left: 6px;
                            @include transition(.3s);
                        }
                    }
                    &:hover,
                    &.active {
                        & a {
                            &::after {
                                @include transform(rotate(0deg));
                            }
                        }
                    }
                }
            }
        }
    }
    &__search {
        margin-inline-end: 25px;
        @media #{$xl} {
            margin-inline-end: 15px;
        }
        @media #{$lg} {
            margin-left: auto;
        }
        &-form {
            @include flexbox();
            width: 535px;
            border-radius: 100px;
            border: 1px solid #D3D2DF;
            @media #{$xxl} {
                width: 485px;
            }
            @media #{$xl} {
                width: 310px;
            }
            @media #{$lg} {
                width: 500px;
            }
            @media #{$md} {
                width: auto;
            }
            & .select-grp {
                @include flexbox();
                align-items: center;
                background: transparent;
                border: none;
                padding: 12px 0 12px 17px;
                @include border-radius(0);
                width: 153px;
                flex: 0 0 auto;
                position: relative;
                @media #{$xl} {
                    padding: 12px 0 12px 12px;
                    width: 140px;
                }
                &::after {
                    content: "";
                    position: absolute;
                    right: 0;
                    top: 50%;
                    @include transform(translateY(-50%));
                    width: 1px;
                    height: 20px;
                    background: #BDBABB;
                    @media #{$md} {
                        display: none;
                    }
                }
                & svg {
                    width: 16px;
                    height: 16px;
                    flex: 0 0 auto;
                }
                & path {
                    fill: var(--tg-theme-primary);
                }
            }
            & .form-select {
                outline: none;
                box-shadow: none;
                border: none;
                padding-left: 8px;
                color: var(--tg-heading-color);
                font-family: var(--tg-heading-font-family);
                font-size: 14px;
            }
            & .input-grp {
                position: relative;
                flex-grow: 1;
                margin-left: -1px;
                @media #{$md} {
                    display: none;
                }
            }
            & input {
                display: block;
                width: 100%;
                background: transparent;
                border: none;
                @include border-radius(0);
                padding: 12px 50px 10px 20px;
                height: 50px;
                font-size: 15px;
                font-family: var(--tg-heading-font-family);
                @media #{$xl} {
                    padding: 12px 50px 10px 10px;
                }
                @media #{$lg} {
                    padding: 12px 50px 10px 20px;
                }
                &::placeholder {
                    color: #8D9DB5;
                    font-size: 14px;
                }
            }
            & [type=submit] {
                position: absolute;
                @include flexbox();
                align-items: center;
                justify-content: center;
                top: 50%;
                @include transform(translateY(-50%));
                right: 4px;
                width: 44px;
                height: 44px;
                border: none;
                padding: 0 0;
                background: var(--tg-theme-primary);
                font-size: 20px;
                color: var(--tg-common-color-white);
                @include border-radius(50%);
                &:hover {
                    background: var(--tg-theme-secondary);
                    color: var(--tg-heading-color);
                }
            }
        }
        &-bar {
            flex-grow: 1;
            @media #{$xl} {
                max-width: 240px;
            }
            @media #{$lg} {
                max-width: 100%;
            }
            @media #{$md} {
                display: none;
            }
            & form {
                position: relative;
                & input {
                    display: block;
                    width: 100%;
                    background: var(--tg-common-color-white);
                    border: 1px solid var(--tg-border-2);
                    @include border-radius(50px);
                    padding: 12px 50px 10px 20px;
                    height: 45px;
                    font-size: 15px;
                    font-family: var(--tg-heading-font-family);
                    &::placeholder {
                        color: #8D9DB5;
                        font-size: 14px;
                    }
                }
                & [type=submit] {
                    position: absolute;
                    top: 50%;
                    @include transform(translateY(-50%) rotate(-90deg));
                    right: 10px;
                    border: none;
                    padding: 0 0;
                    background: transparent;
                    font-size: 24px;
                    color: #8D9DB5;
                    &:hover {
                        color: var(--tg-theme-primary);
                    }
                }
            }
        }
    }
    &__action {
        @media #{$lg} {
            margin: 0 25px 0 0;
        }
        @media #{$xs} {
            display: none;
        }
        & > ul {
            @include flexbox();
            align-items: center;
            gap: 8px;
            & li {
                position: relative;
                padding: 0 6px 0 0;
                flex: 0 0 auto;
                & .cart-count {
                    @include flexbox();
                    align-items: center;
                    justify-content: center;
                    width: 40px;
                    height: 40px;
                    border: 1px solid #7F7E97;
                    color: #7F7E97;
                    @include border-radius(50%);
                    & span {
                        position: absolute;
                        top: -9px;
                        right: 0;
                        width: 22px;
                        height: 22px;
                        font-size: 14px;
                        font-weight: 500;
                        @include flexbox();
                        align-items: center;
                        justify-content: center;
                        background: var(--tg-theme-secondary);
                        color: var(--tg-heading-color);
                        @include border-radius(50%);
                        z-index: 1;
                    }
                    &:hover {
                        background: var(--tg-theme-primary);
                        border-color: var(--tg-theme-primary);
                        color: var(--tg-common-color-white);
                    }
                }
                &:first-child {
                    margin-left: 0;
                }
                @media #{$xl} {
                    &.free-btn {
                        display: none;
                    }
                }
                &.login-btn {
                    padding: 0 0;
                    margin-inline-start: 15px;
                    @media #{$xl} {
                        margin-inline-start: 0;
                    }
                    @media #{$lg} {
                        display: none;
                    }
                    & a {
                        display: block;
                        border-radius: 50px;
                        padding: 12px 26px;
                        border: 1px solid rgba(6, 35, 91, 0.19);
                        background: var(--tg-theme-secondary);
                        font-size: 15px;
                        color: var(--tg-heading-color);
                        font-weight: 600;
                        line-height: 18px;
                        &:hover {
                            background: var(--tg-theme-primary);
                            color: var(--tg-common-color-white);
                        }
                    }
                }
            }
        }
        &-two {
            & .mini-cart-icon {
                @include flexbox();
                align-items: flex-end;
                gap: 8px;
                & .cart-count-two {
                    position: relative;
                    font-size: 30px;
                    line-height: 0;
                    color: var(--tg-common-color-black-2);
                    & .mini-cart-count {
                        position: absolute;
                        width: 23px;
                        height: 23px;
                        @include flexbox();
                        align-items: center;
                        justify-content: center;
                        font-size: 14px;
                        font-weight: 500;
                        background: var(--tg-theme-primary);
                        color: var(--tg-common-color-white);
                        @include border-radius(50%);
                        top: -10px;
                        right: -13px;
                    }
                    &:hover {
                        color: var(--tg-theme-secondary);
                    }
                }
                & strong {
                    font-size: 14px;
                    font-weight: 500;
                    color: var(--tg-common-color-black-2);
                    line-height: 1.2;
                }
            }
        }
    }
    &__categories {
        margin-right: 12px;
        @media #{$lg} {
            margin-left: auto;
        }
        & .dropdown-toggle {
            font-family: var(--tg-heading-font-family);
            border: 1px solid var(--tg-border-2);
            background-color: var(--tg-common-color-white);
            @include border-radius(4px);
            color: var(--tg-body-color);
            @include flexbox();
            align-items: center;
            padding: 9px 17px;
            gap: 11px;
            & svg {
                color: var(--tg-theme-primary);
            }
            &::after {
                content: "";
                display: block;
                margin: 0 0;
                border: none;
                background-image: url(../img/icons/down_arrow.svg);
                width: 12px;
                height: 6px;
            }
        }
        & .dropdown-menu {
            width: 100%;
            min-width: 100%;
            background-color: var(--tg-common-color-white);
            border: 1px solid var(--tg-border-2);
            @include border-radius(4px);
        }
        & .dropdown-item {
            color: var(--tg-body-color);
            &:hover,
            &:focus {
                background-color: var(--tg-theme-primary);
                color: var(--tg-common-color-white);
            }
        }
    }
}
.sticky-menu {
	position: fixed;
	left: 0;
	margin: auto;
	top: 0;
	width: 100%;
	z-index: 99;
	background: var(--tg-common-color-white);
	-webkit-animation: 1000ms ease-in-out 0s normal none 1 running fadeInDown;
	animation: 1000ms ease-in-out 0s normal none 1 running fadeInDown;
	-webkit-box-shadow: 0 10px 15px rgba(25, 25, 25, 0.1);
	box-shadow: 0 10px 15px rgba(25, 25, 25, 0.1);
	border-radius: 0;
    & ul li .sub-menu {
        @include border-radius(0 0 6px 6px);
    }
}
#header {
    &-fixed-height {
        &.active-height {
            display: block;
            height: 90px;
        }
    }
}