/* Header Styles */
.header {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Announcement Banner */
.announcement-banner {
    background: linear-gradient(90deg, #0066cc 0%, #0099ff 100%);
    color: white;
    padding: 8px 0;
    overflow: hidden;
    position: relative;
}

.announcement-slider {
    display: flex;
    animation: scroll 20s linear infinite;
}

.announcement-item {
    flex-shrink: 0;
    padding: 0 40px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
    min-width: 33.333%;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.announcement-banner:hover .announcement-slider {
    animation-play-state: paused;
}

.header-top {
    background-color: var(--bg-gray);
    border-bottom: 1px solid var(--border-color);
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 13px;
}

.promo-text {
    color: var(--primary-color);
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.language-switcher select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-size: 13px;
}

.header-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    gap: 40px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.main-nav {
    flex: 1;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding: 5px 0;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.header-tools {
    display: flex;
    gap: 20px;
    align-items: center;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    width: 250px;
    padding: 10px 40px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 14px;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.search-btn {
    position: absolute;
    right: 10px;
    padding: 5px;
    display: flex;
    align-items: center;
    color: var(--text-light);
}

.search-btn:hover {
    color: var(--primary-color);
}

.cart-icon, .user-icon {
    position: relative;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cart-icon:hover, .user-icon:hover {
    background-color: var(--bg-gray);
    color: var(--primary-color);
}

.user-name-display {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    margin-left: 0 !important;
}

.user-icon:hover .user-name-display {
    color: var(--primary-color);
}

/* User Dropdown Menu */
.user-icon {
    position: relative;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown-item:hover {
    background-color: #f8f8f8;
    color: var(--primary-color);
}

.dropdown-item svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.dropdown-item:hover svg {
    transform: translateX(2px);
}

.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: var(--primary-color);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-nav ul {
        gap: 20px;
    }
    
    .main-nav a {
        font-size: 14px;
    }
    
    .search-box input {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .header-main-content {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .main-nav {
        width: 100%;
        order: 3;
        overflow-x: auto;
    }
    
    .main-nav ul {
        white-space: nowrap;
    }
    
    .search-box input {
        width: 150px;
    }
}
