/*
 * HCTCLIENT01 Main Menu 1 — Bé Ơi Style V19
 * Đồng bộ visual với Main 2/3, giữ nguyên hover/submenu/mega của Main 1.
 */

.hctclient01-menu-main-1,
.hct-menu--pc-main-1 {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    list-style: none;
    border-radius: 18px;
}

.hctclient01-menu-main-1 .hct-menu-item,
.hct-menu--pc-main-1 .hct-menu-item {
    --hct-menu-row-size: 42px;
    position: relative;
    min-width: 0;
}

.hctclient01-menu-main-1 .hct-menu-item > .hct-menu-item__head,
.hct-menu--pc-main-1 .hct-menu-item > .hct-menu-item__head {
    display: flex;
    align-items: stretch;
    min-width: 0;
    height: var(--hct-menu-row-size);
    min-height: var(--hct-menu-row-size);
    max-height: var(--hct-menu-row-size);
    overflow: hidden;
    border-radius: 21px;
    background: #fff9f7;
    color: #4b3531;
    transition:
        transform .18s ease,
        background-color .18s ease,
        border-color .18s ease,
        color .18s ease,
        box-shadow .18s ease;
}

.hctclient01-menu-main-1 > .hct-menu-item > .hct-menu-item__head:hover,
.hct-menu--pc-main-1 > .hct-menu-item > .hct-menu-item__head:hover,
.hctclient01-menu-main-1 > .hct-menu-item.is-ui-open > .hct-menu-item__head,
.hct-menu--pc-main-1 > .hct-menu-item.is-ui-open > .hct-menu-item__head {
    transform: translateY(-1px);
    border-color: #f3c6bf;
    background: #fff;
    color: #cf201c;
    box-shadow: 0 8px 18px rgba(205, 39, 31, .09);
}

.hctclient01-menu-main-1 .hct-menu-link,
.hct-menu--pc-main-1 .hct-menu-link {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: var(--hct-menu-row-size);
    min-height: var(--hct-menu-row-size);
    max-height: var(--hct-menu-row-size);
    padding: 0 20px;
    box-sizing: border-box;
    color: inherit;
    font-size: var(--hctclient01-text-meta);
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hctclient01-menu-main-1 .hct-menu-toggle,
.hct-menu--pc-main-1 .hct-menu-toggle {
    display: grid;
    flex: 0 0 var(--hct-menu-row-size);
    place-items: center;
    width: var(--hct-menu-row-size);
    height: var(--hct-menu-row-size);
    min-width: var(--hct-menu-row-size);
    min-height: var(--hct-menu-row-size);
    max-width: var(--hct-menu-row-size);
    max-height: var(--hct-menu-row-size);
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff9f7;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease;
}

.hctclient01-menu-main-1 .hct-menu-toggle:hover,
.hct-menu--pc-main-1 .hct-menu-toggle:hover {
    background: rgba(216, 35, 31, .14);
    color: black;
}



.hct-menu--pc-main-1 .hct-menu-item.is-active > .hct-menu-item__head .hct-menu-toggle{
    background: #fff;
    color: var(--hctclient01-color-primary);
}
.hct-menu--pc-main-1 .hct-menu-item.is-active > .hct-menu-item__head .hct-menu-toggle:hover{
    background: #fff;
    color: var(--hctclient01-color-primary);
}

.hctclient01-menu-main-1 .hct-menu-arrow,
.hct-menu--pc-main-1 .hct-menu-arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform .18s ease;
}

.hctclient01-menu-main-1 .hct-menu-item.is-ui-open > .hct-menu-item__head .hct-menu-arrow,
.hct-menu--pc-main-1 .hct-menu-item.is-ui-open > .hct-menu-item__head .hct-menu-arrow,
.hctclient01-menu-main-1 .hct-menu-item.is-open > .hct-menu-item__head .hct-menu-arrow,
.hct-menu--pc-main-1 .hct-menu-item.is-open > .hct-menu-item__head .hct-menu-arrow {
    transform: rotate(225deg) translate(-1px, -1px);
}

.hctclient01-menu-main-1 .hct-menu-item.is-current > .hct-menu-item__head,
.hctclient01-menu-main-1 .hct-menu-item.is-active > .hct-menu-item__head,
.hctclient01-menu-main-1 .hct-menu-item.is-active-path > .hct-menu-item__head,
.hct-menu--pc-main-1 .hct-menu-item.is-current > .hct-menu-item__head,
.hct-menu--pc-main-1 .hct-menu-item.is-active > .hct-menu-item__head,
.hct-menu--pc-main-1 .hct-menu-item.is-active-path > .hct-menu-item__head {
    border-color: var(--hctclient01-color-primary);
    background: linear-gradient(135deg, var(--hctclient01-color-primary), var(--hctclient01-color-primary-hover));
    color: #fff;
    box-shadow: 0 8px 18px rgba(201, 22, 18, .2);
}

