/*----------------------------
     Header & Navbar 
-----------------------------*/
.header {
    position: relative;
    z-index: 1010;
}

.topbar {
    padding: 10px 0;

    .topbar__text {
        font-size: 15px;
        font-weight: 700;
    }

    .btn__download {
        min-width: 115px;
        height: 40px;
        line-height: 40px;
        letter-spacing: 0;
        border-radius: 0;

        &:before {
            background-color: $color-primary !important;
        }
    }

    .topbar__close {
        position: absolute;
        top: 50%;
        right: 15px;
        font-size: 17px;
        color: $color-white;
        transform: translateY(-50%);
    }

    .topbar__contact li {
        font-size: 13px;
        margin-right: 25px;
        display: flex;
        align-items: center;

        &:last-child {
            margin-right: 0;
        }

        a {
            color: $color-body;
        }

        i {
            font-size: 16px;
            margin-right: 8px;
        }
    }

    .social-icons a {
        color: $color-secondary;

        &:hover {
            color: $color-primary;
        }
    }
}

/* Navbar */
.navbar {
    padding: 0;
    height: 100px;
    max-height: 100px;
    background-color: $color-white;
    border-bottom: 1px solid #ededed;

    >.container,
    >.container-fluid {
        position: relative;
        height: 100px;
    }

    .navbar-brand {
        padding: 0;
        margin: 0;
        line-height: 100px;
    }

    .logo-light {
        display: none;
    }

    .navbar-toggler {
        padding: 0;
        border: none;
        border-radius: 0;
        width: 23px;
        position: relative;

        .menu-lines {
            display: inline-block;

            &:before,
            &:after {
                content: '';
                position: absolute;
                top: 5px;
                left: 0;
                width: 23px;
                height: 2px;
                display: inline-block;
                background-color: $color-heading;
                @include prefix(transition, 0.3s ease, webkit moz ms o);
            }

            &:after {
                top: 10px;
            }

            span {
                position: absolute;
                top: 0;
                left: 0;
                width: 23px;
                height: 2px;
                background-color: $color-heading;
            }
        }

    }

    .navbar-toggler.actived .menu-lines>span {
        opacity: 0;
    }

    .navbar-toggler.actived .menu-lines:before {
        top: 0;
        @include prefix(transform, rotate(-45deg), webkit moz ms o);
    }

    .navbar-toggler.actived .menu-lines:after {
        top: 0;
        @include prefix(transform, rotate(45deg), webkit moz ms o);
    }

    .nav__item {
        position: relative;
        margin-right: 30px;

        &:last-child {
            margin-right: 0;
        }

        .nav__item-link {
            font-size: 15px;
            font-weight: 700;
            text-transform: capitalize;
            display: block;
            position: relative;
            color: $color-heading;
            line-height: 100px;
            letter-spacing: .3px;

            &:before {
                content: '';
                position: absolute;
                bottom: 0;
                left: 0;
                right: 0;
                width: 0;
                height: 2px;
                margin: auto;
                display: block;
                background-color: $color-primary;
                @include prefix(transition, 0.5s ease, webkit moz ms o);
            }

            &.active,
            &:hover {
                &:before {
                    width: 100%;
                }
            }

            &:hover {
                color: $color-primary;
            }
        }
    }

    .dropdown-toggle:after {
        content: "\f107";
        font-family: "Font Awesome 5 Free";
        border: none;
        vertical-align: middle;
        margin-left: 0;
        position: absolute;
        bottom: -16px;
        left: 50%;
        @include prefix(transform, translateX(-50%), webkit moz ms o);
    }

    /*  dropdown-menu  */
    .dropdown-menu {
        border-radius: 0;
        border: none;
        margin: 0;
        background-color: $color-white;

        .nav__item {
            padding: 0 40px;
            margin-right: 0;

            .nav__item-link {
                color: $color-body;
                text-transform: capitalize;
                font-size: 14px;
                font-weight: 400;
                line-height: 36px !important;
                white-space: nowrap;

                &:hover {
                    color: $color-primary;
                }
            }
        }

        .dropdown-toggle:after {
            right: 0;
        }
    }
}

/* navbar-actions */
.navbar-actions>li {
    margin-left: 20px;

    &:last-child {
        margin-right: 0;
    }
}

