/* Header Unified Styles */
:root {
    --header-bg-black: #000000;
    --header-bg-white: #ffffff;
    --header-text-white: #ffffff;
    --header-text-black: #000000;
    --header-accent-green: #22c55e;
    --header-font-primary: 'Inter', sans-serif;
    --header-height-top: 36px;
    --header-height-main: 80px;
    --header-height-total: calc(var(--header-height-top) + var(--header-height-main));
}

/* Base */
.header-unified {
    width: 100%;
    font-family: var(--header-font-primary);
    overflow-x: hidden; 
}

/* Container for Fixed Header (Top Bar + Main Header) */
.header-fixed-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    background-color: var(--header-bg-black);
}

.header-fixed-container.header-hidden {
    transform: translateY(-100%);
}

.header-fixed-container.header-visible {
    transform: translateY(0);
}

/* Spacer to prevent content jump */
.header-spacer {
    height: var(--header-height-total);
    width: 100%;
}

/* 1. Top Notification Bar */
.header-top-bar {
    background-color: var(--header-bg-black);
    color: var(--header-text-white);
    height: var(--header-height-top);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #1a1a1a;
    position: relative;
    z-index: 1002;
}

.header-top-content {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Spread items */
    width: 100%;
    max-width: 1400px; /* Match main container */
    padding: 0 20px;
    gap: 15px;
}

.header-top-text {
    flex: 1;
    text-align: center;
    transition: opacity 0.2s ease-in-out;
}

.header-top-arrow {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    font-size: 12px;
    padding: 5px;
}

.header-top-arrow:hover {
    opacity: 1;
}

/* 2. Main Header (Black) */
.header-main {
    background-color: var(--header-bg-black);
    height: var(--header-height-main);
    width: 100%;
    display: flex;
    align-items: center;
}

/* Container */
.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.header-logo img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

/* Search Bar */
.header-search {
    flex: 1;
    max-width: 700px;
    position: relative;
}

.header-search-input {
    width: 100%;
    height: 48px;
    padding: 0 50px 0 20px;
    border-radius: 4px;
    border: none;
    background-color: #ffffff;
    font-size: 14px;
    color: #000;
    outline: none;
    font-weight: 400;
}

.header-search-input::placeholder {
    color: #9ca3af;
}

.header-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 18px;
    transition: color 0.2s;
}

.header-search-btn:hover {
    color: #444;
}

/* Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-shrink: 0;
}

.header-action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
    font-size: 13px;
    transition: opacity 0.2s;
}

.header-action-item:hover {
    opacity: 0.9;
}

.header-action-icon {
    font-size: 24px;
}

.header-action-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.header-action-text span {
    color: #d1d5db;
    font-weight: 400;
}

.header-action-text strong {
    color: #ffffff;
    font-weight: 700;
}

/* Cart Badge */
.header-cart-icon-wrapper {
    position: relative;
    padding: 5px;
}

.header-cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--header-accent-green);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    height: 18px;
    width: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--header-bg-black);
}

/* 3. Navigation Bar (White) */
.header-nav {
    background-color: var(--header-bg-white);
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 999;
}

.header-nav-list {
    display: flex;
    justify-content: center;
    gap: 30px;
    list-style: none;
    padding: 16px 20px;
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: auto;
    scrollbar-width: none; /* Hide scrollbar Firefox */
}

.header-nav-list::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome */
}

.header-nav-link {
    text-decoration: none;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: color 0.2s;
    position: relative;
}

.header-nav-link:hover {
    color: #000000;
}

.header-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #000;
    transition: width 0.2s;
}

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

/* Mobile Responsive */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 20px;
        gap: 20px;
    }
    
    .header-search {
        max-width: 400px;
    }
    
    .header-nav-list {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height-main: 60px;
    }

    .header-top-bar {
        /* display: none; */ /* User wants it visible with arrows */
    }
    
    .header-action-text {
        display: none;
    }
    
    .header-search {
        display: none; /* Search often moves to a toggle or separate line on mobile */
    }
    
    .header-container {
        justify-content: space-between;
    }
}
