/**
 * WCFM Store Filters
 */

/* ===== Widget ===== */
.wcsf-widget {
    margin-bottom: 20px;
}

.wcsf-widget form {
    margin: 0;
    padding: 0;
}

/* Headings */
.wcsf-heading {
    padding: 8px 0 4px;
    margin-bottom: 6px;
    border-bottom: 1px solid #eee;
}

.wcsf-heading h4 {
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 700;
    color: #222;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wcsf-section {
    padding: 6px 0 14px;
}

/* ===== CATEGORIES ===== */

.wcsf-cat-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wcsf-cat-tree li {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

/* Label */
.wcsf-cat-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Checkbox */
.wcsf-check {
    width: 15px;
    height: 15px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #2271b1;
}

/* Name */
.wcsf-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Count */
.wcsf-count {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
    margin-left: auto;
}

/* Empty */
.wcsf-empty {
    font-size: 13px;
    color: #999;
    font-style: italic;
    margin: 4px 0;
}

/* ===== PRICE SLIDER ===== */

.wcsf-slider {
    margin: 12px 8px 18px;
    height: 6px;
    background: #e0e0e0;
    border: none;
    border-radius: 3px;
}

.wcsf-slider .ui-slider-range {
    background: #2271b1;
    border-radius: 3px;
}

.wcsf-slider .ui-slider-handle {
    width: 18px;
    height: 18px;
    top: -6px;
    margin-left: -9px;
    border-radius: 50%;
    border: 2px solid #2271b1;
    background: #fff;
    cursor: grab;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    outline: none;
}

.wcsf-slider .ui-slider-handle:hover {
    box-shadow: 0 1px 6px rgba(34,113,177,0.35);
}

.wcsf-slider .ui-slider-handle:active {
    cursor: grabbing;
}

/* Price inputs */
.wcsf-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wcsf-currency {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.wcsf-price-input {
    width: 72px;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    color: #333;
    -moz-appearance: textfield;
}

.wcsf-price-input::-webkit-outer-spin-button,
.wcsf-price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wcsf-price-input:focus {
    border-color: #2271b1;
    outline: none;
}

.wcsf-sep {
    color: #999;
}

/* ===== SORT SELECT ===== */

.wcsf-sort-select {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.wcsf-sort-select:focus {
    border-color: #2271b1;
}

/* ===== ACTIONS ===== */

.wcsf-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 6px;
}

.wcsf-apply-btn {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #2271b1;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.wcsf-apply-btn:hover {
    background: #135e96;
}

.wcsf-apply-btn:active {
    background: #0e4b78;
}

.wcsf-clear-link {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #888;
    text-decoration: none;
}

.wcsf-clear-link:hover {
    color: #c0392b;
    text-decoration: underline;
}

/* ===== AJAX: Loading overlay ===== */

.wcsf-products-wrap {
    position: relative;
    min-height: 100px;
}

.wcsf-loading-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
}

.wcsf-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: wcsf-spin 0.7s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -18px 0 0 -18px;
}

@keyframes wcsf-spin {
    to { transform: rotate(360deg); }
}

/* No products message */
.wcsf-no-products {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 10px 0;
}

/* AJAX pagination */
.wcsf-pagination {
    margin-top: 20px;
    text-align: center;
}

.wcsf-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.wcsf-pagination .page-numbers:hover {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.wcsf-pagination .page-numbers.current {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* ===== Mobile ===== */
@media screen and (max-width: 768px) {
    .wcsf-price-input {
        width: 60px;
    }
}
