.vmcf-filter {
    display: grid;
    gap: 6px;
    font-size: 14px;
}

.vmcf-filter h3 {
    font-size: 16px;
    margin: 0;
}

.vmcf-filter__search {
    display: grid;
    gap: 5px;
    font-weight: 700;
}

.vmcf-filter__search input {
    width: 100%;
    min-height: 38px;
    border: 1px solid #c9d1db;
    border-radius: 4px;
    padding: 7px 9px;
    font: inherit;
    font-weight: 400;
}

.vmcf-filter__group {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border: 0;
    padding: 0;
    margin: 0;
}

.vmcf-filter__group legend {
    font-size: 0.8rem;
    float: none;
    box-sizing: border-box;
    width: 100%;
    border-top: 1px solid #d8dde3;
    font-weight: 600;
    padding: 4px 8px 0 0;
    margin: 0 0 0 0;
}

.vmcf-filter__merged-pill {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
    border: 1px solid #c9d1db;
    border-radius: 999px;
    background: #f2f4f7;
    color: #667085;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    vertical-align: 2px;
}

.vmcf-filter__option {
    display: grid;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
    min-height: 28px;
}

.vmcf-filter__option > span:not(.vmcf-filter__count) {
    min-width: 0;
    overflow-wrap: anywhere;
}

.vmcf-filter__count {
    color: #667085;
    font-size: 12px;
}

.vmcf-filter__price-values {
    display: flex;
    justify-content: space-between;
    margin: 5px 0 2px;
    font-weight: 700;
}

.vmcf-filter__price-slider {
    position: relative;
    /* The transformed handles create stacking contexts. Keep the full range
       control in the page layer so an open mega-menu always covers it. */
    z-index: 0;
    isolation: isolate;
    height: 24px;
    margin: 7px 10px 3px;
    touch-action: none;
    user-select: none;
}

.vmcf-filter__price-track,
.vmcf-filter__price-fill {
    position: absolute;
    top: 50%;
    height: 3px;
    transform: translateY(-50%);
    border-radius: 999px;
}

.vmcf-filter__price-track { right: 0; left: 0; background: #e7e9ed; }
.vmcf-filter__price-fill { background: #e98315; }

.vmcf-filter__price-handle {
    position: absolute;
    z-index: 1;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    border: 3px solid #e98315;
    border-radius: 50%;
    background: #fff;
    cursor: grab;
    touch-action: none;
}

.vmcf-filter__price-handle:focus-visible {
    outline: 3px solid rgba(233, 131, 21, .35);
    outline-offset: 3px;
}

.vmcf-filter__price-handle:active { cursor: grabbing; }

.vmcf-filter__clear,
.vmcf-page {
    border: 1px solid #c9d1db;
    background: #fff;
    border-radius: 4px;
    padding: 6px 9px;
}

.vmcf-page.is-active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.vmcf-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.vmcf-filter.is-loading {
    opacity: .65;
    pointer-events: none;
}

.ndcc-category-filter-panel--mobile .offcanvas-body,
.ndcc-category-filter-panel--mobile .vmcf-filter {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
}

.ndcc-category-filter-panel--mobile .vmcf-filter__search,
.ndcc-category-filter-panel--mobile .vmcf-filter__group,
.ndcc-category-filter-panel--mobile .vmcf-filter__option {
    width: 100%;
}

.ndcc-category-filter-panel--mobile .vmcf-filter__option {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) max-content;
    column-gap: 8px;
}

.ndcc-category-filter-panel--mobile .vmcf-filter__option > input[type="checkbox"] {
    display: block !important;
    position: static !important;
    float: none !important;
    box-sizing: border-box;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    margin: 0 !important;
    transform: none !important;
}

/* The category override uses Bootstrap's responsive offcanvas as its desktop
   sidebar shell.  On desktop it must fill the entire Bootstrap column. */
@media (min-width: 576px) {
    .ndcc-category-filter-panel--mobile {
        display: none !important;
    }

    .ndcc-category-filter-panel,
    .ndcc-category-filter-panel > .offcanvas-body {
        box-sizing: border-box;
        display: block !important;
        flex-grow: 1 !important;
        width: 100% !important;
        max-width: none;
    }

    /* The site bundle contains legacy form rules from older VirtueMart views.
       Keep the desktop facet rows self-contained so those rules cannot hide
       the native checkbox or collapse the option text to its minimum width. */
    .ndcc-category-catalog__filters .vmcf-filter__option {
        display: flex !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 32px;
        gap: 8px;
        align-items: center;
    }

    .ndcc-category-catalog__filters .vmcf-filter__option > input[type="checkbox"] {
        position: static !important;
        display: block !important;
        visibility: visible !important;
        flex: 0 0 18px;
        width: 18px !important;
        height: 18px !important;
        min-width: 18px;
        margin: 0 !important;
        opacity: 1 !important;
        transform: none !important;
        appearance: auto;
    }

    .ndcc-category-catalog__filters .vmcf-filter__option > span:not(.vmcf-filter__count) {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
        overflow-wrap: normal;
        word-break: normal;
    }

    .ndcc-category-catalog__filters .vmcf-filter__count {
        flex: 0 0 auto;
        margin-left: auto;
        font-variant-numeric: tabular-nums;
    }
}