/* Popup list */
.hctclient01-menu-main-1 .hct-menu-popup,
.hct-menu--pc-main-1 .hct-menu-popup,
.hctclient01-menu-main-1 .hct-sub-menu,
.hct-menu--pc-main-1 .hct-sub-menu {
    position: absolute;
    z-index: var(--hctclient01-z-dropdown, 700);
    top: calc(100% + 9px);
    left: 0;
    min-width: 250px;
    max-width: min(720px, calc(100vw - 32px));
    margin: 0;
    padding: 10px;
    list-style: none;
    border: 1px solid #f4d9d4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 48px rgba(112, 42, 31, .16);
}

.hctclient01-menu-main-1 [data-hct-sub-menu][hidden],
.hct-menu--pc-main-1 [data-hct-sub-menu][hidden],
.hctclient01-menu-main-1 .hct-menu-popup[hidden],
.hct-menu--pc-main-1 .hct-menu-popup[hidden] {
    display: none !important;
}

.hctclient01-menu-main-1 .hct-menu-popup .hct-menu-item,
.hct-menu--pc-main-1 .hct-menu-popup .hct-menu-item,
.hctclient01-menu-main-1 .hct-sub-menu .hct-menu-item,
.hct-menu--pc-main-1 .hct-sub-menu .hct-menu-item {
    --hct-menu-row-size: 42px;
    width: 100%;
}

.hctclient01-menu-main-1 .hct-menu-popup .hct-menu-item__head,
.hct-menu--pc-main-1 .hct-menu-popup .hct-menu-item__head,
.hctclient01-menu-main-1 .hct-sub-menu .hct-menu-item__head,
.hct-menu--pc-main-1 .hct-sub-menu .hct-menu-item__head {
    width: 100%;
    border-radius: 11px;
    background: transparent;
    color: #4c3631;
}

.hctclient01-menu-main-1 .hct-menu-popup .hct-menu-item__head:hover,
.hct-menu--pc-main-1 .hct-menu-popup .hct-menu-item__head:hover,
.hctclient01-menu-main-1 .hct-sub-menu .hct-menu-item__head:hover,
.hct-menu--pc-main-1 .hct-sub-menu .hct-menu-item__head:hover {
    transform: none;
    border-color: transparent;
    background: #fff2ef;
    color: var(--hctclient01-color-primary);
    box-shadow: none;
}

.hctclient01-menu-main-1 .hct-menu-popup .hct-menu-link,
.hct-menu--pc-main-1 .hct-menu-popup .hct-menu-link,
.hctclient01-menu-main-1 .hct-sub-menu .hct-menu-link,
.hct-menu--pc-main-1 .hct-sub-menu .hct-menu-link {
    padding: 0 12px;
    border-radius: 11px;
    font-weight: 600;
}

.hctclient01-menu-main-1 .hct-menu-popup .hct-menu-popup,
.hct-menu--pc-main-1 .hct-menu-popup .hct-menu-popup,
.hctclient01-menu-main-1 .hct-sub-menu .hct-sub-menu,
.hct-menu--pc-main-1 .hct-sub-menu .hct-sub-menu {
    top: -10px;
    left: calc(100% + 8px);
}

/* Mega: chỉ một box ngoài, không tạo style box cho group bên trong. */
.hctclient01-menu-main-1 .hct-menu-popup--mega.hct-mega-menu,
.hct-menu--pc-main-1 .hct-menu-popup--mega.hct-mega-menu,
.hctclient01-menu-main-1 > .hct-menu-item > .hct-mega-menu,
.hct-menu--pc-main-1 > .hct-menu-item > .hct-mega-menu {
    display: grid;
    position: absolute;
    z-index: var(--hctclient01-z-dropdown, 700);
    top: calc(100% + 9px);
    left: 50%;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    width: max-content;
    min-width: min(620px, calc(100vw - 32px));
    max-width: min(920px, calc(100vw - 32px));
    margin: 0;
    padding: 12px;
    transform: translateX(-50%);
    border: 1px solid #f4d9d4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 48px rgba(112, 42, 31, .16);
}

.hctclient01-menu-main-1 .hct-menu-popup--mega.hct-mega-menu[hidden],
.hct-menu--pc-main-1 .hct-menu-popup--mega.hct-mega-menu[hidden],
.hctclient01-menu-main-1 > .hct-menu-item > .hct-mega-menu[hidden],
.hct-menu--pc-main-1 > .hct-menu-item > .hct-mega-menu[hidden] {
    display: none !important;
}