.action__btn-contact {
    min-width: 106px;
    height: 39px;
    line-height: 39px;
    border-radius: 2px;
    letter-spacing: 0;
}

.action__btn {
    color: $color-secondary;
}

.action__btn-login span {
    font-size: 14px;
    font-weight: 700;
    padding-left: 6px;
}

/* navbar-transparent */
.header-transparent {
    .navbar {
        border-bottom: 1px solid rgba(255, 255, 255, .15);
        background-color: transparent;

        .navbar-toggler .menu-lines {

            &:before,
            &:after,
            span {
                background-color: $color-white;
            }
        }
    }

    .navbar .nav__item .nav__item-link:before {
        background-color: $color-primary;
    }

    .logo-light {
        display: inline-block;
    }

    .logo-dark {
        display: none;
    }

    .is-sticky {
        .nav__item .nav__item-link:before {
            background-color: $color-heading;
        }

        .action__btn,
        .nav__item .nav__item-link {
            color: $color-heading;
        }
    }
}

.header-light .navbar {
    border-bottom: 0;
    box-shadow: 0 5px 83px rgba(40, 40, 40, .12);

    .nav__item .nav__item-link.active {
        color: $color-primary;
    }
}

.header-layout2 {
    .topbar {
        border-bottom: 1px solid #e7ebef;
    }

    .navbar {
        height: 80px;
        max-height: 80px;
        box-shadow: none;

        .nav__item .nav__item-link {
            line-height: 80px;
        }
    }

    .dropdown__lang {
        img {
            margin-right: 8px;
        }

        .dropdown-toggle {
            font-size: 15px;
            color: $color-body;
            font-weight: 700;
            padding-right: 15px;

            &:after {
                content: "\f107";
                font-family: "Font Awesome 5 Free";
                border: none;
                vertical-align: middle;
                margin-left: 0;
                position: absolute;
                top: 50%;
                right: 0;
                -webkit-transform: translateY(-50%);
                transform: translateY(-50%);
            }
        }

        .dropdown-menu {
            border: 0;
            min-width: 9rem;
            box-shadow: 0 5px 83px 0 rgba(40, 40, 40, .08);
        }

        .dropdown-item {
            color: $color-body;
            padding: .25rem 1rem;
        }
    }
}

.secondary-nav {
    top: 80px;
    z-index: 1000;
    border-bottom: 1px solid #e7ebef;

    &-sticky,
    &-layout2 {
        transition: all 0.4s ease;
        background-color: $color-secondary;
        border-bottom-color: $color-secondary;

        .nav-tabs .nav__link {
            color: $color-white;

            &.active,
            &:hover {
                color: $color-primary;
            }
        }
    }
}

/* is-sticky */
.is-sticky {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    z-index: 1040;
    height: 80px;
    max-height: 80px;
    border-bottom: 0 !important;
    background-color: $color-white !important;
    box-shadow: 0 3px 4px rgba(0, 0, 0, 0.07);
    @include animation('headerAnimation .7s');

    >.container,
    >.container-fluid {
        height: 80px;
    }

    .navbar-brand {
        line-height: 80px;
    }

    .nav__item .nav__item-link {
        line-height: 80px;
        color: $color-heading;
    }

    .logo-light {
        display: none;
    }

    .logo-dark {
        display: inline-block;
    }

    .action__btn {
        color: $color-heading;
    }

    .action__btn-contact {
        background-color: $color-primary;
        border-color: $color-primary;
        color: $color-white !important;

        &:before {
            background-color: $color-heading !important;
        }
    }
}

