/* Ẩn header mặc định của theme */
header#masthead, header.site-header { display: none !important; }

/* --- STYLES CHUNG --- */
#mm-custom-header {
    font-family: inherit; 
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    z-index: 9999;
}
#mm-custom-header a { text-decoration: none; color: #111; }
#mm-custom-header ul { list-style: none; margin: 0; padding: 0; }

/* --- DESKTOP HEADER --- */
.mm-header-desktop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.mm-logo img { max-height: 80px; width: auto; }

.mm-right-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.mm-actions { display: flex; align-items: center; gap: 20px; }
.mm-flag { height: 24px; width: auto; object-fit: contain; }
.mm-phone-btn {
    background: #111;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    font-weight: 600;
}
.mm-phone-btn img { width: 16px; height: 16px; filter: brightness(0) invert(1); }

.mm-nav .mm-menu { display: flex; gap: 30px; align-items: center; font-weight: 600; font-size: 16px; }
.mm-nav .mm-menu > li { position: relative; padding: 5px 0; }
.mm-nav .mm-menu > li.menu-item-has-children > a::after {
    content: " ⌄";
    font-size: 12px;
    font-weight: 400;
    color: #555;
}

.mm-nav .mm-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 10px 0;
}
.mm-nav .mm-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.mm-nav .mm-menu .sub-menu li a { display: block; padding: 10px 20px; font-weight: 500; font-size: 15px; }

/* --- MOBILE HEADER --- */
.mm-header-mobile { display: none; }
.mm-mobile-nav-overlay {
    display: none;
    background: #fff;
    padding: 20px;
    border-top: 1px solid #eee;
}

/* --- RESPONSIVE MOBILE/TABLET --- */
@media (max-width: 1024px) {
    .mm-header-desktop { display: none; }
    
    .mm-header-mobile {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 15px 20px;
        gap: 15px;
    }
    
    .mm-logo-mobile { flex-shrink: 0; }
    .mm-logo-mobile img { max-height: 45px; width: auto; }
    
    .mm-hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        flex-shrink: 0;
        padding: 5px;
        margin-left: auto; 
    }
    .mm-hamburger span {
        display: block;
        width: 26px;
        height: 2px;
        background: #111;
        transition: 0.3s;
        border-radius: 2px;
    }
    
    .mm-search-bar { 
        width: 100%;
        max-width: 260px;
    }
    .mm-search-form {
        display: flex;
        align-items: center;
        background: #f4f4f4;
        border-radius: 10px;
        padding: 8px 12px;
        height: 42px;
    }
    .mm-search-submit { 
        background: transparent; 
        border: none; 
        padding: 0; 
        margin-right: 8px; 
        cursor: pointer; 
        display: flex; 
    }
    .mm-search-field {
        background: transparent !important;
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        -webkit-appearance: none;
        width: 100%;
        font-family: inherit;
    }
    .mm-search-field:focus {
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
    }
    
    .mm-flag-mobile { 
        height: 22px; 
        flex-shrink: 0; 
        border-radius: 2px;
    }

    /* Bắt buộc phải giữ .active để JS điều khiển tắt bật menu */
    .mm-mobile-nav-overlay.active { display: block; }
    .mm-mobile-menu li { border-bottom: 1px solid #f1f1f1; }
    .mm-mobile-menu li a { display: block; padding: 15px 0; font-weight: 600; }
    .mm-mobile-menu .sub-menu { padding-left: 15px; display: none; }
}