/* assets/css/header.css */

.announcement-bar {
    background-color: var(--color-accent);
    color: white;
    font-size: 13px;
    padding: 8px var(--spacing-24);
    position: relative;
    overflow: hidden;
    z-index: 1001;
}

.announcement-content {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: var(--spacing-24);
}

@media (max-width: 768px) {
    .announcement-content {
        display: block;
        white-space: nowrap;
        animation: marquee 20s linear infinite;
    }
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.close-announcement {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 18px;
    line-height: 1;
}

.header-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-primary);
    color: white;
    height: 72px;
    transition: height 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
}

.header-bar.shrunk {
    height: 60px;
    background-color: var(--color-primary-dark);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    width: 120px;
    /* Adjusted from 100px for better visibility */
    height: 50px;
    object-fit: contain;
    background-color: var(--color-primary);
    transition: background-color 0.3s ease;
    display: block;
}

.header-bar.shrunk .logo-img {
    background-color: var(--color-primary-dark);
    height: 45px;
    /* Slightly smaller on scroll */
}

/* Navigation */
.nav-links {
    display: flex;
    gap: var(--spacing-32);
}

.nav-link {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
}

/* Icon Group */
.header-icons {
    display: flex;
    align-items: center;
    gap: var(--spacing-24);
}

.header-icon-btn {
    position: relative;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
}

.header-icon-btn:hover {
    color: var(--color-accent);
}

.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--color-error);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Mobile Controls */
.hamburger-menu {
    display: none;
    font-size: 24px;
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .hamburger-menu {
        display: block;
    }
}

/* Mobile Drawer */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

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

.mobile-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 2001;
    transition: 0.3s;
    padding: var(--spacing-24);
    display: flex;
    flex-direction: column;
}

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

.close-drawer {
    align-self: flex-end;
    font-size: 24px;
    color: var(--color-text-primary);
}

.mobile-nav {
    margin-top: var(--spacing-48);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-24);
}

.mobile-nav-link {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    text-transform: uppercase;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.98);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-80) var(--spacing-24);
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-overlay.active {
    transform: translateY(0);
}

.close-search {
    position: absolute;
    top: var(--spacing-32);
    right: var(--spacing-32);
    color: white;
    font-size: 32px;
}

.search-input-wrapper {
    width: 100%;
    max-width: 800px;
    position: relative;
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid white;
    color: white;
    font-size: 32px;
    padding: 12px;
    font-family: var(--font-heading);
}

.search-input:focus {
    outline: none;
    border-bottom-color: var(--color-accent);
}

.search-results {
    margin-top: var(--spacing-48);
    width: 100%;
    max-width: 800px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-24);
    max-height: 60vh;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    gap: var(--spacing-16);
    background: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-12);
    border-radius: 4px;
    transition: 0.2s;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.search-result-item img {
    width: 60px;
    height: 75px;
    object-fit: cover;
}

.search-result-item .info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-result-item .name {
    font-weight: 500;
    color: white;
}

.search-result-item .price {
    color: var(--color-accent);
    font-family: var(--font-mono);
}