/* Header – Glassmorphism */
.header {
    background: rgba(255, 255, 255, 0.70);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    transition: transform 0.3s ease-in-out, background 0.3s ease;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

/* Class để ẩn header khi cuộn xuống */
.header.hide {
    transform: translateY(-100%);
}

/* Bố cục chính */
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Navbar (ở giữa) */
.navbar-nav .nav-link {
    color: var(--brand-dark-deep) !important;
    font-weight: 600;
    padding: 0.5rem 1.25rem !important;
    margin: 0 0.2rem;
    font-size: 1.05rem;
    position: relative;
    border-radius: 30px;
    border: 1px solid transparent;
    transition: var(--transition-luxury);
    display: inline-block;
}

.navbar-nav .nav-link:hover {
    background: rgba(5, 150, 105, 0.06);
    border-color: rgba(5, 150, 105, 0.12);
    color: var(--brand-green-deep) !important;
    transform: translateY(-1px);
}

/* Style cho trang hiện tại (active) với hiệu ứng bóng glassmorphism */
.navbar-nav .nav-link.active {
    background: rgba(5, 150, 105, 0.1) !important;
    border: 1px solid rgba(5, 150, 105, 0.2) !important;
    color: var(--brand-green-deep) !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: none !important;
}

/* Nút đăng nhập */
.header .btn-outline-primary {
    background-color: #ffffff;
    color: #0E2A5B;
    border-color: #0E2A5B;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.header .btn-outline-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #0E2A5B;
    transition: width 0.3s ease;
    z-index: -1;
}

.header .btn-outline-primary:hover::before {
    width: 100%;
}

.header .btn-outline-primary:hover {
    color: #ffffff;
}

/* Nút giỏ hàng */
.header .btn-success {
    background-color: #0E2A5B;
    color: #ffffff;
    border-color: #0E2A5B;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.header .btn-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #ffffff;
    transition: width 0.3s ease;
    z-index: -1;
}

.header .btn-success:hover::before {
    width: 100%;
}

.header .btn-success:hover {
    color: #0E2A5B !important;
}

/* Nút toggle cho mobile */
.navbar-toggler {
    border-color: #0E2A5B !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(54, 98, 46, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

/* Điều chỉnh khoảng cách cho màn hình nhỏ */
@media (max-width: 991.98px) {
    .header .container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .navbar-brand, .btn-group {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    .navbar {
        width: 100%;
    }
}