/* ==========================================================================
   HEADER CSS - LIGHTUI CHILD THEME (EXACT PEONY MATCH)
   ========================================================================== */

.agency-header-v2,
.agency-header-v2 *,
.ah-mobile-drawer,
.ah-mobile-drawer * {
    font-family: var(--font-lexend, "Lexend", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    box-sizing: border-box;
}

/* 1. CONTAINER CHUNG (STICKY HEADER) */
.agency-header-v2 {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.admin-bar .agency-header-v2 {
    top: 32px;
}
@media screen and (max-width: 782px) {
    body.admin-bar .agency-header-v2 {
        top: 46px;
    }
}

.ah-container {
    max-width: var(--container-max-w, 1200px);
    width: 100%;
    margin: 0 auto;
    padding-left: var(--container-pad-x, 15px);
    padding-right: var(--container-pad-x, 15px);
    box-sizing: border-box;
}

/* 2. TẦNG 1: TOP BAR XANH */
.ah-top-bar {
    background-color: #0082c8;
    padding: 10px 0;
    color: #ffffff;
    font-size: 15px;
}

.ah-top-bar-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.ah-top-bar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.ah-top-nav,
.ah-top-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

.ah-top-menu-list li {
    display: inline-flex;
    align-items: center;
}

.ah-top-menu-list a {
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.ah-top-menu-list a:hover {
    opacity: 0.85;
}

/* 3. TẦNG 2: MAIN HEADER (LOGO GIỮA - SEARCH & PHONE PHẢI) */
.ah-main-header {
    background-color: #ffffff;
    padding: 18px 0;
}

.ah-main-header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.ah-left-spacer {
    /* Khung trống cân giữa Logo */
}

.ah-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ah-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.ah-logo .logo-main {
    max-height: 56px;
    width: auto;
    object-fit: contain;
    display: block;
}

.ah-logo .site-title-text {
    font-size: 28px;
    font-weight: 700;
    color: #0082c8;
}

.ah-right-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

/* Ô TÌM KIẾM SẢN PHẨM - CHUẨN THEO MẪU PEONY */
.ah-search-form {
    display: flex;
    align-items: center;
    background-color: #eeeeee;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    width: 320px;
    height: 42px;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

.ah-search-form:focus-within {
    background-color: #e5e5e5;
}

.ah-search-icon {
    background: transparent;
    border: none;
    padding: 0;
    margin-right: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
}

.ah-search-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2px;
}

.ah-search-input {
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 15px;
    line-height: 1;
    width: 100%;
    color: #333333;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.ah-search-input::placeholder {
    color: #666666;
    font-size: 15px;
}

/* HOTLINE PHONE ICON */
.ah-phone-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2b1d14;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 4px;
}

.ah-phone-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.8px;
}

.ah-phone-btn:hover {
    color: #0082c8;
    transform: scale(1.05);
}

/* 4. TẦNG 3: DESKTOP NAVIGATION BAR */
.ah-navigation-bar {
    background-color: #ffffff;
    border-top: 1px solid #f2f2f2;
}

.ah-main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ah-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.ah-menu-list > li {
    position: relative;
    padding: 16px 0;
}

.ah-menu-list > li > a {
    color: #222222;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.ah-menu-list > li:hover > a,
.ah-menu-list > li.current-menu-item > a,
.ah-menu-list > li.current-menu-parent > a {
    color: #0082c8;
}

/* SUBMENU DROPDOWN */
.ah-menu-list ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    z-index: 999;
}

.ah-menu-list li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ah-menu-list ul.sub-menu li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 18px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
    transition: all 0.15s ease;
}

.ah-menu-list ul.sub-menu li a:hover {
    background-color: #f8fafc;
    color: #0082c8;
}

/* 5. MOBILE DRAWER */
.ah-mobile-menu-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ah-mobile-menu-toggle .bar {
    width: 24px;
    height: 2.5px;
    background-color: #1e293b;
    border-radius: 2px;
}

.ah-mobile-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.ah-mobile-phone-btn {
    color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.ah-mobile-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ah-mobile-drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.ah-mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #ffffff;
    z-index: 99999;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ah-mobile-drawer.is-open {
    transform: translateX(0);
}

.ah-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #0082c8;
    color: #ffffff;
}

.ah-drawer-header .drawer-title {
    font-weight: 700;
    font-size: 14.5px;
}

.ah-drawer-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 26px;
    cursor: pointer;
}

.ah-drawer-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.ah-mobile-search-form {
    display: flex;
    align-items: center;
    background: #eeeeee;
    border-radius: 6px;
    padding: 6px 12px;
    margin-bottom: 14px;
}

.ah-mobile-search-form .ah-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 6px;
    font-size: 14px;
    outline: none;
}

.ah-mobile-search-form .ah-search-submit {
    background: transparent;
    border: none;
    color: #555555;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.ah-mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.ah-mobile-menu-list li {
    border-bottom: 1px solid #f1f5f9;
}

.ah-mobile-menu-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 6px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.ah-mobile-menu-list li.current-menu-item > a {
    color: #0082c8;
}

.ah-mobile-secondary-links,
.ah-mobile-top-menu-wrapper ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    display: flex;
    gap: 12px;
}

.ah-mobile-secondary-links a,
.ah-mobile-top-menu-wrapper a {
    color: #666666;
    text-decoration: none;
    font-size: 13px;
}

.ah-mobile-hotline-wrap {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.ah-mobile-hotline-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333333;
    text-decoration: none;
    font-size: 13.5px;
}

/* 6. RESPONSIVE CONTROLS */
@media (min-width: 992px) {
    .desktop-only {
        display: flex !important;
    }
    .desktop-hide {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .desktop-only {
        display: none !important;
    }
    .desktop-hide {
        display: flex !important;
    }
    .ah-main-header-inner {
        display: flex;
        justify-content: space-between;
    }
    .ah-logo .logo-main {
        max-height: 40px;
    }
}
