/* ===== Zapoye Header — Black Premium ===== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* Promo bar */
.header-promo {
    height: var(--top-bar-height);
    background: #000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
}

.header-promo-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.header-promo-icon {
    flex-shrink: 0;
    opacity: 0.85;
    color: #a78bfa;
}

.header-promo-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.02em;
    text-align: center;
    white-space: nowrap;
}

.header-promo-text--short {
    display: none;
}

/* Main bar — black */
.header-main {
    height: var(--header-height);
    background: #0a0a0a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-header.is-scrolled .header-main {
    background: #000;
    border-bottom-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    gap: 32px;
}

/* Logo */
.site-header .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--purple) 0%, #7c3aed 100%);
    color: #fff;
    font-size: 1.125rem;
    font-weight: 800;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(110, 61, 252, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-header .logo:hover .logo-icon {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(110, 61, 252, 0.5);
}

.site-header .logo-text {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    text-transform: lowercase;
}

/* Nav */
.site-header .nav {
    display: flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.site-header .nav-link {
    position: relative;
    padding: 8px 18px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-header .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.site-header .nav-link.active {
    color: #fff;
    background: rgba(110, 61, 252, 0.2);
}

.site-header .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--purple);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(110, 61, 252, 0.6);
}

.nav-mobile-foot {
    display: none;
}

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

.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease, background 0.2s ease;
    position: relative;
}

.header-icon-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.header-shop-btn {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 22px;
    margin-left: 4px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--purple) 0%, #7c3aed 100%);
    box-shadow: 0 4px 16px rgba(110, 61, 252, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-shop-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(110, 61, 252, 0.45);
    color: #fff;
}

.site-header .cart-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 0.625rem;
    font-weight: 800;
    color: #fff;
    background: #ef4444;
    border-radius: 999px;
    border: 2px solid #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-header .cart-badge[hidden] {
    display: none;
}

/* Mobile menu button */
.site-header .mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
}

.site-header .mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-header .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.site-header .mobile-menu-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header .mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}

.site-header .mobile-menu-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Nav overlay */
.nav-overlay {
    display: none;
}

/* Search */
.search-overlay {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    padding-top: var(--header-total);
}

.search-modal {
    position: relative;
    background: #141414;
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-modal .search-close {
    right: 20px !important;
    top: 28px !important;
    transform: translateY(-50%) !important;
}

.search-modal input {
    background: #0a0a0a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    border-radius: 12px !important;
}

.search-modal input::placeholder {
    color: rgba(255, 255, 255, 0.35) !important;
}

.search-modal input:focus {
    border-color: var(--purple) !important;
    box-shadow: 0 0 0 3px rgba(110, 61, 252, 0.25) !important;
}

.search-close {
    color: rgba(255, 255, 255, 0.5) !important;
}

.search-close:hover {
    color: #fff !important;
}

.search-results {
    background: #0a0a0a !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    margin-top: 8px !important;
}

.search-result-item {
    color: rgba(255, 255, 255, 0.9) !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

.search-result-item:hover {
    background: rgba(110, 61, 252, 0.15) !important;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .site-header .nav-link {
        padding: 8px 14px;
        font-size: 0.875rem;
    }
}

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

    .header-promo-text--full {
        display: none;
    }

    .header-promo-text--short {
        display: block;
    }

    .header-promo-icon {
        width: 14px;
        height: 14px;
    }

    .header-promo-text {
        font-size: 0.6875rem;
    }

    .header-row {
        gap: 12px;
    }

    .logo-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        border-radius: 9px;
    }

    .site-header .logo-text {
        font-size: 1.25rem;
    }

    .header-shop-btn {
        display: none;
    }

    .site-header .mobile-menu-btn {
        display: flex;
    }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(6px);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-overlay.open {
        opacity: 1;
        visibility: visible;
    }

    .site-header .nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        width: min(300px, 85vw);
        height: 100dvh;
        transform: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: calc(var(--header-total) + 20px) 20px calc(24px + env(safe-area-inset-bottom));
        background: #0a0a0a;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: -12px 0 48px rgba(0, 0, 0, 0.5);
        translate: 100% 0;
        transition: translate 0.32s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
    }

    .site-header .nav.open {
        translate: 0 0;
    }

    .site-header .nav-link {
        font-size: 1rem;
        padding: 14px 16px;
        border-radius: 12px;
        color: rgba(255, 255, 255, 0.65);
    }

    .site-header .nav-link:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.06);
    }

    .site-header .nav-link.active::after {
        display: none;
    }

    .site-header .nav-link.active {
        color: #fff;
        background: rgba(110, 61, 252, 0.25);
    }

    .nav-mobile-foot {
        display: block;
        margin-top: auto;
        padding-top: 24px;
    }

    .nav-mobile-cta {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 48px;
        border-radius: 12px;
        font-size: 0.9375rem;
        font-weight: 700;
        color: #fff;
        background: linear-gradient(135deg, var(--purple), #7c3aed);
        box-shadow: 0 4px 16px rgba(110, 61, 252, 0.35);
    }
}

@media (max-width: 380px) {
    .site-header .logo-text {
        font-size: 1.125rem;
    }
}
