/* Header */
.header {
    background: #ffffff;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 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: #0E2A5B !important;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: #0E2A5B;
    transition: width 0.3s ease, left 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* Style cho trang hiện tại (active) */
.navbar-nav .nav-link.active {
    color: #0E2A5B !important;
    font-weight: 700; /* Đậm hơn một chút */
}

.navbar-nav .nav-link.active::after {
    width: 100%;
    left: 0;
    background-color: #0E2A5B;
}

/* Đảm bảo active state không bị ảnh hưởng bởi hover */
.navbar-nav .nav-link.active:hover {
    transform: none; /* Không có hiệu ứng di chuyển lên */
}

/* 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%;
    }
}