/* ===== Filter panel — v3 ===== */

#filters-wrapper {
    margin: 0 0 2rem;
}

/* ——— Panel ——— */
.filters-panel {
    background: #fff;
    border: 1px solid #e4e4ec;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(20, 20, 43, .04);
    transition: box-shadow .25s ease;
}
.filters-panel:not(.is-collapsed) {
    box-shadow: 0 2px 8px rgba(20, 20, 43, .06), 0 0 0 1px rgba(83, 10, 164, .06);
}

/* ——— Header ——— */
.filters-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 22px;
    cursor: pointer;
    user-select: none;
    border-radius: 12px;
    transition: background .15s;
}
.filters-panel-header:hover {
    background: #faf8fd;
}

.filters-panel-toggle {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #1d1d2b;
    line-height: 1;
}
.filters-panel-toggle:focus {
    outline: none;
}

.filters-panel-title {
    font-size: 15px;
    font-weight: 700;
    color: #1d1d2b;
    margin: 0;
    letter-spacing: .01em;
    text-transform: uppercase;
    transition: color .15s;
}
.filters-panel-header:hover .filters-panel-title {
    color: #530aa4;
}

.filters-panel-chevron {
    width: 18px;
    height: 18px;
    color: #530aa4;
    transition: transform .25s cubic-bezier(.4, 0, .2, 1);
    flex-shrink: 0;
}
.filters-panel.is-collapsed .filters-panel-chevron {
    transform: rotate(-90deg);
}

/* Right side */
.filters-panel-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filters-active-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #530aa4;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.filters-panel-reset {
    font-size: 13px;
    font-weight: 500;
    color: #8a8a9a;
    text-decoration: none;
    transition: color .15s;
    white-space: nowrap;
}
.filters-panel-reset:hover {
    color: #530aa4;
    text-decoration: none;
}

/* ——— Body ——— */
.filters-panel-body {
    padding: 0 22px 20px;
    overflow: hidden;
}
.filters-panel.is-collapsed .filters-panel-body {
    display: none;
}

.filters-panel-body-inner {
    padding-top: 18px;
    border-top: 1px solid #ededf2;
}

/* ——— Sections (stacked, full width) ——— */
.filter-section {
    padding: 0;
    min-width: 0;
}
.filter-section + .filter-section {
    margin-top: 24px;
}

.filter-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #8a8a9a;
    margin-bottom: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ——— Price display (centered, masked inputs) ——— */
.price-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px;
}

.price-display-group {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
}

#price-max-input{
    text-align: left !important ;
}
.price-display-input {
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d2b;
    background: transparent;
    border: none;
    border-bottom: 1.5px solid transparent;
    outline: none;
    text-align: right;
    width: 52px;
    padding: 0 0 1px;
    margin: 0;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    transition: border-color .15s, color .15s;
    -moz-appearance: textfield;
}
.price-display-input::-webkit-outer-spin-button,
.price-display-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.price-display-input:hover {
    border-bottom-color: #d0d0da;
}
.price-display-input:focus {
    color: #530aa4;
    border-bottom-color: #530aa4;
}

.price-display-unit {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d2b;
    pointer-events: none;
    line-height: 1;
}

.price-display-sep {
    color: #c0c0cc;
    font-size: 15px;
    flex-shrink: 0;
    line-height: 1;
    padding: 0 2px;
}

/* ——— Dual range slider (full width) ——— */
.rs-wrap {
    position: relative;
    height: 28px;
    margin: 4px 9px 0;
}

.rs-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    margin-top: -2px;
    background: #e8e8ee;
    border-radius: 2px;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.rs-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #7b2fce, #530aa4);
    pointer-events: none;
}

.rs-clickzone {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 20px;
    margin-top: -10px;
    z-index: 1;
    cursor: pointer;
}

.rs-thumb {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    z-index: 2;
}

.rs-thumb::-webkit-slider-runnable-track {
    height: 28px;
    background: transparent;
    border: none;
}
.rs-thumb::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid #530aa4;
    box-shadow: 0 1px 4px rgba(20, 20, 43, .14);
    margin-top: 4px;
    pointer-events: all;
    cursor: grab;
    transition: transform .15s ease, box-shadow .15s ease;
}
.rs-thumb::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 10px rgba(83, 10, 164, .3);
}
.rs-thumb::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.05);
}

.rs-thumb::-moz-range-track {
    background: transparent;
    border: none;
    height: 0;
}
.rs-thumb::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid #530aa4;
    box-shadow: 0 1px 4px rgba(20, 20, 43, .14);
    pointer-events: all;
    cursor: grab;
    transition: transform .15s ease;
}
.rs-thumb::-moz-range-thumb:hover {
    transform: scale(1.15);
}
.rs-thumb::-moz-range-progress {
    background: transparent;
}
.rs-thumb:focus {
    outline: none;
}

.range-min-max-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: #a0a0ae;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* ——— Eshop filter ——— */
.eshop-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding: 2px 4px 2px 0;
}
.eshop-filter-list::-webkit-scrollbar {
    width: 5px;
}
.eshop-filter-list::-webkit-scrollbar-thumb {
    background: #d4d4de;
    border-radius: 3px;
}
.eshop-filter-list::-webkit-scrollbar-track {
    background: transparent;
}

.eshop-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #dddde6;
    border-radius: 8px;
    padding: 7px 14px 7px 10px;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
    user-select: none;
    margin: 0;
    line-height: 1;
}
.eshop-filter-item:hover {
    border-color: #b89ee0;
    background: #fcfaff;
    box-shadow: 0 1px 4px rgba(83, 10, 164, .08);
}

.eshop-filter-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #530aa4;
    flex-shrink: 0;
    margin: 0;
    border-radius: 4px;
}

.eshop-filter-item .eshop-name {
    font-size: 13px;
    color: #2d2d3d;
    font-weight: 500;
    line-height: 1.2;
}

.eshop-filter-item .eshop-count {
    font-size: 11px;
    color: #a0a0ae;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    background: #f0f0f5;
    padding: 2px 7px;
    border-radius: 999px;
    line-height: 1.3;
}

/* Checked state */
.eshop-filter-item:has(input:checked) {
    border-color: #530aa4;
    background: #530aa4;
    box-shadow: 0 2px 6px rgba(83, 10, 164, .25);
}
.eshop-filter-item:has(input:checked) .eshop-name {
    color: #fff;
    font-weight: 600;
}
.eshop-filter-item:has(input:checked) .eshop-count {
    color: #fff;
    background: rgba(255, 255, 255, .2);
}
.eshop-filter-item:has(input:checked) input[type="checkbox"] {
    accent-color: #fff;
}

/* ——— Actions ——— */
.filters-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #ededf2;
}

.btn-filter-apply {
    background: #530aa4;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s, box-shadow .15s;
    line-height: 1.3;
    letter-spacing: .01em;
}
.btn-filter-apply:hover {
    background: #420885;
    box-shadow: 0 3px 12px rgba(83, 10, 164, .28);
}
.btn-filter-apply:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* ——— Responsive ——— */
@media (max-width: 575.98px) {
    .filters-panel-header {
        padding: 12px 16px;
    }
    .filters-panel-body {
        padding: 0 16px 16px;
    }
    .filters-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .btn-filter-apply {
        width: 100%;
    }
}
