/* Storefront motion polish: drawer animation, dark close button, and lightweight micro-interactions. */

@media (prefers-reduced-motion: no-preference) {
    .header-category-nav a,
    .header-social-link,
    .icon-button,
    .button,
    .catalog-drawer__cta,
    .catalog-drawer__nav a,
    .catalog-drawer__group > summary,
    .catalog-drawer__series > summary,
    .catalog-drawer__series a,
    .product-card,
    .products article,
    .category-card,
    .home-social-card,
    .budget-picker a,
    .home-trust-panel__grid a,
    .quick-actions a,
    .quick-actions button {
        transition:
            transform .22s cubic-bezier(.2, .8, .2, 1),
            box-shadow .22s cubic-bezier(.2, .8, .2, 1),
            border-color .22s ease,
            background-color .22s ease,
            color .22s ease,
            opacity .22s ease !important;
    }

    .header-category-nav a:hover,
    .header-social-link:hover,
    .icon-button:hover,
    .button:hover,
    .catalog-drawer__cta:hover,
    .catalog-drawer__nav a:hover,
    .catalog-drawer__group > summary:hover,
    .catalog-drawer__series > summary:hover,
    .catalog-drawer__series a:hover,
    .product-card:hover,
    .products article:hover,
    .category-card:hover,
    .home-social-card:hover,
    .budget-picker a:hover,
    .home-trust-panel__grid a:hover {
        transform: translateY(-2px);
    }

    .catalog-drawer {
        display: block !important;
        visibility: hidden;
        pointer-events: none;
        opacity: 0;
        transition: opacity .28s ease, visibility .28s step-end !important;
    }

    .catalog-drawer.is-open {
        visibility: visible;
        pointer-events: auto;
        opacity: 1;
        transition: opacity .28s ease, visibility 0s step-start !important;
    }

    .catalog-drawer__backdrop {
        opacity: 0;
        transition: opacity .32s ease, backdrop-filter .32s ease, -webkit-backdrop-filter .32s ease !important;
    }

    .catalog-drawer.is-open .catalog-drawer__backdrop {
        opacity: 1;
    }

    .catalog-drawer__panel {
        opacity: 0;
        transform: translateX(-22px) scale(.985);
        transform-origin: left center;
        transition:
            transform .36s cubic-bezier(.16, 1, .3, 1),
            opacity .28s ease,
            box-shadow .28s ease !important;
        will-change: transform, opacity;
    }

    .catalog-drawer.is-open .catalog-drawer__panel {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    .catalog-drawer__nav > *,
    .catalog-drawer__socials {
        opacity: 0;
        transform: translateX(-8px);
        transition: opacity .26s ease, transform .32s cubic-bezier(.16, 1, .3, 1) !important;
    }

    .catalog-drawer.is-open .catalog-drawer__nav > *,
    .catalog-drawer.is-open .catalog-drawer__socials {
        opacity: 1;
        transform: translateX(0);
    }

    .catalog-drawer.is-open .catalog-drawer__nav > *:nth-child(1) { transition-delay: .04s !important; }
    .catalog-drawer.is-open .catalog-drawer__nav > *:nth-child(2) { transition-delay: .07s !important; }
    .catalog-drawer.is-open .catalog-drawer__nav > *:nth-child(3) { transition-delay: .10s !important; }
    .catalog-drawer.is-open .catalog-drawer__nav > *:nth-child(4) { transition-delay: .13s !important; }
    .catalog-drawer.is-open .catalog-drawer__nav > *:nth-child(5) { transition-delay: .16s !important; }
    .catalog-drawer.is-open .catalog-drawer__socials { transition-delay: .18s !important; }

    .mobile-menu__backdrop {
        transition: opacity .30s ease, backdrop-filter .30s ease, -webkit-backdrop-filter .30s ease !important;
    }

    .mobile-menu__panel {
        transition:
            transform .36s cubic-bezier(.16, 1, .3, 1),
            opacity .28s ease,
            box-shadow .28s ease !important;
        will-change: transform, opacity;
    }

    .mobile-menu__nav > *,
    .mobile-menu__socials,
    .mobile-menu__support,
    .mobile-menu__cta {
        opacity: 0;
        transform: translateY(8px);
        transition: opacity .24s ease, transform .30s cubic-bezier(.16, 1, .3, 1) !important;
    }

    .mobile-menu.is-open .mobile-menu__nav > *,
    .mobile-menu.is-open .mobile-menu__socials,
    .mobile-menu.is-open .mobile-menu__support,
    .mobile-menu.is-open .mobile-menu__cta {
        opacity: 1;
        transform: translateY(0);
    }

    .mobile-menu.is-open .mobile-menu__nav > *:nth-child(1) { transition-delay: .04s !important; }
    .mobile-menu.is-open .mobile-menu__nav > *:nth-child(2) { transition-delay: .07s !important; }
    .mobile-menu.is-open .mobile-menu__nav > *:nth-child(3) { transition-delay: .10s !important; }
    .mobile-menu.is-open .mobile-menu__socials { transition-delay: .14s !important; }
    .mobile-menu.is-open .mobile-menu__support { transition-delay: .17s !important; }
    .mobile-menu.is-open .mobile-menu__cta { transition-delay: .20s !important; }
}

.catalog-drawer__close {
    display: inline-grid !important;
    place-items: center !important;
    border: 1px solid rgba(148, 163, 184, .22) !important;
    background: rgba(15, 23, 42, .92) !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease !important;
}

.catalog-drawer__close:hover {
    transform: translateY(-1px) scale(1.03);
    background: rgba(30, 41, 59, .96) !important;
    border-color: rgba(191, 219, 254, .32) !important;
}

.catalog-drawer__close:active {
    transform: translateY(0) scale(.98);
}

.catalog-drawer__close img {
    width: 16px !important;
    height: 16px !important;
    filter: brightness(0) invert(1) !important;
    opacity: .9 !important;
}

:root[data-theme="dark"] .catalog-drawer__close,
body[data-theme="dark"] .catalog-drawer__close {
    background: rgba(15, 23, 42, .95) !important;
    border-color: rgba(147, 197, 253, .26) !important;
    color: #f8fafc !important;
}

:root[data-theme="dark"] .catalog-drawer__close:hover,
body[data-theme="dark"] .catalog-drawer__close:hover {
    background: rgba(30, 41, 59, .98) !important;
    border-color: rgba(147, 197, 253, .42) !important;
}

@media (max-width: 767px) {
    .catalog-drawer__backdrop {
        background: rgba(7, 12, 22, .54) !important;
        -webkit-backdrop-filter: blur(8px) saturate(1.04) !important;
        backdrop-filter: blur(8px) saturate(1.04) !important;
    }

    .catalog-drawer__panel {
        background: linear-gradient(180deg, rgba(8, 15, 29, .98), rgba(12, 22, 40, .98)) !important;
        border-right: 1px solid rgba(147, 197, 253, .18) !important;
        box-shadow: 22px 0 58px rgba(0, 0, 0, .48) !important;
    }

    .catalog-drawer__nav h2,
    .catalog-drawer__nav a b,
    .catalog-drawer__group > summary b {
        color: #eef4ff !important;
    }

    .catalog-drawer__nav a,
    .catalog-drawer__group > summary,
    .catalog-drawer__series > summary,
    .catalog-drawer__series a {
        color: #eef4ff !important;
    }

    .catalog-drawer__nav a:hover,
    .catalog-drawer__group > summary:hover,
    .catalog-drawer__series > summary:hover,
    .catalog-drawer__series a:hover {
        background: rgba(59, 115, 255, .14) !important;
    }

    .catalog-drawer__all-link {
        background: rgba(59, 115, 255, .28) !important;
        color: #f8fbff !important;
    }

    .catalog-drawer__series a {
        color: #cbd7ed !important;
    }

    .catalog-drawer__nav a em,
    .catalog-drawer__group > summary em,
    .catalog-drawer__series > summary img {
        opacity: .78 !important;
        filter: brightness(0) invert(1) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-drawer,
    .catalog-drawer *,
    .mobile-menu,
    .mobile-menu *,
    .header-category-nav a,
    .header-social-link,
    .icon-button,
    .button,
    .product-card,
    .products article,
    .category-card {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}