.site-header {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 9999;
    overflow: visible;
    /* ห้าม hidden — dropdown จะถูก clip */
    box-shadow: 0 4px 32px rgba(0, 0, 0, .45);
    border-bottom: 2px solid var(--gold);
    color: #e2c97e !important;
}

.header-inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: stretch;
    height: 65px;
    overflow: visible;
    /* ห้าม hidden — dropdown จะถูก clip */
}

.logo-block {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 24px;
    border-right: 1px solid rgba(201, 168, 76, .2);
    flex-shrink: 0;
}

.logo-emblem {
    width: 40px;
    height: 40px;
}

.logo-text h1 {
    font-family: 'Noto Serif Thai', serif;
    font-size: .95rem;
    font-weight: 700;
    color: var(--gold-light);
    line-height: 1.25;
    white-space: nowrap;
}

.logo-text p {
    font-size: .68rem;
    color: rgba(255, 255, 255, .35);
    font-weight: 300;
    white-space: nowrap;
}

.logo-text h6 {
    font-size: .68rem;
    color: rgba(255, 255, 255, .35);
    font-weight: 300;
    white-space: nowrap;
}

.main-nav {
    flex: 1;
    display: flex;
    align-items: stretch;
    overflow: visible;
    /* ← แก้จาก overflow-x: auto → visible */
    padding-left: 8px;
    /*   overflow-x: auto ทำให้ dropdown ถูกตัด */
}

.main-nav a {
    display: flex;
    align-items: center;
    padding: 0 16px;
    font-size: .84rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .55);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: color .18s;
    flex-shrink: 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--gold);
    border-radius: 1px 1px 0 0;
    transform: scaleX(0);
    transition: transform .22s cubic-bezier(.4, 0, .2, 1);
}

.main-nav a:hover {
    color: rgba(255, 255, 255, .9);
}

.main-nav a:hover::after {
    transform: scaleX(.6);
    opacity: .5;
}

.main-nav a.active {
    color: var(--gold-light);
}

.main-nav a.active::after {
    transform: scaleX(1);
}

.header-status {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-left: 1px solid rgba(201, 168, 76, 0.2);
}

.status-top {
    font-size: .85rem;
    font-weight: 600;
    color: #e2c97e;
    letter-spacing: .18em;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.status-label {
    font-size: .70rem;
    font-weight: 600;
    color: #e2c97e;
    letter-spacing: .06em;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: #4caf50;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .15;
    }
}

/* ── Dropdown ── */
.nav-dropdown {
    position: relative;
    display: flex;
    align-items: stretch;
}

.nav-dropdown>a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 16px;
    font-size: .84rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .55);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: color .18s;
    cursor: pointer;
}

.nav-dropdown>a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--gold);
    border-radius: 1px 1px 0 0;
    transform: scaleX(0);
    transition: transform .22s;
}

.nav-dropdown:hover>a {
    color: rgba(255, 255, 255, .9);
}

.nav-dropdown:hover>a::after {
    transform: scaleX(.6);
    opacity: .5;
}

.chevron {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, .4);
    transition: transform .22s, border-top-color .18s;
    margin-top: 1px;
}

.nav-dropdown:hover .chevron {
    transform: rotate(180deg);
    border-top-color: rgba(255, 255, 255, .8);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    background: var(--navy);
    border: 1px solid rgba(201, 168, 76, .25);
    border-top: 2px solid var(--gold);
    border-radius: 0 0 8px 8px;
    min-width: 240px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s, transform .2s, visibility .2s;
    z-index: 10000;
    /* ← แก้จาก 300 → 10000 ให้สูงกว่า header */
    /* ลบ overflow: hidden ออก — ทำให้ dropdown item ถูก clip */
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px;
    font-size: .82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .6);
    text-decoration: none;
    transition: background .15s, color .15s;
    border-bottom: 1px solid rgba(201, 168, 76, .08);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: rgba(201, 168, 76, .1);
    color: var(--gold-light);
}

.dropdown-menu a .icon {
    width: 18px;
    height: 18px;
    background: rgba(201, 168, 76, .15);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    color: var(--gold);
}

.main-nav {
    justify-content: center;
    /* เพิ่มบรรทัดนี้ */
}

/* ═══════════════════════════════════════════
   RESPONSIVE — แก้ให้พอดีทุกขนาดหน้าจอ
═══════════════════════════════════════════ */

/* ── Tablet (≤ 1100px) ── */
@media (max-width: 1100px) {
    .header-inner {
        height: auto;
        min-height: 65px;
        flex-wrap: wrap;
        padding: 0 12px;
    }

    .logo-block {
        padding-right: 12px;
        gap: 10px;
    }

    .logo-text h1 {
        font-size: .82rem;
    }

    .main-nav a,
    .nav-dropdown>a {
        padding: 0 10px;
        font-size: .78rem;
    }

    .header-status {
        padding: 6px 12px;
        gap: 4px;
    }

    .status-top {
        font-size: .75rem;
    }

    .status-label {
        font-size: .62rem;
    }
}

/* ── Mobile (≤ 768px) — Hamburger Menu ── */
@media (max-width: 768px) {

    .header-inner {
        height: 60px;
        flex-wrap: nowrap;
        position: relative;
        padding: 0 16px;
    }

    /* ซ่อน nav และ status บน mobile */
    .main-nav,
    .header-status {
        display: none;
    }

    /* แสดง hamburger button */
    .hamburger-btn {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 36px;
        height: 36px;
        background: none;
        border: none;
        cursor: pointer;
        margin-left: auto;
        padding: 4px;
        flex-shrink: 0;
    }

    .hamburger-btn span {
        display: block;
        width: 22px;
        height: 2px;
        background: rgba(255, 255, 255, .7);
        border-radius: 2px;
        transition: all .25s;
    }

    .hamburger-btn.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger-btn.open span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .hamburger-btn.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Mobile Drawer Menu */
    .mobile-menu {
        display: block !important;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--navy);
        border-top: 2px solid var(--gold);
        box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
        z-index: 9998;
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s cubic-bezier(.4, 0, .2, 1);
    }

    .mobile-menu.open {
        max-height: 80vh;
        overflow-y: auto;
    }

    .mobile-menu a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 20px;
        font-size: .88rem;
        font-weight: 500;
        color: rgba(255, 255, 255, .7);
        text-decoration: none;
        border-bottom: 1px solid rgba(201, 168, 76, .1);
        transition: background .15s, color .15s;
    }

    .mobile-menu a:hover,
    .mobile-menu a.active {
        background: rgba(201, 168, 76, .1);
        color: #e2c97e;
    }

    .mobile-menu-section {
        padding: 8px 20px 4px;
        font-size: .68rem;
        font-weight: 700;
        color: rgba(201, 168, 76, .5);
        letter-spacing: .12em;
        text-transform: uppercase;
    }

    /* เวลาทำการใน drawer */
    .mobile-menu-footer {
        padding: 14px 20px;
        display: flex;
        align-items: center;
        gap: 8px;
        border-top: 1px solid rgba(201, 168, 76, .2);
        color: #e2c97e;
        font-size: .78rem;
    }

    .mobile-menu-footer .status-dot {
        flex-shrink: 0;
    }
}

/* ── ซ่อน hamburger บนจอใหญ่ ── */
.hamburger-btn {
    display: none;
}

.mobile-menu {
    display: none;
}