/**
 * Shared storefront header.
 * One layout for the homepage, catalogue, product and commerce routes.
 */

html,
body {
    margin: 0;
}

#header,
#header *,
#header *::before,
#header *::after {
    box-sizing: border-box;
}

#header {
    width: 100%;
    background: #fff;
}

#header .block-search .btn-submit {
    cursor: pointer;
}

#header .phone-online,
#header .block-search .btn-submit,
#header .block-nav-category .block-title,
#header .block-nav-category .block-title .before {
    transition: background-color .2s ease, color .2s ease;
}

#header.header .phone-online:hover,
#header.header .phone-online:focus-visible,
#header div.block-search .form-search .btn-submit:hover,
#header div.block-search .form-search .btn-submit:focus-visible {
    background-color: #d96b13 !important;
    color: #fff !important;
}

#header.style2 .block-nav-category .block-title:hover,
#header.style2 .block-nav-category .block-title:focus-visible,
#header.style2 .block-nav-category .block-title:hover .before,
#header.style2 .block-nav-category .block-title:focus-visible .before {
    background-color: #d96b13 !important;
    color: #fff !important;
}

#header .main-menu .menu-item > a,
#header .top-bar-menu .menu-item > a,
#header .block-nav-category .block-title,
#header .block-nav-category .vertical-menu a,
#header .block-nav-category .btn-view-all,
#header .phone-online,
#header .btn-submit {
    font-weight: 500 !important;
}

#header .block-nav-category.is-open > .block-title {
    border-radius: 5px 5px 0 0;
}

#header .block-nav-category.is-open > .block-content {
    z-index: 1000;
    display: block !important;
}

#header .block-nav-category.show-all-categories .vertical-menu > .menu-item.link-other {
    display: block;
}

#header .block-nav-category .block-title:focus-visible {
    outline: 3px solid #f58220;
    outline-offset: 3px;
}

#header .container {
    width: min(100%, 1440px);
    margin-right: auto;
    margin-left: auto;
    padding-right: 20px;
    padding-left: 20px;
}

#header .header-top {
    height: 44px;
    padding: 4px 0;
    background: #f4f4f4;
}

#header .header-top-inner {
    margin: 0;
}

#header .header-top-inner .top-bar-menu > .menu-item a {
    line-height: 36px;
}

#header .header-top-inner .top-bar-menu {
    padding: 0;
}

#header .header-nav-inner > .row {
    margin: 0;
}

#header .logo img.logo {
    display: block;
    width: 77px;
    height: 77px;
    object-fit: contain;
}

