/* ==========================================================================
   Header — topbar + sticky navigation.
   ========================================================================== */

/* --- Topbar --- */

.topbar {
    background: var(--grad-hero);
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
}

.topbar a {
    color: rgba(255, 255, 255, 0.95);
}

.topbar a:hover {
    color: var(--white);
}

.topbar-inner {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
}

/* --- Site header --- */

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* --- Logo --- */

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    font-size: 22px;
    flex-shrink: 0;
    color: var(--dark);
}

.logo:hover {
    color: var(--dark);
}

.logo-mark {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--grad-hero);
    display: grid;
    place-items: center;
    color: var(--white);
    font-weight: 700;
    box-shadow: var(--shadow);
}

.logo small {
    display: block;
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* --- Main nav --- */

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 15px;
    font-weight: 600;
    flex: 1;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav a.active {
    color: var(--secondary);
}

/* --- Header actions --- */

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    display: grid;
    place-items: center;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.05);
    font-size: 18px;
    color: var(--text);
    transition: border-color 0.15s, color 0.15s;
    position: relative;
    text-decoration: none;
}

.icon-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

/* Cart count badge */
.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--secondary);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    padding: 0 4px;
}

/* --- Search overlay --- */

.lb-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
}

.lb-search-overlay.active {
    display: flex;
}

.lb-search-overlay-inner {
    width: min(640px, calc(100% - 32px));
    position: relative;
}

.lb-search-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: color 0.15s;
}

.lb-search-close:hover {
    color: var(--white);
}

.lb-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--white);
    border-radius: 999px;
    padding: 16px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.lb-search-input-wrap i {
    font-size: 20px;
    color: var(--muted);
}

.lb-search-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 18px;
    color: var(--text);
    font-family: 'Outfit', sans-serif;
}

.lb-search-input-wrap input::placeholder {
    color: var(--muted);
}

.lb-search-hints {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.lb-search-hints span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.lb-search-hints a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.12);
    padding: 5px 14px;
    border-radius: 999px;
    font-weight: 600;
    transition: background 0.15s;
}

.lb-search-hints a:hover {
    background: rgba(255, 255, 255, 0.22);
    color: var(--white);
}

/* --- Mobile menu toggle --- */

.mobile-menu-toggle {
    display: none;
}

/* --- Mobile menu drawer --- */

.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--white);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-header .logo {
    font-size: 18px;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    display: grid;
    place-items: center;
    font-size: 18px;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s;
}

.mobile-menu-close:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.mobile-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.mobile-menu-nav a {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.mobile-menu-nav a:hover {
    background: var(--light);
    color: var(--secondary);
}

.mobile-menu-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    background: var(--grad-hero);
    color: var(--white) !important;
    transition: opacity 0.15s;
}

.mobile-menu-btn:hover {
    opacity: 0.9;
    color: var(--white) !important;
}

.mobile-menu-btn--outline {
    background: none;
    border: 1px solid var(--border);
    color: var(--text) !important;
}

.mobile-menu-btn--outline:hover {
    border-color: var(--secondary);
    color: var(--secondary) !important;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    z-index: 10000;
}

.mobile-menu-overlay.active {
    display: block;
}

/* --- Responsive --- */

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

    .mobile-menu-toggle {
        display: grid;
    }

    .hide-mobile {
        display: none;
    }
}

@media (max-width: 640px) {
    .topbar {
        display: none;
    }

    .header-inner {
        min-height: 70px;
    }

    .logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .logo small {
        display: none;
    }
}
