/* ========================================
   HEADER STYLES - SieuMua247
   Matching Figma Mockup
   ======================================== */

/* Hide all old header elements */
.header-new .header__top,
.header-new .bg-header,
.header-new .hero__categories,
.header-new .header__menu,
.header-new .nav-menu,
.header-new .top-bar,
.header-new .header-main,
.header-new .header-topbar,
.header-new .nav-menu-list,
.header-new .header__logo,
.header-new .header__cart,
.header-new .hero__search__form,
.quick-menu {
    display: none !important;
}

/* Override any backgrounds */
.header-new,
.header-new .header-wrapper-v2,
.header-new .header-main-v2,
.header-new .header-nav-v2 {
    background-color: transparent !important;
}

.header-new .header-info-bar {
    background: rgba(120, 130, 157, 0.4) !important;
}

header.header-new {
    background: none !important;
}

/* =====================================================
   HEADER WRAPPER - Blue Gradient Background (Top to Bottom)
   ===================================================== */
.header-wrapper-v2 {
    background: linear-gradient(180deg, #006FFF 0%, #1823B9 100%) !important;
    position: relative;
}

/* =====================================================
   1. TOP INFO BAR
   ===================================================== */
.header-info-bar {
    background: rgba(120, 130, 157, 0.4) !important;
    padding: 6px 0;
}

.header-info-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 25px;
}