@media (min-width: 1200px) {
    #header .main-top {
        display: block;
    }

    #header .action-res {
        display: none;
    }

    #header.style2 .header-nav {
        position: relative;
        min-height: 102px;
        padding: 12px 0;
        border-bottom: 1px solid #e8e8e8;
    }

    #header .header-nav-inner {
        display: block;
        width: 100%;
    }

    #header .header-nav-inner > .row {
        display: grid;
        grid-template-columns: 180px minmax(0, 1fr) 260px;
        align-items: center;
        min-height: 77px;
    }

    #header .header-nav-inner > .row::before,
    #header .header-nav-inner > .row::after,
    #header.style2 .header-middle-inner::before,
    #header.style2 .header-middle-inner::after {
        display: none;
        content: none;
    }

    #header .header-nav-inner > .row > [class*="col-"] {
        position: static;
        float: none;
        width: auto;
        min-height: 0;
        padding: 0;
    }

    #header.style2 .header-nav .logo {
        width: 77px;
        height: 77px;
        line-height: normal;
    }

    #header.style2 .box-header-nav {
        width: 100%;
        text-align: center;
    }

    #header .box-header-nav .main-menu {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: clamp(24px, 2.6vw, 48px);
        margin: 0;
        padding: 0;
    }

    #header .box-header-nav .main-menu > .menu-item {
        display: block;
        flex: 0 0 auto;
        padding: 0;
    }

    #header.style2 .box-header-nav .main-menu > .menu-item > a {
        display: block;
        line-height: 52px;
        font-size: 17px;
        white-space: nowrap;
    }

    #header .header-control {
        float: none;
        width: 100%;
        padding: 0;
        text-align: right;
    }

    #header .header-control-inner {
        display: block;
    }

    #header .header-control .meta-woo {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-height: 54px;
        padding: 0;
    }

    #header .header-control .meta-woo > div {
        float: none;
    }

    #header.style2 .header-middle {
        height: 75px;
        padding: 10px 0;
        border-bottom: 1px solid #e8e8e8;
    }

    #header.style2 .header-middle-inner {
        display: grid;
        grid-template-columns: 320px minmax(0, 1fr) 200px;
        align-items: center;
        width: 100%;
        height: 54px;
        margin: 0;
    }

    #header.style2 .header-middle-inner .block-nav-category {
        float: none;
        width: 320px;
    }

    #header.style2 .header-middle-inner div.block-search {
        float: none;
        width: 100%;
        min-width: 0;
        padding: 0 12px;
    }

    #header.style2 .header-middle-inner .header-contact-online {
        width: 200px;
    }

    #header .header-contact-online-inner {
        float: none;
    }

    #header.style2 .phone-online {
        display: flex;
        width: 200px;
        min-width: 0;
        height: 54px;
        align-items: center;
        justify-content: center;
        padding: 0 18px;
        border-radius: 5px;
        background: #f58220;
        line-height: 1;
    }

    #header.style2 .phone-online span {
        flex: 0 0 auto;
        margin-right: 10px;
        line-height: 1;
    }

    #header.style2 .phone-online .online-number {
        display: block;
        line-height: 1;
    }

    #header.style2 .phone-online .contact-number {
        margin: 0;
        color: #fff;
        line-height: 1.2;
    }
}

@media (max-width: 1199px) {
    #header .main-top {
        display: none;
    }

    #header .action-res,
    #header.style2 .action-res {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid #e8e8e8;
        background: #fff;
    }

    #header .action-res > .container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px 16px;
        padding-top: 0;
    }

    #header .action-res .logo {
        float: none;
        width: 70px;
        padding: 0;
        line-height: normal;
    }

    #header .action-res .logo img.logo {
        width: 64px;
        height: 64px;
    }

    #header .action-res .meta-woo {
        display: flex;
        float: none;
        align-items: center;
        gap: 22px;
        margin-left: auto;
        padding: 0;
    }

    #header .action-res .meta-woo > div,
    #header .action-res .meta-woo > div:not(.block-menu-bar) {
        float: none;
        padding: 0;
    }

    #header .action-res .block-menu-bar {
        display: block;
        float: none;
        width: 32px;
        padding: 0;
    }

    #header.header .action-res .block-search {
        display: block;
        flex: 0 0 100%;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    #header .action-res .block-search .form-search {
        display: block;
        width: 100%;
        padding: 0 58px 0 0;
    }

    #header .action-res .block-search .form-content {
        display: block;
        width: 100%;
        border: 1px solid #e1e1e1;
        border-radius: 5px 0 0 5px;
    }

    #header .action-res .block-search .txt-livesearch {
        width: 100%;
        height: 44px;
        padding: 0 15px;
        line-height: 44px;
    }

    #header .action-res .block-search .category {
        display: none;
    }

    #header .action-res .block-search .btn-submit {
        right: 0;
        left: auto;
        width: 58px;
        height: 46px !important;
        padding: 0;
        border-radius: 0 5px 5px 0;
        background: #f58220;
        line-height: 46px !important;
    }

    #header .action-res .cart-detail {
        display: none;
    }
}

@media (max-width: 479px) {
    #header .container {
        padding-right: 15px;
        padding-left: 15px;
    }

    #header .action-res {
        padding: 12px 0;
    }

    #header .action-res .logo {
        width: 77px;
        height: 72px;
    }

    #header.header .action-res .logo img.logo {
        width: 72px !important;
        height: 72px !important;
        margin: 0 auto;
    }

    #header .action-res .meta-woo {
        gap: 17px;
    }

    #header .action-res .block-minicart .link-dropdown .count {
        right: -5px;
    }
}
