/**
 * Compact Stunning Header
 * BangHotDeals - Ultra Modern Single-Row Header
 * Version: 5.0.0
 */

/* ============================================
   COMPACT HEADER - SINGLE ROW DESIGN
   ============================================ */
.site-header.compact-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(15, 12, 41, 0.95) 0%, rgba(48, 43, 99, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.compact-header.scrolled {
    background: rgba(15, 12, 41, 0.98);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* Header Container */
.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    justify-self: start;
}

.logo-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(255, 150, 50, 0.5));
    animation: logoGlow 2s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% { filter: drop-shadow(0 0 8px rgba(255, 150, 50, 0.4)); transform: scale(1); }
    100% { filter: drop-shadow(0 0 15px rgba(255, 150, 50, 0.7)); transform: scale(1.05); }
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.header-logo:hover .logo-text {
    background: linear-gradient(135deg, #fff, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation (Right aligned) */
.header-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #f093fb);
    transform: translateX(-50%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-icon {
    font-size: 1rem;
}

.nav-text {
    font-size: 0.85rem;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Search Toggle Button */
.header-search-toggle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-search-toggle:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
    transform: scale(1.05);
}

/* User Button */
.header-user-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.header-user-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

/* Login Button */
.header-login-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.header-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    gap: 5px;
}

.hamburger-menu span {
    display: block;
    width: 18px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   EXPANDABLE SEARCH
   ============================================ */
.header-search-expanded {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(15, 12, 41, 0.98), rgba(48, 43, 99, 0.98));
    backdrop-filter: blur(20px);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.header-search-expanded.active {
    max-height: 120px;
    padding: 20px 0;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 4px;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.3);
}

.search-input-wrapper .search-icon {
    margin-left: 16px;
    color: rgba(255, 255, 255, 0.6);
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 16px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
}

.search-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input-wrapper button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-input-wrapper button:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.search-close {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-close:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

/* ============================================
   QUICK CATEGORIES BAR
   ============================================ */
.quick-categories-bar {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 10px 0;
    transition: all 0.3s ease;
}

.categories-scroll {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Allow horizontal scroll on mobile */
@media (max-width: 900px) {
    .categories-scroll {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .categories-scroll::-webkit-scrollbar {
        display: none;
    }
}

.cat-chip {
    flex-shrink: 0;
    padding: 8px 16px;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cat-chip:hover,
.cat-chip.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* ============================================
   MEGA MENU BAR
   ============================================ */
.mega-menu-bar {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 999;
    background: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e5e7eb;
}

.mega-menu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.mega-menu-item {
    position: relative;
}

.mega-menu-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.mega-menu-trigger:hover {
    background: #f3f4f6;
    color: #667eea;
}

.mega-menu-trigger span {
    font-size: 1.1rem;
}

.mega-menu-trigger svg {
    transition: transform 0.2s ease;
}

.mega-menu-item:hover .mega-menu-trigger svg {
    transform: rotate(180deg);
}

.mega-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.mega-menu-item:hover .mega-menu-dropdown {
    opacity: 1;
    visibility: visible;
}

.mega-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mega-menu-dropdown a:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: #667eea;
    transform: translateX(4px);
}

.mega-menu-all-deals {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 8px;
    margin-left: 8px;
    transition: all 0.3s ease;
}

.mega-menu-all-deals:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Body padding to account for fixed header + mega menu */
body {
    padding-top: 112px;
}

body.has-categories-bar {
    padding-top: 156px;
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: linear-gradient(180deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    z-index: 1999;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.2rem;
}

.mobile-menu-logo span {
    font-size: 1.5rem;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(239, 68, 68, 0.3);
}

.mobile-menu-nav {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.mobile-menu-item-icon {
    font-size: 1.2rem;
}

.mobile-menu-item:hover,
.mobile-menu-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    color: white;
    transform: translateX(6px);
}

.mobile-menu-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn {
    display: block;
    text-align: center;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.mobile-menu-btn.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.mobile-menu-btn:hover {
    transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .header-container {
        display: flex;
        justify-content: space-between;
    }

    .header-nav {
        display: none;
    }

    .header-right {
        gap: 8px;
    }

    .hamburger-menu {
        display: flex;
    }

    .header-login-btn {
        display: none;
    }

    .mega-menu-bar {
        display: none;
    }

    body {
        padding-top: 64px;
    }
}

@media (max-width: 600px) {
    .header-container {
        padding: 0 16px;
        height: 56px;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    body {
        padding-top: 56px;
    }

    .quick-categories-bar {
        top: 56px;
    }

    body.has-categories-bar {
        padding-top: 100px;
    }

    .search-input-wrapper button {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
}
