/**
 * Ultra Modern Header Design - 2025
 * Premium, clean layout with enhanced visual hierarchy
 */

/* Header Top Bar - calmer contrast */
.header-top {
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.header-contact-info {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    padding: 0.25rem 0;
}

.header-contact-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff5900;
    transition: width 0.3s ease;
}

.header-contact-link:hover {
    color: #fff;
    transform: translateY(-2px);
}

.header-contact-link:hover::after {
    width: 100%;
}

.header-contact-link svg {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.3));
}

.header-top-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Compact Currency Switcher */
.currency-switcher-compact {
    position: relative;
}

.currency-toggle-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.currency-toggle-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.currency-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.15);
    min-width: 150px;
    z-index: 1000;
    overflow: hidden;
}

.currency-option {
    width: 100%;
    padding: 0.625rem 0.875rem;
    text-align: left;
    border: none;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.currency-option:hover {
    background: #f8fafc;
}

.currency-option[data-active="true"] {
    background: #fff7ed;
    font-weight: 600;
    color: #ff5900;
}

/* Header Main Section - Elevated Design */
.header-main {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px -5px rgba(0,0,0,0.08);
    position: relative;
    z-index: 100;
}

.header-main-content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
}

/* Logo */
.logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    text-decoration: none;
    color: inherit;
}

.logo-link:hover {
    opacity: 0.85;
}

.logo h1 {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.2;
}

.site-logo {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

.tagline {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* Header Search Bar - Premium Design */
.header-search-bar {
    max-width: 650px;
    width: 100%;
    display: flex;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.header-search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0.75rem;
}

.search-icon {
    color: #94a3b8;
    flex-shrink: 0;
}

.header-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 0;
    font-size: 0.9375rem;
    color: #1e293b;
    outline: none;
}

.header-search-bar input::placeholder {
    color: #94a3b8;
}

.search-btn {
    background: #ff5900 0%, #ff5900 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.search-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Header Main Actions */
.header-main-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Account Menu */
.account-menu {
    position: relative;
}

.account-toggle-btn {
    background: #ff5900;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.account-toggle-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.account-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    transition: transform 0.2s;
}

.account-menu:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.account-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 20px 60px -10px rgba(0,0,0,0.2);
    min-width: 240px;
    z-index: 1000;
    overflow: hidden;
    animation: dropdownFadeIn 0.3s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.account-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s;
    position: relative;
}

.account-dropdown a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.account-dropdown a:hover {
    background: #ff5900 0%, transparent 100%);
    padding-left: 1.75rem;
}

.account-dropdown a:hover::before {
    transform: scaleY(1);
}

.account-dropdown .logout-link {
    color: #dc2626;
}

.account-dropdown .logout-link:hover {
    background: #fef2f2;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

/* Header Buttons - Premium Style */
.btn-outline-header {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    color: #1e293b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.btn-outline-header:hover {
    border-color: var(--primary-color);
    color: white;
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary-header {
    background: #ff5900;
    color: white;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.35);
    letter-spacing: 0.3px;
}

.btn-primary-header:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

/* Cart Button - Eye-catching Design */
.cart-btn {
    position: relative;
    background: #ff5900;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(255, 89, 0, 0.35);
    letter-spacing: 0.3px;
}

.cart-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 89, 0, 0.5);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff5900;
    color: white;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* WhatsApp Button - Vibrant Design */
.whatsapp-btn {
    background: #ff5900;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
    letter-spacing: 0.3px;
}

.whatsapp-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn svg {
    animation: whatsappBounce 2s infinite;
}

@keyframes whatsappBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1) rotate(-5deg);
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1e293b;
    transition: all 0.3s;
}

/* Header Navigation - Sleek Design */
.header-nav {
    background: #ff5900;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 999;
    backdrop-filter: blur(10px);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
}

.nav-links a {
    text-decoration: none;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    transition: all 0.3s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: #ff5900, #ff5900);
    border-radius: 2px;
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.08);
}

.nav-links a:hover::after {
    width: 60%;
}

.nav-links a.active {
    color: white;
    background: #ff5900 0%, #ff5900 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-links a.active::after {
    display: none;
}

.nav-links a.has-submenu svg {
    transition: transform 0.2s;
}

.nav-links a.has-submenu:hover svg {
    transform: rotate(180deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 320px;
    height: 100%;
    background: white;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-search {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-search input {
    flex: 1;
    padding: 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9375rem;
}

.mobile-search button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.625rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

.mobile-nav-links {
    padding: 1rem;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
    text-decoration: none;
    color: #1e293b;
    font-weight: 600;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-cart-badge {
    background: #ff5900;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .header-search-bar {
        max-width: 400px;
    }
    
    .header-main-actions {
        gap: 0.5rem;
    }
    
    .btn-outline-header, .btn-primary-header, .cart-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.875rem;
    }
    
    .whatsapp-btn span {
        display: none;
    }
}

@media (max-width: 1024px) {
    .header-main-content {
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
    }
    
    .header-search-bar {
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .header-top {
        display: none;
    }
    
    .header-main-content {
        grid-template-columns: 1fr auto;
        gap: 1rem;
    }
    
    .header-search-bar {
        display: none;
    }
    
    .header-main-actions {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-nav {
        display: none;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .site-logo {
        max-height: 40px;
    }
}

@media (max-width: 540px) {
    .header-main {
        padding: 1rem 0;
    }
    
    .logo h1 {
        font-size: 1.125rem;
    }
    
    .cart-btn {
        padding: 0.5rem;
    }
    
    .cart-btn svg {
        width: 20px;
        height: 20px;
    }
}
