/* ======================================= */
/* CSS HEADER 3 TẦNG (ĐÃ SỬA XUNG ĐỘT) */
/* ======================================= */

.new-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    
    /* SỬA LỖI: Giữ header cố định ở trên */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* Tầng 1: Banner */
.top-banner {
    text-align: center;
    background-color: #007bff;
    line-height: 0; /* Xóa khoảng trắng thừa */
}
.top-banner img {
    width: 100%;
    height: auto;
    max-height: 90px; 
    
    /* SỬA: Dùng contain để ảnh luôn hiển thị trọn vẹn */
    object-fit: cover; 
    
    display: block; 
    
    /* Thêm: Căn giữa ảnh nếu màn hình quá rộng */
    margin: 0 auto; 
}

/* Tầng 2: Header Chính */
.header-main {
    background-color: #1976d2; /* Màu xanh đậm */
    color: white;
}

/* SỬA LỖI: Dùng selector cụ thể '.header-main .container' */
.header-main .container {
    /* Style Flexbox (Layout) */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    
    /* Ghi đè padding của style.css */
    width: 100%; /* Chiếm hết chiều rộng của .header-main */
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px !important; 
}

.header-logo {
    font-size: 28px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    flex-shrink: 0; 
}

/* Form tìm kiếm */
.header-search-form {
    flex-grow: 1; 
    display: flex;
    max-width: 500px;
}
.header-search-form input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 20px 0 0 20px;
    font-size: 14px;
}
.header-search-form button {
    padding: 0 18px;
    border: none;
    background-color: #fff;
    color: #e65100; /* Màu cam */
    cursor: pointer;
    border-radius: 0 20px 20px 0;
    font-size: 16px;
}

/* Khu vực User */
.header-user-area {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}
.header-user-area .login-link,
.header-user-area .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    position: relative;
    cursor: pointer;
    padding-bottom: 5px;
}
.header-user-area .login-link i,
.header-user-area .user-info i {
    font-size: 20px;
}
.header-user-area .user-dropdown {
    display: none;
    position: absolute;
    top: 100%; 
    right: 0;
    background-color: white;
    color: #333;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 1001;
    padding-top: 10px;
}
.header-user-area .user-info:hover .user-dropdown {
    display: block;
}
.header-user-area .user-dropdown a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
}
.header-user-area .user-dropdown a:hover {
    background-color: #f4f4f4;
}

/* Giỏ hàng */
.cart-link {
    position: relative;
    color: white;
    font-size: 24px;
    text-decoration: none;
}
.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #e65100;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tầng 3: Menu Thể Loại */
.header-bottom-nav {
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
}

/* SỬA LỖI: Dùng selector cụ thể '.header-bottom-nav .container' */
.header-bottom-nav .container {
    /* Style Flexbox (Layout) */
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap; 
    
    /* Ghi đè padding của style.css */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px !important;
}
.header-bottom-nav .container a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}
.header-bottom-nav .container a:hover {
    color: #1976d2;
}
.header-bottom-nav .container a i {
    margin-right: 5px;
    color: #e65100;
}