#header {
    background-color: #ffffff;
}
/* =========================================
   1. TOP BAR (PHONG CÁCH SHOPEE)
========================================= */
.top-bar {
    background-color: #1b5e20;
    color: #ffffff;
    font-size: 12px;
    padding: 6px 0;
    font-weight: 400;
}

.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.top-bar-left, 
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-bar-left a, 
.top-bar-right a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.top-bar-left a:hover, 
.top-bar-right a:hover {
    opacity: 0.8;
}

.top-bar-divider {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
}

/* =========================================
   USER DROPDOWN MENU (HOVER)
========================================= */
.user-menu-wrapper {
    position: relative;
    display: inline-block;
}

.user-welcome {
    color: #ffffff;
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 0;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    overflow: hidden;
    display: none;
    z-index: 1200;
    list-style: none;
    padding: 6px 0;
    margin: 0;
}

/* Hiển thị dropdown khi hover vào wrapper */
.user-menu-wrapper:hover .user-dropdown {
    display: block;
}

.user-dropdown li {
    width: 100%;
}

.user-dropdown a,
.user-dropdown .btn-logout-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    color: #333333;
    text-decoration: none;
    font-size: 13px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.user-dropdown a:hover,
.user-dropdown .btn-logout-dropdown:hover {
    background-color: #f1f8f2;
    color: #1b5e20;
    opacity: 1;
}

.user-dropdown .btn-logout-dropdown {
    color: #d32f2f;
}

.user-dropdown .btn-logout-dropdown:hover {
    background-color: #ffebee;
    color: #c62828;
}

/* =========================================
   2. NAVBAR CHÍNH
========================================= */
.navbar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    background-color: #fff;
    border-bottom: 1px solid #edf0ed;
    z-index: 1000;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    color: #17652a;
    text-decoration: none;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-menu a {
    color: #25372b;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-menu a:hover {
    color: #238636;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 24px;
    text-decoration: none;
    position: relative;
    padding: 4px;
    transition: transform 0.2s ease;
}

.cart-link:hover {
    transform: scale(1.1);
}

#cart-count {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background-color: #e84b35;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    position: absolute;
    top: -4px;
    right: -10px;
}

/* =========================================
   3. HAMBURGER TOGGLE (MOBILE)
========================================= */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    width: 30px;
    height: 24px;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 2.5px;
    background-color: #25372b;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.nav-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(10.75px) rotate(45deg);
}

.nav-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.nav-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-10.75px) rotate(-45deg);
}

/* =========================================
   4. RESPONSIVE MOBILE
========================================= */
@media (max-width: 768px) {
    .top-bar-left a:nth-child(3),
    .top-bar-left span:nth-child(2) {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
        gap: 16px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
        border-bottom: 2px solid #e8f5e9;
        border-top: 1px solid #edf0ed;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
        z-index: 1100;
    }

    .nav-menu.active {
        max-height: 300px;
        opacity: 1;
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .nav-menu a {
        font-size: 15px;
        width: 100%;
        padding: 6px 0;
        border-bottom: 1px dashed #f0f4f1;
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }
}