.hp-site-header,
.hp-site-header * {
    box-sizing: border-box;
}

.hp-site-header {
    --hp-accent: #168fe5;
    --hp-max-width: 1740px;
    position: relative;
    z-index: 9990;
    width: 100%;
    background: #fff;
    border: 0 !important;
    color: #2d2d2d;
    font-family: inherit;
}

.hp-header-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: min(calc(100% - 64px), var(--hp-max-width));
    min-height: 96px;
    margin: 0 auto;
    border: 0 !important;
}

.hp-main-nav {
    align-self: stretch;
}

.hp-menu-list {
    display: flex;
    align-items: stretch;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hp-menu-item {
    position: relative;
    display: flex;
    align-items: stretch;
    margin: 0;
    padding: 0 6px;
}

.hp-menu-link-row {
    position: relative;
    display: flex;
    align-items: center;
}

.hp-menu-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 28px;
    color: #2d2d2d;
    font-size: clamp(17px, 1.18vw, 22px);
    font-weight: 400;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease;
}

.hp-menu-link::after {
    position: absolute;
    right: 18px;
    bottom: 0;
    left: 18px;
    height: 4px;
    background: var(--hp-accent);
    content: "";
    opacity: 0;
    transform: scaleX(.35);
    transition: opacity .2s ease, transform .2s ease;
}

.hp-menu-item:hover > .hp-menu-link-row .hp-menu-link,
.hp-menu-item:focus-within > .hp-menu-link-row .hp-menu-link,
.hp-menu-item.is-current > .hp-menu-link-row .hp-menu-link {
    color: var(--hp-accent);
}

.hp-menu-item:hover > .hp-menu-link-row .hp-menu-link::after,
.hp-menu-item:focus-within > .hp-menu-link-row .hp-menu-link::after,
.hp-menu-item.is-current > .hp-menu-link-row .hp-menu-link::after {
    opacity: 1;
    transform: scaleX(1);
}

.hp-submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 42px;
    margin: 0 12px 0 -20px;
    padding: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: #424242;
    cursor: pointer;
}

.hp-site-header .hp-chevron {
    display: block;
    width: 12px;
    height: 8px;
    overflow: visible;
    transition: transform .2s ease;
}

