/* Catalog toolbar and native WooCommerce Product Filters enhancement. */
.woocommerce .woocommerce-ordering .orderby {
    min-height: 44px;
    padding: 8px 34px 8px 12px;
    color: var(--lemont-text);
    background-color: #fff;
    border: 1px solid var(--lemont-border);
    border-radius: 4px;
    font: inherit;
}

/* WooCommerce renders two native range inputs above its own .range-bar.
 * Kadence's generic input styling was painting those inputs white with a
 * border, which made the price track appear doubled and offset the handles. */
.wc-block-product-filter-price-slider__range input[type='range'] {
    -webkit-appearance: none !important;
    appearance: none !important;
    position: absolute !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    cursor: pointer;
}
.wc-block-product-filter-price-slider__range input[type='range']::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: transparent;
    border: 0;
}
.wc-block-product-filter-price-slider__range input[type='range']::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 30px;
    height: 30px;
    margin-top: -13px;
    background: #fffdf9;
    border: 3px solid #2b211c;
    border-radius: 50%;
    box-shadow: none;
}
.wc-block-product-filter-price-slider__range input[type='range']::-moz-range-track {
    height: 4px;
    background: transparent;
    border: 0;
}
.wc-block-product-filter-price-slider__range input[type='range']::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #fffdf9;
    border: 3px solid #2b211c;
    border-radius: 50%;
    box-shadow: none;
}

/* Every catalog sidebar (shop, product category AND product tag / "bộ sưu tập",
 * search results) has a legacy Kadence rule that targets every widget input
 * with !important, repainting the range inputs white with a border so the track
 * looks doubled and the handles offset. Scope the reset to body.woocommerce —
 * present on all those archives — not just body.woocommerce-shop, so category
 * and tag pages get the same transparent interaction layer over .range-bar. */
body.woocommerce .wc-block-product-filter-price-slider__range input[type='range'].min,
body.woocommerce .wc-block-product-filter-price-slider__range input[type='range'].max {
    background-color: transparent !important;
    background-image: none !important;
    border-color: transparent !important;
    border-width: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

body.woocommerce .wc-block-product-filter-price-slider__range input[type='range']::-webkit-slider-runnable-track {
    background-color: transparent !important;
    background-image: none !important;
    border: 0 !important;
}

@media (max-width: 600px) {
.wc-block-product-filters {
    display: block;
    margin: 0 0 16px;
}
    .wc-block-product-filters .wc-block-product-filters__open-overlay {
        display: flex;
        width: 100%;
        min-height: 48px;
        padding: 0 16px;
        color: var(--lemont-text);
        border: 1px solid var(--lemont-border);
        border-radius: 0;
        font: inherit;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: .07em;
        text-transform: uppercase;
        justify-content: space-between;
    }
    .wc-block-product-filters .wc-block-product-filters__open-overlay::after {
        content: '+';
        font-size: 24px;
        font-weight: 400;
        line-height: 1;
    }
    .wc-block-product-filters.is-overlay-opened .wc-block-product-filters__overlay {
        z-index: 10060;
    }
    .wc-block-product-filters .wc-block-product-filters__overlay-dialog {
        max-height: 88dvh;
        border-radius: 20px 20px 0 0;
    }
    .wc-block-product-filters .wc-block-product-filters__overlay-header {
        min-height: 58px;
        padding: 0 16px;
        border-bottom: 1px solid var(--lemont-border);
    }
    .wc-block-product-filters .wc-block-product-filters__close-overlay {
        min-width: 44px;
        min-height: 44px;
        margin-left: auto;
    }
    .wc-block-product-filters .wc-block-product-filters__overlay-content {
        padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
    }
    .wc-block-product-filters .wc-block-product-filters__overlay-footer {
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        border-top: 1px solid var(--lemont-border);
    }
    .woocommerce .woocommerce-ordering,
    .woocommerce .woocommerce-result-count {
        float: none;
        width: 100%;
        margin: 0 0 12px;
    }
    .woocommerce .woocommerce-ordering .orderby {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wc-block-product-filters .wc-block-product-filters__overlay-dialog {
        transition: none !important;
    }
}