/* burger-menu */
.burger-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    background-color: rgba(27, 26, 26, 0.5);
    @include prefix(transition, all 0.5s ease-in-out, webkit moz ms o);

    .burger-menu__content {
        background-color: $color-secondary;
        width: 90%;
        max-width: 410px;
        padding: 65px;
        display: -ms-flexbox;
        display: flex;
        justify-content: space-between;
        -ms-flex-direction: column;
        flex-direction: column;
        height: 100vh;
        opacity: 0;
        max-height: 100%;
        overflow-y: auto;
        @include prefix(transition, all .3s ease, webkit moz ms o);
        @include prefix(transform, translateX(-100%), webkit moz ms o);

    }

    .burger-menu__close {
        position: absolute;
        top: 30px;
        right: 30px;
        cursor: pointer;
        color: $color-white;
        @include prefix(transition, all .2s linear, webkit moz ms o);

        &:hover {
            color: $color-primary;
            @include prefix(transform, rotate(90deg), webkit moz ms o);
        }
    }

    .social-icons li {
        margin-right: 5px;

        a {
            width: 44px;
            height: 44px;
            line-height: 42px;
            text-align: center;
            border-radius: 50%;
            font-size: 16px;
            color: $color-primary;
            border: 2px solid #253b61;

            &:hover {
                color: $color-white;
                border-color: $color-primary;
                background-color: $color-primary;
            }
        }
    }

    &.active {
        opacity: 1;
        visibility: visible;

        .burger-menu__content {
            opacity: 1;
            @include prefix(transition-delay, .4s, webkit moz ms o);
            @include prefix(transform, translateX(0), webkit moz ms o);
        }
    }

    &.inActive {
        opacity: 0;
        @include prefix(transition-delay, .8s, webkit moz ms o);

        .burger-menu__content {
            opacity: 0;
            @include prefix(transition-delay, .4s, webkit moz ms o);
            @include prefix(transform, translateX(-100%), webkit moz ms o);
        }
    }
}

/* search-popup */
.search-popup {
    position: fixed;
    z-index: 2300;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    background-color: $color-white;
    @include prefix(transform, scale(0.7), webkit moz ms o);
    @include prefix(transition, all 0.5s ease-in-out, webkit moz ms o);

    &.active {
        opacity: 1;
        visibility: visible;
        @include prefix(transform, scale(1), webkit moz ms o);

        .search-popup__form {
            @include prefix(transform, translateY(-50%) scaleX(1), webkit moz ms o);
        }
    }

    &.inActive {
        opacity: 0;
        @include prefix(transition-delay, .5s, webkit moz ms o);
        @include prefix(transform, scale(1), webkit moz ms o);

        .search-popup__form {
            @include prefix(transition-delay, .0s, webkit moz ms o);
            @include prefix(transform, translateY(-50%) scaleX(0), webkit moz ms o);
        }
    }

    .search-popup__close {
        position: absolute;
        top: 50px;
        right: 50px;
        cursor: pointer;
        font-style: normal;
        width: 60px;
        height: 60px;
        line-height: 60px;
        text-align: center;
        border-radius: 3px;
        color: $color-white;
        background-color: $color-primary;
        @include prefix(transition, all .2s linear, webkit moz ms o);

        &:hover {
            background-color: $color-heading;
        }
    }

    .search-popup__form {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 550px;
        margin: -40px auto 0;
        @include prefix(transform, translateY(-50%) scaleX(0), webkit moz ms o);
        @include prefix(transition, all 0.5s ease-in-out, webkit moz ms o);
        @include prefix(transition-delay, .5s, webkit moz ms o);
    }

    .search-popup__btn {
        position: absolute;
        top: 0;
        left: 0;
        line-height: 80px;
        text-align: center;
        font-size: 28px;
        cursor: pointer;
        color: $color-secondary;
        @include prefix(transition, .3s ease, webkit moz ms o);

        &:hover {
            color: $color-primary;
        }
    }

    .search-popup__form__input {
        font-family: $font-heading;
        font-weight: 300;
        font-size: 35px;
        z-index: 1;
        width: 100%;
        height: 80px;
        border: none;
        padding: 0 0 0 40px;
        color: $color-body;
        background: transparent;
        border-bottom: 2px solid #e7ebef;
        @include prefix(transition, all 0.3s ease, webkit moz ms o);
    }
}