.hctclient01-menu-main-1 .hct-mega-menu__group,
.hct-menu--pc-main-1 .hct-mega-menu__group {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.hctclient01-menu-main-1 .hct-mega-menu__title,
.hct-menu--pc-main-1 .hct-mega-menu__title {
    margin: 0 0 7px;
    padding: 0 8px;
    color: var(--hctclient01-color-primary);
    font-size: var(--hctclient01-text-caption);
    font-weight: 800;
    text-transform: uppercase;
}

.hctclient01-menu-main-1 .hct-mega-menu__items,
.hct-menu--pc-main-1 .hct-mega-menu__items {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hctclient01-menu-main-1 [role="menuitem"]:focus-visible,
.hct-menu--pc-main-1 [role="menuitem"]:focus-visible {
    outline: 2px solid var(--hctclient01-color-primary);
    outline-offset: 2px;
}

@media (max-width: 1199px) {
    .hctclient01-menu-main-1,
    .hct-menu--pc-main-1 {
        gap: 6px;
        padding: 6px;
    }

    .hctclient01-menu-main-1 .hct-menu-link,
    .hct-menu--pc-main-1 .hct-menu-link {
        padding-inline: 11px;
        font-size: var(--hctclient01-text-meta);
    }
}

@media (max-width: 991px) {
    .hctclient01-menu-main-1,
    .hct-menu--pc-main-1 {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hctclient01-menu-main-1 *,
    .hct-menu--pc-main-1 * {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* ========================================================================== 
   V20 — Main 1 alignment / submenu wrapper / full-width mega fixes
   ========================================================================== */

/* Root is the positioning context for full-width mega menus. */
.hctclient01-menu-main-1,
.hct-menu--pc-main-1 {
    position: relative;
}

/* Ensure text is vertically centered in every state, including active/current. */
.hctclient01-menu-main-1 .hct-menu-link > .hct-menu-title,
.hct-menu--pc-main-1 .hct-menu-link > .hct-menu-title {
    display: flex;
    align-items: center;
    height: 100%;
    min-height: 0;
    line-height: 1.2;
}

/* Top-level labels are also visually centered inside their pill. */
.hctclient01-menu-main-1 > .hct-menu-item > .hct-menu-item__head > .hct-menu-link,
.hct-menu--pc-main-1 > .hct-menu-item > .hct-menu-item__head > .hct-menu-link {
    justify-content: center;
}

/*
 * List submenu owns exactly one visual box: .hct-menu-popup.
 * The inner wrapper and UL are layout-only and must not receive popup styling.
 */
.hctclient01-menu-main-1 .hct-menu-popup--submenu,
.hct-menu--pc-main-1 .hct-menu-popup--submenu {
    position: absolute;
    z-index: var(--hctclient01-z-dropdown, 700);
    top: calc(100% + 9px);
    left: 0;
    min-width: 250px;
    max-width: min(720px, calc(100vw - 32px));
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #f4d9d4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 48px rgba(112, 42, 31, .16);
}

.hctclient01-menu-main-1 .hct-menu-popup--submenu > .hct-menu-popup__inner,
.hct-menu--pc-main-1 .hct-menu-popup--submenu > .hct-menu-popup__inner {
    position: static;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.hctclient01-menu-main-1 .hct-menu-popup--submenu > .hct-menu-popup__inner > .hct-sub-menu,
.hct-menu--pc-main-1 .hct-menu-popup--submenu > .hct-menu-popup__inner > .hct-sub-menu {
    position: static;
    display: grid;
    width: 100%;
    min-width: 0;
    max-width: none;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

/* Recursive list submenu: position only the popup of the child item. */
.hctclient01-menu-main-1 .hct-menu-popup--submenu .hct-menu-item > .hct-menu-popup--submenu,
.hct-menu--pc-main-1 .hct-menu-popup--submenu .hct-menu-item > .hct-menu-popup--submenu {
    top: -10px;
    left: calc(100% + 8px);
}

/*
 * Mega at level 1 spans the full Main 1 menu width and starts at root left 0.
 * position: static removes the LI as containing block, so the root menu controls it.
 */
.hctclient01-menu-main-1 > .hct-menu-item.has-groups,
.hct-menu--pc-main-1 > .hct-menu-item.has-groups {
    position: static;
}

.hctclient01-menu-main-1 > .hct-menu-item.has-groups > .hct-menu-popup--mega.hct-mega-menu,
.hct-menu--pc-main-1 > .hct-menu-item.has-groups > .hct-menu-popup--mega.hct-mega-menu {
    top: calc(100% + 9px);
    right: auto;
    left: 0;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transform: none;
}

.hctclient01-menu-main-1 .hct-menu-item.is-current > .hct-menu-item__head, .hctclient01-menu-main-1 .hct-menu-item.is-active > .hct-menu-item__head, .hctclient01-menu-main-1 .hct-menu-item.is-active-path > .hct-menu-item__head, .hct-menu--pc-main-1 .hct-menu-item.is-current > .hct-menu-item__head, .hct-menu--pc-main-1 .hct-menu-item.is-active > .hct-menu-item__head, .hct-menu--pc-main-1 .hct-menu-item.is-active-path > .hct-menu-item__head