/* =================================================
   HEADER – KRYSTALSPACE PREMIUM
================================================= */

/* ---------- VARIABLES ---------- */
:root {
    --ks-primary: #1a1a1a;
    --ks-accent: #3a7bd5;
    --ks-white: #ffffff;
    --ks-black: #000000;
    --ks-transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --ks-glass: rgba(255, 255, 255, 0.8);
    --ks-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* ---------- HEADER BASE ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

/* OPTIONAL GLOW CARD (jeśli użyjesz .card w headerze) */
.site-header .card {
    background: conic-gradient(
        from 120deg,
        #ff0080,
        #ff8c00,
        #40e0d0,
        #8a2be2,
        #ff0080
    );
    filter: blur(40px);
    opacity: 0.6;
}

/* ---------- INNER ---------- */
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ---------- LOGO ---------- */
.site-logo {
    flex-shrink: 0;
    z-index: 1001;
}

/* =================================================
   DESKTOP NAVIGATION (≥ 992px)
================================================= */
@media (min-width: 992px) {

    .main-navigation {
        flex-grow: 1;
        display: flex;
        justify-content: center;
    }

    .main-menu-list {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
        gap: 35px;
    }

    .main-menu-list li a {
        text-decoration: none;
        color: var(--ks-primary);
        font-weight: 500;
        font-size: 15px;
        transition: var(--ks-transition);
        position: relative;
    }

    .main-menu-list li a::after {
        content: '';
        position: absolute;
        bottom: -6px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--ks-accent);
        transition: var(--ks-transition);
    }

    .main-menu-list li a:hover {
        color: var(--ks-accent);
    }

    .main-menu-list li a:hover::after {
        width: 100%;
    }
}

/* =================================================
   HEADER ACTIONS
================================================= */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* SEARCH */
.header-search-trigger {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: var(--ks-primary);
    transition: var(--ks-transition);
}

.header-search-trigger i {
    font-size: 18px;
}

.header-search-trigger:hover {
    color: var(--ks-accent);
    transform: translateY(-2px);
}

/* CART */
.cart-contents {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-count-bubble {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--ks-black);
    color: var(--ks-white);
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ks-white);
}

/* =================================================
   MOBILE NAV (≤ 991px)
================================================= */
@media (max-width: 991px) {

    .site-header-inner {
        height: 65px;
    }

    /* Hamburger */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1100;
        order: -1;
    }

    .hamburger-box {
        width: 24px;
        height: 14px;
        display: block;
        position: relative;
    }

    .hamburger-inner,
    .hamburger-inner::before,
    .hamburger-inner::after {
        width: 100%;
        height: 2px;
        background-color: var(--ks-primary);
        position: absolute;
        transition: var(--ks-transition);
    }

    .hamburger-inner {
        top: 50%;
        transform: translateY(-50%);
    }

    .hamburger-inner::before {
        content: "";
        top: -6px;
        left: 0;
    }

    .hamburger-inner::after {
        content: "";
        bottom: -6px;
        left: 0;
    }

    body.menu-open .hamburger-inner {
        background: transparent;
    }

    body.menu-open .hamburger-inner::before {
        transform: rotate(45deg);
        top: 0;
    }

    body.menu-open .hamburger-inner::after {
        transform: rotate(-45deg);
        bottom: 0;
    }

    /* Mobile drawer */
    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        background: #ffffff;
        z-index: 1050;
        padding: 100px 40px;
        box-shadow: var(--ks-shadow);
        transition: var(--ks-transition);
        display: flex;
        flex-direction: column;
    }

    .main-navigation.is-active {
        left: 0;
    }

    .main-menu-list {
        flex-direction: column;
        gap: 25px;
    }

    .main-menu-list li a {
        font-size: 1.2rem;
        font-weight: 600;
    }

    .site-logo {
        margin-right: auto;
        padding-left: 15px;
    }
}

/* =================================================
   SEARCH OVERLAY
================================================= */
.search-bar-overlay {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background: var(--ks-glass);
    backdrop-filter: blur(15px);
    padding: 50px 20px;
    z-index: 2000;
    transition: var(--ks-transition);
    box-shadow: var(--ks-shadow);
    display: flex;
    justify-content: center;
}

.search-bar-overlay.is-active {
    top: 0;
}

/* =================================================
   TOP BAR
================================================= */
.krystal-top-bar {
    background: var(--ks-primary);
    color: var(--ks-white);
    font-size: 11px;
    text-align: center;
    padding: 8px 10px;
    letter-spacing: 0.5px;
}
