/* =================================================
   PREMIUM MOBILE DRAWER - AURORASHOP
================================================= */
.mobile-drawer {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--aurora-gradient); /* Reaguje na kolory marki z Customizera */
    z-index: 2500;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-28px);
    transition: opacity .4s ease, transform .5s cubic-bezier(.2, 1, .3, 1), visibility .4s ease;
}

.mobile-drawer.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Subtelny akcent świetlny w tle menu */
.mobile-drawer::before {
    content: "";
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%);
    pointer-events: none;
}

/* Header Szuflady */
.drawer-header {
    width: 100%;
    max-width: 660px;
    margin: 0 auto;
    padding: 22px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-drawer {
    background: #ffffff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--aurora-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    transition: var(--aurora-transition);
}

.close-drawer:hover {
    transform: rotate(90deg);
    color: var(--aurora-indigo);
}

/* Logo w menu – czytelne na gradiencie */
.mobile-drawer .drawer-header .logo-text,
.mobile-drawer .drawer-header .logo-text span { color: #fff !important; }

/* Zawartość Menu Mobilnego */
.drawer-content {
    position: relative;
    flex-grow: 1;
    width: 100%;
    max-width: 660px;
    margin: 0 auto;
    padding: 28px 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-menu-list {
    list-style: none !important;
    padding: 0;
    margin: 0;
}

.mobile-menu-list > li {
    margin: 0;
    list-style: none !important;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transform: translateY(20px);
    opacity: 0;
    transition: transform .45s cubic-bezier(.2, 1, .3, 1), opacity .45s ease;
}

.mobile-drawer.is-active .mobile-menu-list > li {
    transform: translateY(0);
    opacity: 1;
}

/* Kaskadowe wejście linków */
.mobile-drawer.is-active .mobile-menu-list > li:nth-child(1) { transition-delay: .10s; }
.mobile-drawer.is-active .mobile-menu-list > li:nth-child(2) { transition-delay: .16s; }
.mobile-drawer.is-active .mobile-menu-list > li:nth-child(3) { transition-delay: .22s; }
.mobile-drawer.is-active .mobile-menu-list > li:nth-child(4) { transition-delay: .28s; }
.mobile-drawer.is-active .mobile-menu-list > li:nth-child(5) { transition-delay: .34s; }
.mobile-drawer.is-active .mobile-menu-list > li:nth-child(6) { transition-delay: .40s; }
.mobile-drawer.is-active .mobile-menu-list > li:nth-child(7) { transition-delay: .46s; }
.mobile-drawer.is-active .mobile-menu-list > li:nth-child(n+8) { transition-delay: .52s; }

/* Linki Główne w Mobile (duża typografia) */
.mobile-menu-list a {
    font-family: 'Archivo', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    text-decoration: none;
    display: block;
    padding: 18px 4px;
    transition: transform .25s ease, opacity .25s ease, padding-left .25s ease;
}

.mobile-menu-list a:hover,
.mobile-menu-list a:active {
    opacity: 0.9;
    padding-left: 12px;
}

/* --- OBSŁUGA PODMENU W MOBILE (AAA, CCC) --- */
.mobile-menu-list .menu-item-has-children > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Ikona plusa/strzałki dla rozwijanych elementów */
.mobile-menu-list .menu-item-has-children > a::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 400;
    transition: transform 0.3s ease;
}

/* Stylizacja otwartego podmenu */
.mobile-menu-list .sub-menu {
    list-style: none !important;
    padding: 10px 0 0 20px;
    margin: 0;
    display: none; /* Domyślnie ukryte - wymaga prostego JS toggle */
}

/* Gdy podmenu jest aktywne (klasa dodawana przez JS) */
.mobile-menu-list .menu-item-has-children.is-open > .sub-menu {
    display: block;
}

.mobile-menu-list .menu-item-has-children.is-open > a::after {
    content: '-';
    transform: rotate(180deg);
}

.mobile-menu-list .sub-menu li {
    margin-bottom: 12px;
}

.mobile-menu-list .sub-menu a {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Footer Szuflady */
.drawer-footer {
    width: 100%;
    max-width: 660px;
    margin: 0 auto;
    padding: 26px 30px;
    padding-bottom: max(26px, env(safe-area-inset-bottom));
    background: rgba(0, 0, 0, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.drawer-socials {
    display: flex;
    gap: 12px;
}

.drawer-socials a {
    width: 38px;
    height: 38px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aurora-accent);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.drawer-socials a:hover {
    transform: translateY(-3px);
}

/* Overlay tła */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 2400;
}

body.menu-open .drawer-overlay {
    opacity: 1;
    visibility: visible;
}
/* =================================================
   Aurora-SIDEBAR (FILTER) — BOTTOM SHEET (standard mobilnego e-commerce)
================================================= */

@media (max-width: 991px) {
    .aurora-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        width: auto;
        max-width: none;
        height: auto;
        max-height: 88vh;
        background: #f8fafc;
        z-index: 2600; /* oczko wyżej niż menu, jeśli oba byłyby otwarte */
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        transition: transform .4s cubic-bezier(.2, 1, .3, 1);
        box-shadow: 0 -20px 60px rgba(15, 23, 42, .2);
        display: flex;
        flex-direction: column;
        padding: 0 !important;
        overflow: hidden;
    }

    .aurora-sidebar.active {
        transform: translateY(0);
    }

    /* Uchwyt do "ściągania" arkusza (wizualna sygnatura bottom-sheet) */
    .aurora-sidebar-header {
        position: relative;
        flex-shrink: 0;
        background: #ffffff;
        display: flex;
        justify-content: space-between;
        align-items: center;
        color: var(--aurora-navy);
        padding: 22px 20px 14px;
        border-bottom: 1px solid var(--aurora-border, #eef2f6);
    }

    .aurora-sidebar-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 5px;
        border-radius: 10px;
        background: #e2e8f0;
    }

    .aurora-sidebar-header span {
        font-family: 'Archivo', sans-serif;
        font-weight: 800;
        font-size: 1.05rem;
        text-transform: none;
        letter-spacing: 0;
    }

    .aurora-close-btn {
        background: var(--aurora-bg-light, #f1f5f9);
        border: none;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        color: var(--aurora-navy);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        line-height: 0;
        transition: var(--aurora-transition);
    }

    .aurora-close-btn:hover {
        background: var(--aurora-accent);
        color: #fff;
    }

    /* Kontener na widżety — jedyna scrollowalna część arkusza */
    .aurora-sidebar-scroll {
        flex: 1 1 auto;
        overflow-y: auto;
        padding: 18px 20px;
        -webkit-overflow-scrolling: touch;
    }

    /* Stopka z akcjami — przyklejona do dołu arkusza, zawsze widoczna */
    .aurora-sidebar-footer {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-shrink: 0;
        padding: 14px 20px;
        padding-bottom: max(14px, env(safe-area-inset-bottom));
        background: #ffffff;
        border-top: 1px solid var(--aurora-border, #eef2f6);
    }

    .aurora-filters-clear {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
        font-size: 13.5px;
        font-weight: 700;
        color: var(--aurora-slate);
        text-decoration: none;
        padding: 13px 14px;
        white-space: nowrap;
        transition: var(--aurora-transition);
    }

    .aurora-filters-clear:hover {
        color: var(--aurora-error);
    }

    .aurora-filters-apply {
        flex: 1;
        background: var(--aurora-navy);
        color: #fff;
        border: none;
        border-radius: 50px;
        padding: 14px 18px;
        font-weight: 700;
        font-size: 14px;
        cursor: pointer;
        transition: var(--aurora-transition);
    }

    .aurora-filters-apply:hover {
        background: var(--aurora-indigo);
    }
}

/* Stopka istnieje w DOM zawsze (też na desktopie) — ale tam sidebar jest
   inline, więc te przyciski są zbędne i pozostają ukryte. */
@media (min-width: 992px) {
    .aurora-sidebar-footer {
        display: none;
    }
}

/* =================================================
   STYLIZACJA WIDŻETÓW (Karty produktów)
================================================= */

/* Wygląd kart wewnątrz filtra — box-styling (tło/border/radius/shadow) ma
   teraz jedno źródło prawdy: shop/archive-product.css. Tu zostaje tylko
   odstęp między kartami w szufladzie mobilnej. */
.aurora-sidebar .widget {
    margin-bottom: 20px !important;
}

/* Tytuły sekcji filtra */
.aurora-sidebar .widgettitle, 
.aurora-sidebar .widget-title {
    font-family: 'Archivo', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Pasek akcentowy przy tytule */
.aurora-sidebar .widgettitle::before,
.aurora-sidebar .widget-title::before {
    content: '';
    width: 4px;
    height: 18px;
    background: var(--aurora-accent); /* Spójność z kolorem brandu */
    border-radius: 10px;
    display: inline-block;
}

/* Przycisk "Filtruj produkty" nad sklepem */
.aurora-mobile-filter-btn {
    display: none;
}

@media (max-width: 991px) {
    .aurora-mobile-filter-btn {
        display: flex;
        width: 100%;
        background: var(--aurora-navy, #1e293b);
        color: white;
        padding: 14px;
        border-radius: 50px;
        border: none;
        font-family: 'Archivo', sans-serif;
        font-weight: 700;
        font-size: 14px;
        margin-bottom: 25px;
        justify-content: center;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        transition: var(--aurora-transition);
    }

    .aurora-mobile-filter-btn:active {
        transform: scale(.98);
    }
}

/* Wspólny Overlay dla wszystkiego */
.site-overlay.is-active {
    opacity: 1;
    visibility: visible;
}
/* =================================================
   SEKCJA KONTA W MENU MOBILNYM
================================================= */
.drawer-account-section {
    padding: 0 0 25px 0;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
}

.drawer-login-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    font-size: .95rem;
}

.user-welcome .welcome-text {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #ffffff;
}

.user-links { font-size: .85rem; color: rgba(255, 255, 255, .8); }
.user-links a { color: #ffffff; text-decoration: none; font-weight: 600; }
.user-links .sep { margin: 0 8px; opacity: .5; }