/* login-popup */
.login-popup {
    position: fixed;
    z-index: 2300;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(27, 26, 26, 0.5);
    @include prefix(transition, all 0.5s ease-in-out, webkit moz ms o);

    .login-popup-wrapper {
        opacity: 0;
        width: 90%;
        max-width: 370px;
        @include prefix(transform, scale(0.9), webkit moz ms o);
        @include prefix(transition, all 0.5s ease, webkit moz ms o);
        @include prefix(transition-delay, .7s, webkit moz ms o);
    }

    .login-popup__form {
        position: relative;
        padding: 50px;
        border-radius: 5px;
        background-color: $color-white;

        &:after {
            content: '';
            position: absolute;
            top: 50px;
            left: 0;
            width: 3px;
            height: calc(100% - 100px);
            background-color: $color-primary;
        }

        .form-control {
            height: 50px;
        }
    }

    .login-popup__title {
        font-size: 26px;
        margin-bottom: 15px;
    }

    .go-login,
    .go-register {
        color: $color-primary;
        margin-left: 10px;

        i {
            display: inline-block;
            width: 25px;
            height: 25px;
            line-height: 25px;
            text-align: center;
            border-radius: 50%;
            font-size: 10px;
            margin-left: 6px;
            color: $color-white;
            border: 1px solid $color-primary;
            transition: .3s linear;
        }

        &:hover {
            i {
                background-color: $color-primary;
            }
        }
    }

    &.active {
        opacity: 1;
        visibility: visible;

        .login-popup-wrapper {
            opacity: 1;
            @include prefix(transform, scale(1), webkit moz ms o);
        }
    }

    &.inActive {
        opacity: 0;
        @include prefix(transition-delay, .5s, webkit moz ms o);

        .login-popup-wrapper {
            @include prefix(transform, scale(0.9), webkit moz ms o);
            @include prefix(transition-delay, .0s, webkit moz ms o);
        }
    }
}

@media only screen and (min-width: 1200px) {
    .header-layout2 {
        .container-fluid {
            padding-right: 50px;
            padding-left: 50px;
        }

        .action__btn-search {
            height: 80px;
            padding-left: 20px;
            margin-right: -20px;
            width: 50px;
            border-left: 1px solid #e7ebef;
        }
    }
}

/* Mobile and Tablets */
@media screen and (max-width: 991px) {
    .navbar {
        .navbar-toggler {
            position: absolute;
            right: 15px;
            height: 13px;
        }

        .collapse:not(.show) {
            display: block;
        }

        .navbar-nav {
            margin: 0 !important;
        }

        .nav__item {
            margin-right: 0;

            .nav__item-link {
                color: $color-dark;
                line-height: 35px !important;
                padding-left: 15px;

                &:hover {
                    color: $color-primary;
                }

                &:before {
                    display: none;
                }
            }
        }

        .navbar-collapse {
            background-color: white;
            box-shadow: 0 3px 4px rgba(0, 0, 0, 0.07);
            z-index: 50;
            padding: 15px 0;
            position: absolute;
            left: 0;
            width: 100%;
            top: 100%;
            visibility: hidden;
            opacity: 0;
            @include prefix(transition, 0.3s ease, webkit moz ms o);
            @include prefix(transform, translateY(30px), webkit moz ms o);

            .navbar-actions {
                padding: 0 15px;
            }
        }

        .menu-opened.navbar-collapse {
            opacity: 1;
            visibility: visible;
            @include prefix(transform, translateY(0), webkit moz ms o);
        }

        .nav__item.opened,
        .nav__item.show {
            >.dropdown-toggle:after {
                content: "\f106";
            }
        }

        .dropdown-toggle:after {
            top: 0;
            left: auto;
            right: 20px;
            @include prefix(transform, translateX(0), webkit moz ms o);
        }

        .dropdown-menu {
            background-color: white;

            .nav__item {
                padding: 0 15px 0 30px;

                .nav__item-link {
                    padding-left: 0;
                }
            }
        }

        .nav__item.dropdown-submenu {
            >.dropdown-menu.show {
                padding-left: 10px;
            }
        }

        .dropdown-submenu .dropdown-menu .nav__item {
            padding: 0 0 0 15px;
        }

        .navbar-nav .dropdown-menu.show {
            padding: 0;
        }

        .mega-dropdown-menu .container {
            max-width: none;
        }

        .mega-dropdown-menu>.nav__item {
            padding: 0 10px;
        }

        .mega-dropdown-menu .nav__item {
            padding: 0;
        }
    }

    .is-sticky {
        position: static;
        animation: none;
    }

    .navbar-actions {
        position: absolute;
        top: 50%;
        right: 50px;
        @include prefix(transform, translateY(-50%), webkit moz ms o);
    }

    .header-transparent+.page-title {
        margin-top: 0;
    }

    .header,
    .header-transparent {
        .navbar {
            background-color: $color-white;
        }

        .logo-dark {
            display: inline-block;
        }

        .logo-light {
            display: none;
        }

        .action__btn {
            color: $color-secondary;
        }

        .navbar .navbar-toggler .menu-lines:before,
        .navbar .navbar-toggler .menu-lines:after,
        .navbar .navbar-toggler .menu-lines span {
            background-color: $color-secondary;
        }

        .navbar-expand-lg>.container,
        .navbar-expand-lg>.container-fluid {
            width: 100%;
            max-width: none;
        }

        .navbar,
        .navbar>.container,
        .navbar>.container-fluid {
            height: 80px;
        }

        .navbar-brand {
            margin-left: 15px;
            line-height: 80px;
        }
    }

    .cart-popup {
        right: 15px;
    }

    .header__topbar>.container {
        max-width: none;
    }

    .menu-popup {
        .menu-popup__banner {
            display: none;
        }

        .menu-popup__list li a {
            font-size: 30px;
        }

        .menu-popup__content {
            -ms-flex: 0 0 100%;
            flex: 0 0 100%;
            max-width: 100%;
            padding: 50px;
        }
    }

    .action__btn-contact {
        background-color: $color-heading;
        color: $color-white !important;
    }

    .secondary-nav {
        position: static;
    }
}

