/*
|--------------------------------------------------------------------------
| Header
|--------------------------------------------------------------------------
*/

.site-header,
.site-header * {
    box-sizing: border-box;
}

.site-header {
    position: relative;
    z-index: 50;
    border-top: 6px solid #0f172a;
    background: #ffffff;
}

.site-header__container {
    width: min(100% - 32px, 1300px);
    margin: 0 auto;
}

/*
|--------------------------------------------------------------------------
| Header tầng trên
|--------------------------------------------------------------------------
*/

.site-header__top {
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.site-header__top-inner {
    display: grid;
    grid-template-columns:
        190px
        minmax(0, 1fr)
        auto;
    gap: 24px;
    min-height: 100px;
    align-items: center;
}

.site-header__logo {
    display: flex;
    align-items: center;
}

.site-header__logo img {
    display: block;
    width: auto;
    max-width: 180px;
    max-height: 70px;
    object-fit: contain;
}

/*
|--------------------------------------------------------------------------
| Search
|--------------------------------------------------------------------------
*/

.site-header__search {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        50px;
    overflow: hidden;
    border: 1px solid #7cb8e7;
    border-radius: 8px;
    background: #ffffff;
}

.site-header__search input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 18px;
    color: #344054;
    font: inherit;
    border: 0;
    outline: 0;
    background: transparent;
}

.site-header__search input::placeholder {
    color: #98a2b3;
}

.site-header__search button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #ffffff;
    cursor: pointer;
    border: 0;
    background: #159de1;
}

.site-header__search button:hover {
    background: #0284c7;
}

.site-header__search button svg {
    width: 22px;
    height: 22px;
}

/*
|--------------------------------------------------------------------------
| Contact
|--------------------------------------------------------------------------
*/

.site-header__contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    min-height: 52px;
    padding: 0 20px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 16px;
    background: #2563eb;
}

.site-header__contact:hover {
    background: #1d4ed8;
}

/*
|--------------------------------------------------------------------------
| Main menu
|--------------------------------------------------------------------------
*/

.site-main-menu {
    background: #289bcf;
}

.main-menu {
    display: flex;
    align-items: stretch;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-menu__item {
    position: relative;
    min-width: 0;
}

.main-menu__link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 60px;
    padding: 10px 18px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.main-menu__link:hover,
.main-menu__item:hover > .main-menu__link {
    background: red
}

.main-menu__arrow {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

/*
|--------------------------------------------------------------------------
| Submenu
|--------------------------------------------------------------------------
*/

.main-menu__submenu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    display: none;
    width: 250px;
    margin: 0;
    padding: 8px;
    list-style: none;
    border: 1px solid #e4e7ec;
    border-radius: 0 0 10px 10px;
    background: #ffffff;
    box-shadow:
        0 14px 30px rgba(
            15,
            23,
            42,
            0.16
        );
}

.main-menu__item:hover >
.main-menu__submenu {
    display: block;
}

.main-menu__submenu a {
    display: block;
    padding: 10px 12px;
    color: #344054;
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
}

.main-menu__submenu a:hover {
    color: #0369a1;
    background: #eff6ff;
}

/*
|--------------------------------------------------------------------------
| Menu đặc biệt
|--------------------------------------------------------------------------
*/

.main-menu__item.menu-sale >
.main-menu__link {
    background: #ef1111;
}

/*
|--------------------------------------------------------------------------
| Mobile toggle
|--------------------------------------------------------------------------
*/

.site-header__mobile-toggle {
    display: none;
}

/*
|--------------------------------------------------------------------------
| Tablet và mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 1023px) {
    .site-header__container {
        width: min(
            100% - 20px,
            1300px
        );
    }

    .site-header__top-inner {
        grid-template-columns:
            125px
            minmax(0, 1fr)
            44px;
        gap: 10px;
        min-height: 76px;
    }

    .site-header__logo img {
        max-width: 120px;
        max-height: 52px;
    }

    .site-header__contact {
        display: none;
    }

    .site-header__mobile-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        padding: 10px;
        cursor: pointer;
        border: 0;
        border-radius: 8px;
        background: #eef2f7;
    }

    .site-header__mobile-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background: #1f2937;
    }

    .site-main-menu {
        display: none;
    }

    .site-main-menu.is-open {
        display: block;
    }

    .main-menu {
        display: block;
        padding: 10px 0;
    }

    .main-menu__link {
        justify-content: space-between;
        min-height: 46px;
        padding: 10px 14px;
        text-align: left;
    }

    .main-menu__submenu {
        position: static;
        display: block;
        width: auto;
        margin: 0 12px 6px;
        padding: 4px 0 4px 14px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .main-menu__submenu a {
        color: #ffffff;
        background: transparent;
    }

    .main-menu__submenu a:hover {
        color: #ffffff;
        background:
            rgba(
                255,
                255,
                255,
                0.12
            );
    }
}

@media (max-width: 640px) {
    .site-header__top-inner {
        grid-template-columns:
            100px
            minmax(0, 1fr)
            42px;
    }

    .site-header__logo img {
        max-width: 95px;
    }

    .site-header__search {
        grid-template-columns:
            minmax(0, 1fr)
            42px;
    }

    .site-header__search input {
        height: 42px;
        padding: 0 11px;
        font-size: 12px;
    }
}