.site-header {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    position: sticky;
    top: 0;
    z-index: 1030;
}

/*
* Bootstrap .navbar ใช้ display:flex + align-items:center
* เราให้ logo ใช้ align-self:stretch เพื่อยืดเต็มความสูง header
* ส่วน nav links และ right-items ถูก center อัตโนมัติ
*/

.site-navbar {
    padding: 0 !important;
    min-height: 100px;
}


/* ── Logo block (full-height, blue, pill-right) ── */
.nav-logo {
    align-self: stretch;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    background: var(--bs-primary-500);
    border-radius: 0 0 20px 0;
    padding: 0 28px 0 16px;
    text-decoration: none;
    margin-right: 8px;
    width: 30%;
    justify-content: center;
}

.nav-logo img {
    width: 60%;
    display: block;
    padding: 0 20px;
}

/* ── Mobile responsive ── */
@media (max-width: 991.98px) {
    .site-navbar {
        min-height: 70px;
    }

    /* Logo takes ~65% of navbar on mobile */
    .nav-logo {
        width: 65%;
        padding: 0 16px;
        border-radius: 0 0 16px 0;
    }

    .nav-logo img {
        width: auto;
        height: 40px;       /* explicit height so SVG renders correctly */
        max-width: 100%;
        padding: 0;
        object-fit: contain;
    }

    /* Mobile controls row (search + hamburger) */
    .nav-mobile-controls {
        gap: 2px;
        padding-right: 8px;
    }

    /* Hamburger icon size */
    .nav-hamburger-icon {
        font-size: 26px;
    }

    /* Collapsed menu: full width card below navbar */
    .navbar-collapse {
        background: #fff;
        border-top: 1px solid var(--bs-gray-200);
        padding: 12px 16px 16px;
        box-shadow: 0 6px 16px rgba(0,0,0,.08);
    }

    /* Stack nav links vertically */
    .navbar-collapse .navbar-nav {
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100%;
    }

    .navbar-collapse .d-flex {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding-right: 0 !important;
        width: 100%;
    }

    /* Make nav pills full width on mobile */
    .navbar-collapse .nav-pill {
        width: 100%;
        font-size: 16px;
    }

    /* User block */
    .navbar-collapse .nav-user {
        width: 100%;
    }
}

/* ── Nav pills ── */
.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 13px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    color: var(--bs-gray-900);
    text-decoration: none;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
    transition: background .15s, color .15s;
    line-height: 1;
}

/* ซ่อน icon ปกติ */
.nav-pill::before {
    content: "";
    display: none;
}

.nav-pill:hover {
    background: var(--bs-gray-300);
    color: var(--bs-primary-500);
}

.nav-pill.active {
    background: var(--bs-secondary-500);
    color: #fff;
    font-weight: 600;
}

/* แสดง icon เฉพาะตอน active */
.nav-pill.active::before {
    display: inline-block;
    width: 20px;
    height: 20px;

    background-image: url('../image/icon/menu_active_header.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.nav-pill.active:hover {
    background: var(--bs-secondary-700);
    color: #fff;
}

/* ── Right-side icon button ── */
.nav-icon-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #444;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
    padding: 0;
}

.nav-icon-btn:hover {
    background: var(--bs-gray-300);
}

/* ── Login button ── */
.nav-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 18px;
    font-weight: 600;
    color: var(--bs-gray-900);
    background: none;
    text-decoration: none;
    white-space: nowrap;
    transition: all .15s;
}

.nav-login-btn:hover {
    color: var(--bs-primary-500);
    background: var(--bs-gray-100);
}

/* ── Language switcher ── */
.nav-lang {
    font-size: 18px;
    font-weight: 600;
    color: var(--bs-gray-900);
    white-space: nowrap;
    user-select: none;
}

.txt-lang{
    cursor: pointer;
}

.nav-lang .on {
    color: var(--bs-secondary-500);
}

.nav-lang .sep {
    color: #ccc;
    margin: 0 2px;
}

/* ── Notification badge ── */
.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--bs-status-error);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    min-width: 14px;
    height: 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
}

/* ── Dropdown menu ── */
.nav-dd-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    padding: 8px;
    min-width: 165px;
    margin-top: 4px;
}

.nav-dd-menu .dropdown-item {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    color: #333;
}

.nav-dd-menu .dropdown-item:hover {
    background: var(--bs-gray-100);
    color: var(--bs-primary-500);
}

/* ── User info block ── */
.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 50px;
    text-decoration: none;
    transition: background .15s;
    cursor: pointer;
}

.nav-user:hover {
    background: var(--bs-gray-300);
}

.nav-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--bs-gray-900);
    line-height: 1.2;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-user-points {
    font-size: 14px;
    font-weight: 600;
    color: var(--bs-gray-900);
    line-height: 1.2;
}

.nav-user-points-number {
    color: var(--bs-secondary-500);
}