.hp-site-header .hp-chevron path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hp-standard-submenu {
    position: absolute;
    top: calc(100% - 28px);
    left: 16px;
    visibility: hidden;
    min-width: 240px;
    margin: 0;
    padding: 12px 0;
    border: 1px solid #ececec;
    border-radius: 2px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(0, 0, 0, .1);
    list-style: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.hp-standard-submenu li {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hp-standard-submenu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-size: 15px;
    text-decoration: none;
}

.hp-standard-submenu a:hover,
.hp-standard-submenu a:focus {
    color: var(--hp-accent);
}

.hp-standard-submenu ul {
    margin: 0;
    padding: 0 0 0 18px;
    list-style: none;
}

.hp-menu-item:hover > .hp-standard-submenu,
.hp-menu-item:focus-within > .hp-standard-submenu,
.hp-menu-item.is-open > .hp-standard-submenu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.hp-product-menu {
    position: static;
}

.hp-product-mega {
    position: absolute;
    top: 100%;
    right: auto;
    left: var(--hp-mega-left, 0);
    visibility: hidden;
    z-index: 10000;
    width: var(--hp-mega-width, 100%);
    max-width: none;
    max-height: var(--hp-mega-max-height, calc(100vh - 180px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #aeb6bc #f2f4f5;
    scrollbar-width: thin;
    border-top: 1px solid #ededed;
    background: #fff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .12);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
}

.hp-product-mega::-webkit-scrollbar {
    width: 8px;
}

.hp-product-mega::-webkit-scrollbar-track {
    background: #f2f4f5;
}

.hp-product-mega::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: #aeb6bc;
}

.hp-product-menu:hover > .hp-product-mega,
.hp-product-menu:focus-within > .hp-product-mega,
.hp-product-menu.is-open > .hp-product-mega {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.hp-mega-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 34px 32px;
    width: calc(100% - 80px);
    max-width: none;
    margin: 0 auto;
    padding: 34px 0 42px;
}

/* Danh mục đầu dài sẽ chiếm 2 phần và được tách thành 2 cột. */
.hp-mega-inner--has-split {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hp-category-column--split {
    grid-column: span 2;
}

.hp-category-child-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.hp-category-column {
    min-width: 0;
    margin: 0;
}

.hp-category-parent {
    display: block;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--hp-accent);
    color: #222;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.hp-category-children,
.hp-category-children ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hp-category-children li {
    margin: 0;
    padding: 0;
}

.hp-category-children li > a {
    display: block;
    padding: 6px 0;
    color: #4a4a4a;
    font-size: 14px;
    line-height: 1.42;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color .18s ease, transform .18s ease;
}

.hp-category-children li > a:hover,
.hp-category-children li > a:focus,
.hp-category-parent:hover,
.hp-category-parent:focus {
    color: var(--hp-accent);
}

.hp-category-children ul {
    padding-left: 14px;
}

.hp-category-children ul a {
    position: relative;
    padding-left: 12px;
    font-size: 13px;
}

.hp-category-children ul a::before {
    position: absolute;
    top: 14px;
    left: 0;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #b7b7b7;
    content: "";
}

.hp-mobile-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 10px 8px !important;
    appearance: none;
    border: 0 !important;
    border-radius: 50% !important;
    outline: 0;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--hp-accent);
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}

.hp-mobile-toggle > span:not(.screen-reader-text) {
    display: block;
    width: 27px;
    height: 2px;
    margin: 5px auto;
    border: 0 !important;
    border-radius: 99px;
    background: currentColor !important;
    box-shadow: none !important;
    transform-origin: center;
    transition: transform .22s ease, opacity .16s ease, width .2s ease;
}

.hp-mobile-toggle > span:nth-child(2) {
    width: 21px;
    margin-right: 0;
}

.hp-mobile-toggle:hover,
.hp-mobile-toggle:focus-visible {
    background: rgba(22, 143, 229, .1) !important;
    color: var(--hp-accent);
}

.hp-mobile-toggle[aria-expanded="true"] > span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hp-mobile-toggle[aria-expanded="true"] > span:nth-child(2) {
    opacity: 0;
}

.hp-mobile-toggle[aria-expanded="true"] > span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hp-site-header .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 1200px) {
    .hp-menu-link {
        padding-right: 17px;
        padding-left: 17px;
        font-size: 17px;
    }

    .hp-submenu-toggle {
        margin-right: 4px;
        margin-left: -12px;
    }

    .hp-mega-inner {
        grid-template-columns: repeat(4, minmax(160px, 1fr));
    }

    .hp-mega-inner--has-split {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    body.hp-mobile-menu-open {
        overflow: hidden !important;
        touch-action: none;
    }

    .hp-header-inner {
        z-index: 10002;
        width: min(calc(100% - 32px), var(--hp-max-width));
        min-height: 84px;
        background: #fff;
    }

    .hp-mobile-toggle {
        display: block;
    }

    .hp-main-nav {
        position: fixed;
        top: var(--hp-mobile-nav-top, 84px);
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        z-index: 10001;
        width: 100vw;
        height: auto;
        max-height: none;
        overflow-y: auto;
        overscroll-behavior: contain;
        border: 0 !important;
        background: #fff;
        box-shadow: -18px 0 45px rgba(0, 0, 0, .12);
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translate3d(100%, 0, 0);
        transition: transform .38s cubic-bezier(.22, 1, .36, 1), opacity .24s ease, visibility 0s linear .38s;
        -webkit-overflow-scrolling: touch;
    }

    .hp-site-header.is-mobile-open .hp-main-nav {
        display: block;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translate3d(0, 0, 0);
        transition-delay: 0s;
    }

    .hp-menu-list {
        display: block;
        height: auto;
        min-height: 100%;
        padding: 24px 20px 40px;
    }

    .hp-menu-item {
        position: relative;
        display: block;
        padding: 0 16px;
        border: 0 !important;
    }

    .hp-menu-link-row {
        min-height: 62px;
    }

    .hp-menu-link {
        flex: 1 1 auto;
        min-width: 0;
        height: auto;
        padding: 18px 4px;
        font-size: 18px;
    }

    .hp-menu-link::after {
        right: auto;
        bottom: 8px;
        left: 4px;
        width: 42px;
        height: 3px;
    }

    .hp-submenu-toggle {
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
        margin: 0 -8px 0 8px;
    }

    .hp-menu-item.is-open > .hp-menu-link-row .hp-chevron {
        transform: rotate(180deg);
    }

    .hp-standard-submenu,
    .hp-product-mega {
        position: static;
        display: none;
        visibility: visible;
        width: auto;
        min-width: 0;
        max-height: none;
        margin: 0 -16px;
        padding: 0;
        overflow: visible;
        border: 0;
        background: #f8fbfd;
        box-shadow: none;
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hp-menu-item:hover > .hp-standard-submenu,
    .hp-menu-item:focus-within > .hp-standard-submenu,
    .hp-product-menu:hover > .hp-product-mega,
    .hp-product-menu:focus-within > .hp-product-mega {
        display: none;
    }

    .hp-menu-item.is-open > .hp-standard-submenu,
    .hp-product-menu.is-open > .hp-product-mega {
        display: block;
    }

    .hp-standard-submenu {
        padding: 8px 12px 14px;
    }

    .hp-mega-inner {
        display: block;
        width: 100%;
        padding: 8px 20px 22px;
    }

    .hp-category-column--split {
        grid-column: auto;
    }

    .hp-category-child-columns {
        display: block;
    }

    .hp-category-column {
        padding: 14px 0;
        border-bottom: 1px solid #e2e7ea;
    }

    .hp-category-column:last-child {
        border-bottom: 0;
    }

    .hp-category-parent {
        margin-bottom: 7px;
        padding-bottom: 7px;
        border-bottom-width: 1px;
        font-size: 15px;
    }
}

@media (max-width: 568px) {
    .hp-header-inner {
        min-height: 74px;
    }

    .hp-menu-list {
        padding-right: 18px;
        padding-left: 18px;
    }

}
