/* ============================================
   Custom WooCommerce Filters — filters.css
   ============================================ */

.cwf-filter { margin-bottom: 1.5em; }

/* ---- Term lists ---- */
.cwf-term-list { list-style: none; margin: 0; padding: 0; }

.cwf-term-list.cwf-children {
    padding-left: 1.2em;
    border-left: 2px solid #e0e0e0;
    margin-top: 0;
    margin-left: 6px;
}

.cwf-term-item {
    padding: 3px 0;
    position: relative;
    display: block;
}

/* ---- Category navigation links ---- */
.cwf-cat-link {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.9em;
    line-height: 1.4;
    text-decoration: none;
    color: inherit;
    padding: 1px 0;
}

.cwf-cat-link:hover .cwf-term-name {
    text-decoration: underline;
}

.cwf-cat-link--active {
    font-weight: 700;
    color: #2c5f8a;
}

.cwf-cat-link--active .cwf-term-name {
    color: #2c5f8a;
}

/* ---- Attribute checkboxes ---- */
.cwf-term-item label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 0.9em;
    line-height: 1.4;
}

.cwf-term-item label:hover .cwf-term-name { text-decoration: underline; }

.cwf-checkbox {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #2c5f8a;
}

.cwf-term-name { flex: 1; }
.cwf-term-count { color: #999; font-size: 0.85em; }

/* ---- Unavailable terms ---- */
.cwf-term-item.cwf-unavailable { opacity: 0.35; pointer-events: none; }
.cwf-term-item.cwf-unavailable label { cursor: default; }
.cwf-term-item.cwf-unavailable:has(input:checked) { opacity: 1; pointer-events: auto; }
.cwf-term-item.cwf-unavailable:has(input:checked) label { cursor: pointer; }

/* ---- Elementor overflow fixes ---- */
.widget.widget_cwf_category_filter,
.elementor-widget-sidebar .widget_cwf_category_filter,
.elementor-widget-wrap,
.elementor-widget-container,
.elementor-element {
    overflow: visible !important;
}
.cwf-category-filter, .cwf-filter {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

/* ---- Price filter ---- */
.cwf-price-filter { padding-top: 4px; }

.cwf-price-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 14px;
    color: #333;
}

.cwf-price-sep { color: #aaa; font-weight: normal; }

#cwf-price-slider { margin: 0 6px 10px; }

#cwf-price-slider.ui-slider {
    height: 4px;
    border: none;
    background: #ddd;
    border-radius: 2px;
}

#cwf-price-slider .ui-slider-range { background: #2c5f8a; border-radius: 2px; }

#cwf-price-slider .ui-slider-handle {
    width: 18px;
    height: 18px;
    top: -7px;
    border-radius: 50%;
    background: #2c5f8a;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    cursor: grab;
    outline: none;
}

#cwf-price-slider .ui-slider-handle:active { cursor: grabbing; }
#cwf-price-slider .ui-slider-handle:focus { box-shadow: 0 0 0 3px rgba(44,95,138,0.3); }
