/* Storefront Catalog V2 — viewport-aware mobile filter sizing. */
@media (max-width: 1023px) {
    .sf-catalog__filters {
        background:
            radial-gradient(circle at 82% 8%, color-mix(in srgb, var(--brand-700) 12%, transparent), transparent 18rem),
            rgba(2, 6, 23, .62) !important;
        backdrop-filter: blur(6px) saturate(.82) !important;
    }

    .sf-catalog__filter-sheet {
        height: min(96dvh, 58rem) !important;
        max-height: calc(100dvh - max(12px, env(safe-area-inset-top))) !important;
    }

    .sf-catalog__filter-sheet > form {
        min-height: 0 !important;
        flex: 1 1 auto !important;
    }

    .sf-catalog__category-picker .sf-catalog__choices {
        max-height: clamp(12rem, 31dvh, 21rem) !important;
    }
}

@media (max-width: 640px) {
    .sf-catalog__filter-sheet {
        height: calc(100dvh - max(10px, env(safe-area-inset-top))) !important;
        max-height: calc(100dvh - max(10px, env(safe-area-inset-top))) !important;
        border-radius: 24px 24px 0 0 !important;
    }

    .sf-catalog__sheet-handle {
        margin-top: .45rem !important;
    }

    .sf-catalog__category-picker .sf-catalog__choices {
        max-height: clamp(11rem, 30dvh, 19rem) !important;
    }
}

@media (max-height: 680px) and (max-width: 1023px) {
    .sf-catalog__filter-sheet {
        height: calc(100dvh - max(6px, env(safe-area-inset-top))) !important;
        max-height: calc(100dvh - max(6px, env(safe-area-inset-top))) !important;
    }

    .sf-catalog__filters-head {
        min-height: 58px !important;
        padding-block: .55rem !important;
    }

    .sf-catalog__filter-sheet > form {
        padding-top: .65rem !important;
    }

    .sf-catalog__filter-card {
        margin-bottom: .6rem !important;
        padding: .7rem !important;
    }

    .sf-catalog__category-picker .sf-catalog__choices {
        max-height: 26dvh !important;
    }
}