.header-info-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-info-left a {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.header-info-left a:hover {
    color: #fff;
    opacity: 0.9;
}

.header-info-left a i {
    font-size: 13px;
}

.btn-download-app {
    background: #fff;
    color: #3970e3 !important;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-download-app:hover {
    background: #f0f0f0;
    color: #3970e3 !important;
}

.btn-download-app i {
    font-size: 11px;
    transform: rotate(-90deg);
}

/* =====================================================
   2. HEADER MAIN - Logo, Search, Icons, User
   ===================================================== */
.header-main-v2 {
    padding: 12px 0;
    background: transparent !important;
}

.header-main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Logo */
.header-logo-v2 {
    flex-shrink: 0;
}

.header-logo-v2 img {
    height: 70px;
    width: auto;
    display: block;
}

/* Search Section - centered, wider */
.header-search-wrapper {
    flex: 1 1 600px;
    max-width: 650px;
}

.search-form-v2 {
    display: flex;
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    height: 42px;
    position: relative;
}

.search-form-v2 input {
    flex: 1;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    outline: none;
    background: transparent;
    color: #333;
    order: 1;
}

.search-form-v2 input::placeholder {
    color: #7c7c7c;
}

.search-form-v2 button {
    background: #3b82f6;
    border: none;
    padding: 0 20px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 25px 25px 0;
    order: 2;
}

.search-form-v2 button:hover {
    background: #2563eb;
}

.search-form-v2 button i {
    font-size: 16px;
}

/* Quick Links - Responsive font scaling */
.search-quick-links {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 3px clamp(8px, 1.5vw, 12px);
    margin-top: 5px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.search-quick-links::-webkit-scrollbar {
    display: none;
}

/* Right section - Icons + User */
.header-right-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.search-quick-links a {
    color: #fff;
    font-size: clamp(10px, 1vw, 12px);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-quick-links a:hover {
    text-decoration: underline;
    color: #fff;
}

/* Cart & Notification Icons */
.header-icons-v2 {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-icon-btn {
    position: relative;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.header-icon-btn i {
    font-size: 15px;
}

.icon-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

/* User Section */
.header-user-dropdown {
    position: relative;
}

.header-user-v2 {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
    cursor: pointer;
}

.header-user-v2:hover {
    color: #fff;
    opacity: 0.9;
}

.user-avt {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
}

.user-name-v2 {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fff;
}

.user-name-v2 i {
    font-size: 10px;
    transition: transform 0.2s;
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.header-user-dropdown:hover .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-user-dropdown:hover .user-name-v2 i {
    transform: rotate(180deg);
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.user-dropdown-menu a:hover {
    background: #f5f5f5;
    color: #3b82f6;
}

.user-dropdown-menu a i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    color: #666;
}

.user-dropdown-menu a:hover i {
    color: #3b82f6;
}

/* =====================================================
   3. NAVIGATION - Compact spacing
   ===================================================== */
.header-nav-v2 {
    padding: 8px 0 12px;
    background: transparent !important;
}

.nav-list-v2 {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    gap: 50px;
}

.nav-list-v2 li {
    flex: 0 0 auto;
}

.nav-list-v2 li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s;
}

.nav-list-v2 li a:hover {
    transform: translateY(-2px);
}

/* Nav Icons */
.nav-icon-v2 {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon-v2 img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-icon-v2 i {
    font-size: 20px;
    color: #fff;
}

/* Nav Text */
.nav-list-v2 li a span:last-child {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1399px) {
    .nav-list-v2 {
        gap: 40px;
    }
    
    .header-info-left {
        gap: 18px;
    }
    
    .header-search-wrapper {
        flex: 1 1 500px;
        max-width: 550px;
    }
    
    .header-logo-v2 img {
        height: 60px;
    }
}

@media (max-width: 1199px) {
    .header-main-inner {
        gap: 15px;
    }
    
    .header-search-wrapper {
        flex: 1 1 400px;
        max-width: 450px;
    }
    
    .header-logo-v2 img {
        height: 55px;
    }
    
    .search-form-v2 {
        height: 38px;
    }
    
    .nav-list-v2 {
        gap: 30px;
    }
    
    .nav-icon-v2 {
        width: 32px;
        height: 32px;
    }
    
    .nav-icon-v2 i {
        font-size: 18px;
    }
    
    .nav-list-v2 li a span:last-child {
        font-size: 11px;
    }
    
    .header-right-section {
        gap: 10px;
    }
}

@media (max-width: 991px) {
    .header-info-left {
        gap: 12px;
    }
    
    .header-info-left a {
        font-size: 11px;
    }
    
    .header-main-inner {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .header-logo-v2 {
        order: 1;
    }
    
    .header-logo-v2 img {
        height: 50px;
    }
    
    .header-right-section {
        order: 2;
        margin-left: auto;
    }
    
    .header-search-wrapper {
        order: 3;
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 10px;
    }
    
    .search-form-v2 {
        height: 40px;
    }
    
    .nav-list-v2 {
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 25px;
    }
    
    .nav-list-v2::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 767px) {
    .header-info-bar {
        display: none;
    }
    
    .header-main-v2 {
        padding: 15px 0;
    }
    
    .header-main-inner {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 0;
    }
    
    /* Row 1: Logo only - left aligned */
    .header-logo-v2 {
        order: 1;
        align-self: flex-start;
    }
    
    .header-logo-v2 img {
        height: 35px;
        width: auto;
    }
    
    /* Row 2: Menu + Search + Icons - all in one row */
    .header-search-wrapper {
        order: 2;
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin-left: -3px;
    }
    
    /* Hide right section on desktop layout */
    .header-right-section {
        display: none;
    }
    
    /* Mobile Menu Toggle Button - LEFT side of row 2, smaller */
    .mobile-menu-toggle {
        display: flex !important;
        width: 22px;
        height: 22px;
        background: none;
        border: none;
        color: #fff;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        padding: 0;
        flex-shrink: 0;
        position: static;
    }
    
    .mobile-menu-toggle i {
        font-size: 20px;
    }
    
    .search-quick-links {
        display: none;
    }
    
    /* Mobile Search Bar - takes maximum space */
    .search-form-v2 {
        flex: 1 1 auto;
        min-width: 0;
        height: 44px;
        border-radius: 22px;
        background: #fff;
        box-shadow: none;
        overflow: visible;
    }
    
    .search-form-v2 input {
        font-size: 16px;
        padding: 10px 20px 10px 45px;
        color: #333;
        background: transparent;
        width: 100%;
    }
    
    .search-form-v2 input::placeholder {
        color: #999;
        font-size: 16px;
    }
    
    /* Search icon inside input on left */
    .search-form-v2 button {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        padding: 0;
        background: transparent;
        color: #666;
        width: 20px;
        height: 20px;
        border-radius: 0;
    }
    
    .search-form-v2 button:hover {
        background: transparent;
    }
    
    .search-form-v2 button i {
        font-size: 18px;
        color: #666;
    }
    
    /* Hide navigation on mobile */
    .header-nav-v2 {
        display: none;
    }
    
    /* Remove bottom padding to eliminate gap between header and banner */
    .header-wrapper-v2 {
        padding-bottom: 0 !important;
    }
    
    /* Hide user section on mobile */
    .header-user-dropdown,
    .header-user-v2 {
        display: none;
    }
    
    .user-name-v2 {
        display: none;
    }
}

/* Mobile Menu Toggle - Hidden on desktop */
.mobile-menu-toggle {
    display: none;
}

/* Mobile Header Icons - shown only on mobile, right side of row 2 */
.mobile-header-icons {
    display: none;
}

@media (max-width: 767px) {
    .mobile-header-icons {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
        margin-right: -5px;
    }
    
    .mobile-header-icons a {
        color: rgba(255, 255, 255, 0.85);
        font-size: 22px;
        text-decoration: none;
        position: relative;
    }
    
    .mobile-header-icons a:hover {
        color: #fff;
    }
    
    .mobile-header-icons .icon-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #ef4444;
        color: #fff;
        font-size: 8px;
        font-weight: 600;
        min-width: 14px;
        height: 14px;
        border-radius: 7px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 3px;
    }
}

@media (max-width: 480px) {
    .header-main-v2 {
        padding: 12px 0;
    }
    
    .header-main-inner {
        gap: 12px;
    }
    
    .header-logo-v2 img {
        height: 30px;
    }
    
    .header-search-wrapper {
        gap: 10px;
    }
    
    .mobile-menu-toggle {
        width: 24px;
        height: 24px;
    }
    
    .mobile-menu-toggle i {
        font-size: 22px;
    }
    
    .search-form-v2 {
        height: 40px;
    }
    
    .search-form-v2 input {
        font-size: 15px;
        padding: 8px 12px 8px 38px;
    }
    
    .search-form-v2 input::placeholder {
        font-size: 15px;
    }
    
    .search-form-v2 button {
        left: 10px;
        width: 18px;
        height: 18px;
    }
    
    .search-form-v2 button i {
        font-size: 16px;
    }
    
    .mobile-header-icons {
        gap: 14px;
    }
    
    .mobile-header-icons a {
        font-size: 22px;
    }
}
