* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Đảm bảo header hiển thị trên các phần tử khác */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Thêm hiệu ứng đổ bóng nhẹ */
    height: 100px;

      background-color: #E07A5F;
  color: #4a2f23;



box-shadow: 0 2px 10px rgba(44, 95, 93, 0.15);
}

body {
    padding-top: 100px; /* Điều chỉnh để tránh nội dung bị che mất bởi header */
}
/* Ẩn form mobile trên màn hình lớn */


/* Form chung */
.search-form {
    display: flex;
    width: 100%;
    max-width: 500px;
}
.search-form input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
}
.search-form button {
    padding: 8px 12px;
    background-color: #b99b60;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}
.search-form button:hover {
    background-color: #fd7e14;
}
.search-mobile {
    display: none;
}
/* Khi màn hình nhỏ hơn 768px: ẩn desktop, hiện mobile */
@media (max-width: 768px) {
    .search-desktop {
        display: none;
    }
   .search-mobile {
    display: flex;
    max-width: 95%;
    margin: 0 auto; /* Căn giữa ngang */
    justify-content: center; /* Canh nội dung bên trong ra giữa */
}

}
/* Navbar Container */
.navbar {
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 5px auto 0 auto; /* Thêm 20px khoảng cách với top */

}

/* “Ngân” viết tay, vàng sang */
/* Biến màu cho logo trên nền này */
:root{
  --header-bg:#E07A5F;
  --text-light:#ffffff;        /* trắng */
  --accent-cream:#fce8d8;      /* vàng kem */
  --accent-cream-2:#f7d1b4;    /* kem đậm hơn */
}

/* Bọc logo */
.logo{
  display:flex; align-items:center; min-width:0;
}

/* Wordmark luôn hiển thị ở mọi kích thước */
.logo-wordmark{
  display:inline-flex; align-items:baseline; gap:.35rem;
  text-decoration:none;
  white-space:nowrap; line-height:1;
  transition:transform .2s ease, opacity .2s ease;
}

/* “Kim” – trắng, vững */
.logo-kim{
   font-family:'Great Vibes', cursive;
  font-weight:700;
  font-size: clamp(20px, 2.6vw, 25px);
  letter-spacing:.3px;
  color:var(--accent-cream);
  position:relative;
}

/* “Ngân” – kem, mềm mại */
.logo-ngan{
  font-family:'Great Vibes', cursive;
  font-size: clamp(24px, 3.2vw, 36px);
  color:var(--accent-cream);
  letter-spacing:.2px;
  transform: translateY(1px);
  text-shadow: 0 1px 1px rgba(0,0,0,.15);
}

/* Hover nhẹ */
.logo-wordmark:hover{ transform: translateY(-1px); opacity:.95; }

/* Đảm bảo khoảng cách trong navbar */


/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
}

.custom-logo {
    width: 80px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
    margin: 5px auto 0 auto;
    box-shadow: 0 2px 8px rgba(44, 95, 93, 0.15);
    border: 2px solid #f0f0f0; /* Viền đỏ nâu */

}


.custom-logo:hover {
    opacity: 1;
    box-shadow: 0 4px 16px rgba(44, 95, 93, 0.2);
}

.user-profile .user-dropdown-toggle {
  display: flex;
  align-items: center;      /* canh giữa dọc */
  gap: 8px;                 /* khoảng cách avatar - tên */
  text-decoration: none;
}

.user-profile .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  display: block;           /* bỏ khoảng trắng baseline của img */
  flex: 0 0 32px;           /* cố định kích thước */
}

.user-profile .username {
  max-width: 80px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1;           /* tránh kéo giãn chiều cao */
  color: #fff;
}

/* Navigation Menu */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 10px 0 0px 20px;
    padding: 0;
}

.nav-menu li {
    display: flex;
}

.navbar .dropdown-menu {
  margin-top: 0;   /* tránh tạo "khoảng trống" gây mouseleave */
}

/* Giúp menu không bị mất khi rê chéo nhanh */
.navbar .dropdown-menu,
.navbar .dropdown-submenu .dropdown-menu {
  pointer-events: auto;
}

/* Tùy chọn: giữ menu hiện khi đang trong nhánh mở */
.nav-item.dropdown.open > .dropdown-menu,
.dropdown-submenu.open > .dropdown-menu {
  display: block; /* jQuery vẫn điều khiển bằng slide, nhưng class hỗ trợ trạng thái */
}

.nav-menu li a {
    text-decoration: none;
    color: #fffaf0;
    font-size: 16px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: left;
    min-width: 80px;
    white-space: nowrap;
    font-family: Arial, sans-serif;
    margin-top: -5px;

}

.nav-menu li a:hover {
    color: #ff4500;
    background-color: #fff1ec;
}
.bell-icon {
    color: #FFFFFF;
}
/* Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 20px;
    cursor: pointer;
    color: white;
    background: none;
    border: none;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    color: #ff4500;
    background-color: #fff1ec;
}

/* Authentication Buttons */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.login-btn, .signup-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-btn {
    background-color: #ff4500;
    color: white;
}

