/*
 * Thanh menu: desktop (>=1201px) là thanh ngang dính trên đầu thay cho sidebar
 * 300px của template; ≤1200px giữ bottom nav + ngăn kéo, chỉ đổi màu cho khớp
 * bộ nhận diện mới (tím đen / hồng / lavender). Nạp sau site.css nên thắng
 * các rule sidebar cũ mà không cần sửa chúng.
 */
.header-sidenav .full-sidenav {
    background: #1e1410 !important;
    background-image: none !important;
    overflow-y: auto;
}
.header-sidenav .full-sidenav .brand-positioning { color: #ebdcc3; }

/* Ngăn kéo (≤1200px): đồng bộ màu */
.header-sidenav .order-cta,
.header-sidenav .order-cta.is-current {
    background: #f28c28;
    color: #1e1410;
    border: 2px solid #fffbf2;
    box-shadow: none;
    font-family: "Be Vietnam Pro", sans-serif;
    text-transform: none;
    letter-spacing: 0;
    font-size: 16px;
}
.header-sidenav .order-cta:hover,
.header-sidenav .order-cta:focus { color: #1e1410; background: #d6f56a; box-shadow: none; }
.header-sidenav .sidenav-utility a { background: rgba(235, 220, 195, .16); color: #ebdcc3; font-family: "Be Vietnam Pro", sans-serif; text-transform: none; font-size: 13px; }
.header-sidenav .sidenav-utility a:hover,
.header-sidenav .sidenav-utility a.active { background: #ebdcc3; color: #1e1410; }
.header-sidenav .header-nav .navbar-nav li.active { background: rgba(242, 140, 40, .14); border-left-color: #f28c28; }
.header-sidenav .header-nav .navbar-nav li.active > a { color: #f28c28 !important; }
.header-sidenav .navbar-nav > li > a { font-family: "Be Vietnam Pro", sans-serif; text-transform: none; font-size: 17px; font-weight: 600; letter-spacing: 0; }
.sidenav-info i, .sidenav-info svg.ic { color: #f28c28; }

@media (min-width: 1201px) {
    .site-header.header-sidenav { position: sticky; top: 0; z-index: 1000; }
    .header-sidenav + .page-content #main { margin-left: 0; }

    .header-sidenav .full-sidenav {
        position: static;
        width: auto;
        height: 76px;
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 32px;
        padding: 0 clamp(20px, 5vw, 72px);
        border-bottom: 2px solid #1e1410;
        overflow: visible;
    }
    .header-sidenav .full-sidenav > * { margin: 0; }
    .header-sidenav .header-nav .logo-header,
    .header-sidenav .header-nav .logo-header a { padding: 0; }
    .header-sidenav .header-nav .logo-header img { height: 64px; width: auto; max-width: none; margin: 0; }

    .brand-positioning, .sidenav-info, .footer-menu, .menu-close { display: none !important; }

    /* Mục điều hướng nằm ngang, chiếm khoảng giữa */
    .header-sidenav .header-nav .navbar-nav { order: 2; flex: 1; display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 4px; padding: 0; float: none; margin: 0; }
    .header-sidenav .header-nav .navbar-nav li { float: none; border: 0 !important; background: none !important; }
    .header-sidenav .header-nav .navbar-nav > li > a { padding: 8px 14px; border-radius: 10px; color: #fffbf2 !important; font-size: 16px; }
    .header-sidenav .header-nav .navbar-nav > li > a:hover { background: rgba(235, 220, 195, .2); }
    .header-sidenav .header-nav .navbar-nav li.active > a { background: #ebdcc3; color: #1e1410 !important; padding-left: 14px; }

    /* Lối phụ: gọn thành dòng chữ nhỏ */
    .sidenav-utility { order: 3; display: flex; gap: 4px; }
    .sidenav-utility a { min-height: 0; padding: 6px 10px; background: none; border-radius: 8px; }
    .sidenav-utility a:last-child:nth-child(odd) { grid-column: auto; }

    .header-sidenav .order-cta { order: 4; padding: 11px 24px; border-radius: 12px; border-color: #1e1410; box-shadow: 2px 2px 0 #ebdcc3; white-space: nowrap; }
    .header-sidenav .order-cta:hover { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #ebdcc3; }

    .mobile-nav-overlay { display: none !important; }
}
@media (min-width: 1201px) {
    .header-sidenav.dark .header-nav .navbar-nav > li > a { font-family: "Be Vietnam Pro", sans-serif; text-transform: none; font-weight: 600; font-size: 16px; letter-spacing: 0; white-space: nowrap; }
    .header-sidenav .header-nav .logo-header,
    .header-sidenav .header-nav .logo-header a { border: 0 !important; }
    .header-sidenav .header-nav .logo-header { flex: none; width: auto !important; }
    .header-sidenav .header-nav .logo-header a { display: block; width: auto !important; }
    .header-sidenav .header-nav .logo-header img { width: auto !important; height: 64px !important; max-width: none !important; }
    .header-sidenav .header-nav .logo-header::after, .header-sidenav .header-nav .logo-header::before { display: none; }
    .sidenav-utility a { white-space: nowrap; font-size: 13px; }
}

/* Màn 1201–1500px: lối phụ chỉ còn icon, bỏ nút ngôn ngữ (có ở footer), siết khoảng cách */
@media (min-width: 1201px) and (max-width: 1500px) {
    .header-sidenav .full-sidenav { gap: 16px; }
    .header-sidenav .header-nav .navbar-nav > li > a { padding: 8px 10px; font-size: 15px; }
    .sidenav-utility a { font-size: 0 !important; padding: 8px 10px; }
    .sidenav-utility a svg.ic { font-size: 16px; }
    .sidenav-utility a:last-child { display: none; }
    .header-sidenav .order-cta { padding: 11px 18px; font-size: 15px; }
}

/* Thanh điều hướng dưới cùng (≤1200px) theo bộ nhận diện mới */
@media (max-width: 1200px) {
    .mobile-bottom-nav { background: #1e1410; border-top: 2px solid #1e1410; box-shadow: 0 -3px 0 rgba(30, 20, 16, .12); }
    .bottom-nav-item { color: #ebdcc3; font-family: "Be Vietnam Pro", sans-serif; font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; }
    .bottom-nav-item:hover, .bottom-nav-item:focus { color: #fffbf2; }
    .bottom-nav-item.active { color: #1e1410; background: #ebdcc3; border-radius: 12px; margin: 5px 2px; padding-top: 4px; padding-bottom: 3px; }
    .bottom-nav-cta { color: #ebdcc3; }
    .bottom-nav-cta-icon { background: #f28c28; color: #1e1410; border: 2px solid #1e1410; box-shadow: 2px 2px 0 #ebdcc3; }
    .bottom-nav-cta.active, .bottom-nav-cta:hover, .bottom-nav-cta:focus { color: #fffbf2; background: none; }
}

/* Ngăn kéo mobile: font và nút đóng theo bộ nhận diện mới */
.header-sidenav.dark .header-nav .navbar-nav > li > a { font-family: "Be Vietnam Pro", sans-serif; text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 17px; }
.header-sidenav .brand-positioning { font-family: "Be Vietnam Pro", sans-serif; letter-spacing: .04em; }
.header-sidenav .sidenav-info p, .header-sidenav .sidenav-info a { font-family: "Be Vietnam Pro", sans-serif; }
.header-sidenav .menu-close { background: #f28c28; color: #1e1410; border: 2px solid #ebdcc3; border-radius: 12px; }

/* Logo giữ nguyên hình dạng, không bo tròn */
.header-sidenav .header-nav .logo-header img { border-radius: 0; }


/* Menu chọn ngôn ngữ (thanh trên): một nút gọn, danh sách mở ra bên dưới. */
.header-sidenav .lang-menu { position: relative; }
.header-sidenav .lang-menu > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: 8px; white-space: nowrap;
    background: rgba(235, 220, 195, .16); color: #ebdcc3;
    font-family: "Be Vietnam Pro", sans-serif; font-size: 13px; font-weight: 600;
}
.header-sidenav .lang-menu > summary::-webkit-details-marker { display: none; }
.header-sidenav .lang-menu[open] > summary,
.header-sidenav .lang-menu > summary:hover { background: #ebdcc3; color: #1e1410; }
.header-sidenav .lang-menu-list {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 1100; min-width: 190px;
    display: flex; flex-direction: column; gap: 2px; padding: 6px;
    background: #1e1410; border: 1px solid rgba(235, 220, 195, .25); border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}
.header-sidenav .sidenav-utility .lang-menu-list a {
    display: flex !important; align-items: center; gap: 8px; padding: 9px 12px !important;
    font-size: 14px !important; border-radius: 8px; background: none; white-space: nowrap;
}
.header-sidenav .sidenav-utility .lang-menu-list a:hover { background: #ebdcc3; color: #1e1410; }

/* Màn 1201–1500px: nút chỉ còn quả địa cầu + cờ */
@media (min-width: 1201px) and (max-width: 1500px) {
    .header-sidenav .lang-menu > summary .lang-label { display: none; }
    .header-sidenav .lang-menu > summary { font-size: 16px; padding: 8px 10px; }
}

/* Thanh trượt bên trái trên điện thoại: danh sách mở ngay trong dòng, không nổi lên che. */
@media (max-width: 1200px) {
    .header-sidenav .lang-menu { grid-column: 1 / -1; }
    .header-sidenav .lang-menu-list { position: static; margin-top: 6px; min-width: 0; box-shadow: none; }
}

/* Cờ trong menu chọn ngôn ngữ: file SVG thật (không dùng emoji cờ). */
.lang-flag {
    width: 20px;
    height: 15px;
    flex: none;
    border-radius: 2px;
    object-fit: cover;
    vertical-align: -2px;
    margin-right: 6px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .25);
}
.header-sidenav .lang-menu-list a .lang-flag { margin-right: 10px; }
.lang-flag + .lang-label { margin-left: 0; }
@media (min-width: 1201px) and (max-width: 1500px) {
    .header-sidenav .lang-menu > summary .lang-flag { margin-right: 0; }
}
.lang-menu > summary .lang-caret { width: 14px; height: 14px; margin-left: 6px; vertical-align: -2px; transition: transform .15s; }
.lang-menu[open] > summary .lang-caret { transform: rotate(180deg); }

/* Header sáng trên desktop để hợp logo màu nâu (mobile giữ nền tối) */
@media (min-width: 1201px) {
    .header-sidenav .full-sidenav { background: #fffbf2 !important; }
    .header-sidenav .header-nav .navbar-nav > li > a { color: #1e1410 !important; }
    .header-sidenav .header-nav .navbar-nav > li > a:hover { background: rgba(30, 20, 16, .08); }
    .header-sidenav .header-nav .navbar-nav li.active > a { background: #1e1410; color: #fffbf2 !important; }
    .header-sidenav .sidenav-utility > a,
    .header-sidenav .lang-menu > summary { background: rgba(30, 20, 16, .08); color: #1e1410; }
    .header-sidenav .sidenav-utility > a:hover,
    .header-sidenav .lang-menu[open] > summary,
    .header-sidenav .lang-menu > summary:hover { background: #1e1410; color: #fffbf2; }
    .header-sidenav .order-cta { box-shadow: 2px 2px 0 #1e1410; }
    .header-sidenav .order-cta:hover { box-shadow: 1px 1px 0 #1e1410; }
}

/* Ngăn kéo mobile (≤1200px) cũng nền sáng để logo nâu không bị chìm */
@media (max-width: 1200px) {
    .header-sidenav .full-sidenav { background: #fffbf2 !important; }
    .header-sidenav .full-sidenav .brand-positioning { color: #1e1410; border-color: rgba(30, 20, 16, .2); }
    .header-sidenav .header-nav .navbar-nav > li > a { color: #1e1410 !important; }
    .header-sidenav .header-nav .navbar-nav li.active { background: rgba(30, 20, 16, .08); }
    .header-sidenav .header-nav .navbar-nav li.active > a { color: #1e1410 !important; }
    .header-sidenav .sidenav-utility a,
    .header-sidenav .lang-menu > summary { background: rgba(30, 20, 16, .08); color: #1e1410; }
    .header-sidenav .sidenav-utility a:hover,
    .header-sidenav .sidenav-utility a.active,
    .header-sidenav .lang-menu[open] > summary { background: #1e1410; color: #fffbf2; }
    .header-sidenav .order-cta { border-color: #1e1410; }
    .sidenav-info { border-top-color: rgba(30, 20, 16, .2); }
    .sidenav-info p, .sidenav-info a { color: #1e1410; }
    .header-sidenav .footer-menu, .header-sidenav .footer-menu a { color: #1e1410; }
}