/* Medium and large Screens */
@media only screen and (min-width: 992px) {
    .navbar {
        .dropdown-menu {
            width: auto;
            min-width: 235px;
            box-shadow: 0px 2px 6px 0px rgba(40, 40, 40, 0.1);
            padding: 25px 0 23px;

            .nav__item .nav__item-link:before {
                display: none;
            }

            &.wide-dropdown-menu {
                padding: 0;
                min-width: 500px;
                overflow: hidden;

                >.nav__item {
                    padding: 0;
                }

                .dropdown-menu-title {
                    color: $color-heading;
                    font-family: $font-heading;
                    font-weight: 700;
                    font-size: 17px;
                    line-height: 1;
                    margin: 0 0 13px 40px;
                }

                .dropdown-menu-col {
                    padding: 40px 0 27px;
                }

                .dropdown-menu-col:first-child {
                    position: relative;

                    &:after {
                        content: '';
                        position: absolute;
                        right: 0;
                        top: 40px;
                        width: 1px;
                        height: calc(100% - 80px);
                        background-color: #e9e9e9;
                    }
                }
            }
        }

        .dropdown-menu.mega-dropdown-menu {
            padding: 30px;
        }

        .nav__item.has-dropdown>.dropdown-menu,
        .nav__item.dropdown-submenu>.mega-menu,
        .nav__item.has-dropdown>.mega-menu,
        .nav__item.has-dropdown>.dropdown-menu>.nav__item.dropdown-submenu>.dropdown-menu {
            display: block;
            position: absolute;
            left: 0;
            right: auto;
            z-index: 1050;
            opacity: 0;
            visibility: hidden;
            @include prefix(transform, translateY(15px) scale(0.95), webkit moz ms o);
            @include prefix(transition, (all 0.4s ease), webkit moz ms o);
        }

        .nav__item.has-dropdown>.dropdown-menu>.nav__item.dropdown-submenu>.dropdown-menu,
        .nav__item.dropdown-submenu>.dropdown-menu>.nav__item.has-dropdown>.dropdown-menu {
            top: 0;
            left: 100%;
        }

        .nav__item.has-dropdown:hover>.dropdown-menu,
        .nav__item.dropdown-submenu:hover>.mega-menu,
        .nav__item.has-dropdown:hover>.mega-menu,
        .nav__item.has-dropdown>.dropdown-menu>.nav__item.dropdown-submenu:hover>.dropdown-menu {
            opacity: 1;
            visibility: visible;
            @include prefix(transform, scaleY(1) scale(1), webkit moz ms o);
        }

        .nav__item.has-dropdown.mega-dropdown {
            position: static;
        }

        .nav__item.has-dropdown .mega-dropdown-menu {
            width: 100%;
        }
    }

    .header-transparent .action__btn,
    .header-transparent .nav__item .nav__item-link {
        color: $color-white
    }
}

@include md-screens {
    .topbar .topbar__text {
        font-size: 13px;
    }
}

@include xs-screens {
    .burger-menu {
        padding: 20px;

        .burger-menu__close {
            top: 20px;
            right: 20px;
        }
    }

    .search-popup .search__popup-form {
        max-width: 90%;
    }

    .search-popup .search__input {
        font-size: 20px;
        font-weight: 400;
    }
}