/* ============================================================================
   FILE: assets/css/header.css - Complete Header Styles (Your Original Design)
   ============================================================================ */

/* FORCE WHITE BACKGROUND FOR HEADER - High Specificity */
.header,
header.header {
    background: white !important;
    background-color: white !important;
    background-image: none !important;
}

.header-main,
.header .header-main {
    background: white !important;
    background-color: white !important;
    background-image: none !important;
}

.main-nav,
.header .main-nav {
    background: white !important;
    background-color: white !important;
    background-image: none !important;
}

/* ANNOUNCEMENT BAR - Keep Dark */
.announcement-bar {
    background: #333 !important;
    background-color: #333 !important;
    color: white !important;
}

/* LOGO - Ensure Dark Color */
.logo {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 3px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: lowercase;
    position: relative;
    font-family: 'Times New Roman', serif;
}

.logo::before {
    content: 'i';
    position: absolute;
    left: -5px;
    top: -2px;
    font-size: 38px;
    font-weight: 400;
    color: #333;
    z-index: 2;
}

.logo::first-letter {
    opacity: 0; /* Hide the original 'i' */
}

/* NAVIGATION LINKS - Ensure Dark Color */
.nav-links a {
    color: #333 !important;
    background: transparent !important;
}
/* ADD THESE LINES FOR ACTIVE CATEGORY */
.nav-links a.active {
    color: #333;
}
.nav-links a.active::before {
    width: 100%;
}

/* HEADER ICONS - Ensure Dark Color */
.header-icon,
.search-btn {
    color: #333 !important;
    background: transparent !important;
}

.header-icon svg,
.search-btn svg {
    stroke: #333 !important;
}

/* PREVENT GLOBAL STYLES FROM AFFECTING HEADER */
body .header {
    background: white !important;
}

main .header {
    background: white !important;
}

section .header {
    background: white !important;
}

/* RESET ANY INHERITED BACKGROUNDS */
.header * {
    background-image: none !important;
}

.header-main * {
    background-image: none !important;
}

.main-nav * {
    background-image: none !important;
}

.header {
    background: white !important;
    padding: 0;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Top announcement bar */
.announcement-bar {
    background: #333;
    color: white;
    text-align: center;
    padding: 8px 20px;
    font-size: 12px;
    letter-spacing: 0.5px;
    position: relative;
}

.announcement-text {
    max-width: 1200px;
    margin: 0 auto;
}

.announcement-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.announcement-close:hover {
    opacity: 1;
}

/* Main header container */
.header-main {
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

/* Left section with search */
.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #f5f5f5;
}

.search-icon {
    width: 20px;
    height: 20px;
    stroke: #333;
    transition: all 0.3s ease;
}

/* Search dropdown - FIXED WHITE BACKGROUND */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white !important;
    background-color: white !important;
    background-image: none !important;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 20px;
    display: none;
    z-index: 2000;
    min-width: 400px;
}

.search-dropdown.active {
    display: block !important;
}

.search-input-container {
    position: relative;
    margin-bottom: 15px;
}

.search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white !important;
    color: #333 !important;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #333;
}

.search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #333 !important;
    border: none;
    color: white !important;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.search-submit:hover {
    background: #555 !important;
}

.search-suggestions {
    font-size: 12px;
    color: #666 !important;
    background: white !important;
    line-height: 1.4;
}

.search-suggestions strong {
    color: #333 !important;
    font-weight: 500;
}

/* Menu button for mobile */
.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.menu-btn:hover {
    background: #f5f5f5;
}

.menu-icon {
    width: 20px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-icon span {
    display: block;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
}

/* Logo */
.logo {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 3px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    text-transform: lowercase;
    position: relative;
}

.logo:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* Right section with icons */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    justify-content: flex-end;
}

.header-icon {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
}

.icon {
    width: 20px;
    height: 20px;
    stroke: #333;
    transition: all 0.3s ease;
}

/* Cart badge */
.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #333;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Account dropdown - FIXED WHITE BACKGROUND */
.account-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white !important;
    background-color: white !important;
    background-image: none !important;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    padding: 0;
    display: none;
    z-index: 2000;
    min-width: 200px;
    overflow: hidden;
}

.account-dropdown.active {
    display: block !important;
}

.account-dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #333 !important;
    background: white !important;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.account-dropdown-item:last-child {
    border-bottom: none;
}

.account-dropdown-item:hover {
    background: #f8f8f8 !important;
    color: #000 !important;
}

/* Enhanced Navigation */
.main-nav {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px 0;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::before {
    width: 100%;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 3000;
    transition: left 0.3s ease;
    padding: 80px 0 0 0;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2500;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.mobile-nav-links {
    padding: 20px;
}

.mobile-nav-links a {
    display: block;
    padding: 15px 0;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
    color: #666;
}

.mobile-nav-links a.active {
    color: #333;
    font-weight: 600;
}
