/* ===== Filter panel ===== */

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

.filters-panel {
    background: #fff;
    border: 1px solid #ebebf0;
    border-radius: 14px;
    padding: 16px 26px;
    box-shadow: 0 1px 2px rgba(20, 20, 40, .03), 0 4px 12px rgba(20, 20, 40, .04);
    transition: padding .2s ease;
}
.filters-panel:not(.is-collapsed) {
    padding: 22px 26px;
}

.filters-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.filters-panel-toggle {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #17171f;
    line-height: 1;
}
.filters-panel-toggle:focus {
    outline: none;
}
.filters-panel-toggle:hover .filters-panel-title {
    color: #530aa4;
}
.filters-panel-toggle:hover .filters-panel-chevron {
    color: #530aa4;
}

.filters-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #17171f;
    margin: 0;
    letter-spacing: -.01em;
    transition: color .12s;
}

.filters-panel-chevron {
    width: 16px;
    height: 16px;
    color: #8a8a96;
    transition: transform .2s ease, color .12s;
}
.filters-panel.is-collapsed .filters-panel-chevron {
    transform: rotate(-90deg);
}

.filters-panel-reset {
    font-size: 13px;
    color: #6b6b78;
    text-decoration: none;
    transition: color .12s;
}
.filters-panel-reset:hover {
    color: #530aa4;
    text-decoration: none;
}

.filters-panel-body {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #f1f1f5;
    overflow: hidden;
}
.filters-panel.is-collapsed .filters-panel-body {
    display: none;
}

.filters-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 768px) {
    .filters-grid {
        grid-template-columns: minmax(260px, 360px) 1fr;
        gap: 48px;
    }
}

.filter-section {
    padding: 0;
    min-width: 0;
}

.filter-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #17171f;
    margin-bottom: 14px;
    letter-spacing: 0;
    text-transform: none;
}

/* --- Price display --- */
.price-display {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 14px;
}

.price-display-val {
    font-size: 14px;
    font-weight: 600;
    color: #17171f;
    background: #f6f4fb;
    border: 1px solid #e7e1f3;
    border-radius: 8px;
    padding: 6px 12px;
    min-width: 72px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.price-display-sep {
    color: #c4c4cc;
    font-size: 14px;
    flex-shrink: 0;
    line-height: 1;
}

/* --- Dual range slider --- */
.rs-wrap {
    position: relative;
    height: 28px;
    margin: 4px 9px 0;
    box-sizing: border-box;
}

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

.rs-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: #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;
}

/* Chrome / Safari / Edge Chromium */
.rs-thumb::-webkit-slider-runnable-track {
    height: 28px;
    background: transparent;
    border: none;
}

.rs-thumb::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #530aa4;
    box-shadow: 0 1px 3px rgba(20, 20, 40, .12), 0 1px 2px rgba(20, 20, 40, .06);
    margin-top: 5px; /* (28 - 18) / 2 = 5 */
    pointer-events: all;
    cursor: grab;
    transition: transform .12s ease, box-shadow .15s ease;
}

.rs-thumb::-webkit-slider-thumb:hover {
    transform: scale(1.12);
    box-shadow: 0 2px 8px rgba(83, 10, 164, .28);
}

/* Firefox */
.rs-thumb::-moz-range-track {
    background: transparent;
    border: none;
    height: 0;
}

.rs-thumb::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #530aa4;
    box-shadow: 0 1px 3px rgba(20, 20, 40, .12);
    pointer-events: all;
    cursor: grab;
    transition: transform .12s ease;
}

.rs-thumb::-moz-range-thumb:hover {
    transform: scale(1.12);
}

.rs-thumb::-moz-range-progress {
    background: transparent;
}

.rs-thumb:focus {
    outline: none;
}

/* Min/max labels */
.range-min-max-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 11px;
    color: #9a9aa8;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* --- Eshop filter --- */
.eshop-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding: 2px 4px 2px 0;
}

.eshop-filter-list::-webkit-scrollbar {
    width: 6px;
}
.eshop-filter-list::-webkit-scrollbar-thumb {
    background: #d8d8e0;
    border-radius: 3px;
}
.eshop-filter-list::-webkit-scrollbar-track {
    background: transparent;
}

.eshop-filter-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1px solid #e2e2ea;
    border-radius: 999px;
    padding: 5px 12px 5px 10px;
    cursor: pointer;
    transition: border-color .12s, background .12s, color .12s, box-shadow .12s;
    user-select: none;
    margin: 0;
    line-height: 1;
}

.eshop-filter-item:hover {
    border-color: #b79de8;
    background: #faf7ff;
}

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

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

.eshop-filter-item .eshop-count {
    font-size: 11px;
    color: #9a9aa8;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.eshop-filter-item:has(input:checked) {
    border-color: #530aa4;
    background: #530aa4;
    box-shadow: 0 1px 3px 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: rgba(255, 255, 255, .75);
}

.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: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f1f1f5;
}

.btn-filter-apply {
    background: #530aa4;
    color: #fff;
    border: 1px solid #530aa4;
    border-radius: 9px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s, border-color .12s, transform .08s, box-shadow .12s;
    line-height: 1.2;
}

.btn-filter-apply:hover {
    background: #420885;
    border-color: #420885;
    box-shadow: 0 2px 8px rgba(83, 10, 164, .25);
}

.btn-filter-apply:active {
    transform: translateY(1px);
    box-shadow: none;
}

@media (max-width: 575.98px) {
    .filters-panel { padding: 18px; border-radius: 12px; }
    .filters-actions { flex-direction: column-reverse; align-items: stretch; }
    .btn-filter-apply { width: 100%; }
}