.login-btn:hover {
    background-color: #e63e00;
    transform: translateY(-1px);
}

.signup-btn {
    background-color: white;
    color: #cc3700;
    border: 1.5px solid #FFFFFF;
    margin-right: 20px;
}

.signup-btn:hover {
    background-color: #fff1ec;
    transform: translateY(-1px);
}

/* Search Bar */
.gsc-input-box {
    width: 450px !important;
    height: 35px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    border: 1px solid #E5F3F2 !important;
    border-radius: 4px !important;
}

.gsc-search-button-v2 {
    background-color: #4e888d !important;
    border-color: #4CAF50 !important;
    width: 80px !important;
    height: 35px !important;
    border: 2px solid #f0f0f0 !important;
    margin-left: -10px !important;

}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    min-width: 160px;
    z-index: 1000;
    left: 0;
    top: 100%;
    background: #E07A5F;
}

.nav-item.dropdown:hover > .dropdown-menu {
    display: block;
    background: #c55f45; /* cam đất đậm hơn */
    color: #ffffff;      /* trắng tinh khi hover */
}
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 4px 8px;
    color: white;
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: #fff1ec;
    color: #ff4500;
}

/* User Profile */
.user-profile {
    margin-right: 40px;
}

.user-profile .username {
    max-width: 80px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: inline-block;
     margin-right: -10px;
     color: white;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-avatar:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Notification */
.bell-icon {
    font-size: 20px;
    position: relative;
    left: 10px; /* Điều chỉnh giá trị để dịch sang phải */
}

.notification-count {
    position: absolute;
    top: 1px;
    right: -7px;
    background: red;
    color: white;
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 5px;
    min-width: 14px;
    text-align: center;
}

/* Media Queries */
@media (max-width: 768px) {
     header {
        height: 110px;  /* Đảm bảo chiều cao không bị co lại */
    }

    .navbar {
        padding: 8px 12px;
        position: relative;
        align-items: center;
        gap: 8px;
        border-bottom: none;
        flex-wrap: nowrap;
    }
    html, body {
        height: 100vh;
        overflow-x: hidden;
        touch-action: manipulation;
    }

    .menu-toggle {
        display: block;
        order: 1;
        margin-right: 8px;
        z-index: 1001;
    }

    .logo {
        order: 2;
        flex-grow: 0;
        margin-right: auto;
    }

    .custom-logo {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-45%); /* Căn giữa theo chiều dọc */
    height: 40px; /* Đảm bảo logo không bị co kéo */
}



    .auth-buttons {
        order: 3;
        display: flex;
        align-items: center;
    }

    .search-bar {
        order: 4;
        width: 100%;
        margin: 8px 0;
        max-width: none;
        padding: 0 10px;
    }

    .nav-menu {
        order: 5;
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 6px;
        margin: 0;
        padding: 8px 12px;
        background-color: #ffffff;
        border-top: 1px solid #ff4500;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-menu li a {
        display: block;
        width: 100%;
        text-align: left;
        padding: 5px 15px;
        background: #E07A5F;
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle,
    .logo,
    .auth-buttons {
        display: flex;
        align-items: center;
        height: 40px;
    }

    .bell-icon {
        font-size: 22px;
        top: 1px;
    }

    .gsc-input-box {
        width: 300px !important;
        height: 40px !important;
        font-size: 13px !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    .gsc-search-button-v2 {
        width: 45px !important;
        height: 40px !important;
        font-size: 13px !important;
        margin-left: 2px !important;
    }

    .gsc-search-box {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        position: relative; /* Cho phép sử dụng top */
        top: -2px; /* Dịch lên trên */
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 6px 10px;
    }

    .custom-logo {
        width: 70px;
        height: 40px;
    }

    .menu-toggle {
        padding: 4px 8px;
    }
}
@supports (-webkit-touch-callout: none) {
    .menu-toggle {
    font-size: 30px; /* Kích thước icon */
    padding: 10px;
    position: relative;
    top: -5px; /* Đẩy icon lên trên */
}

}

.vip {
    display: inline-flex;
    align-items: center;
    font-size: 10px; /* Kích thước chữ */
    font-weight: bold;
    color: #FFD700;
    background: linear-gradient(45deg, #ffcc00, #ff6600);
    padding: 4px 6px; /* Giảm padding để nhỏ gọn hơn */
    border-radius: 6px; /* Bo góc nhẹ nhàng hơn */
    box-shadow: 0 2px 6px rgba(255, 165, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px; /* Giảm khoảng cách giữa các chữ */
    position: relative;
    top: -1px; /* Đẩy lên trên */
     left: 10px
}

.vip i {
    font-size: 10px !important; /* Bắt buộc áp dụng kích thước */
    margin-right: 4px; /* Giảm khoảng cách giữa icon và chữ */
    position: relative;
    animation: spin 2s infinite linear;
}

@keyframes glow {
    0% { box-shadow: 0 2px 6px rgba(255, 165, 0, 0.6); }
    100% { box-shadow: 0 2px 10px rgba(255, 165, 0, 1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
