/* ==========================================================================
   Bulkysoft Product Filters
   ========================================================================== */

/* --- Wrapper --- */
.bpf-filters-wrap {
    position: relative;
    font-family: "neue-haas-grotesk-display", Sans-serif;
    color: var(--e-global-color-31767f4, #333);
    line-height: 1.4em;
}

.bpf-filters-wrap.bpf-loading .bpf-sidebar {
    opacity: 0.5;
    pointer-events: none;
}

.bpf-filters-wrap.bpf-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #ddd;
    border-top-color: var(--e-global-color-31767f4, #333);
    border-radius: 50%;
    animation: bpf-spin 0.6s linear infinite;
    z-index: 10;
}

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

/* --- Sidebar --- */
.bpf-sidebar {
    padding: 0;
}

.bpf-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.bpf-sidebar-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.bpf-reset {
    font-size: 14px;
    color: #888;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.bpf-reset:hover {
    color: var(--e-global-color-31767f4, #333);
}

/* --- Search input --- */
.bpf-search-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    font-family: "neue-haas-grotesk-display", Sans-serif;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    color: var(--e-global-color-31767f4, #333);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.bpf-search-input:focus {
    outline: none;
    border-color: #666;
}

.bpf-search-input::placeholder {
    color: #999;
}

/* --- Filter groups --- */
.bpf-filter-group {
    margin-bottom: 16px;
}

.bpf-filter-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.bpf-filter-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    font-family: "neue-haas-grotesk-display", Sans-serif;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    color: var(--e-global-color-31767f4, #333);
    appearance: auto;
    cursor: pointer;
    transition: border-color 0.2s;
}

.bpf-filter-select:focus {
    outline: none;
    border-color: #666;
}

.bpf-filter-select:hover {
    border-color: #999;
}

/* --- Actions --- */
.bpf-filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.bpf-reset-bottom {
    font-size: 14px;
}

/* --- Results count --- */
.bpf-results-count {
    margin-top: 14px;
    font-size: 14px;
    opacity: 0.7;
    text-align: center;
}

.bpf-total-count {
    font-weight: 600;
    opacity: 1;
}

/* --- Mobile toggle --- */
.bpf-sidebar-toggle {
    display: none;
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 600;
    font-family: "neue-haas-grotesk-display", Sans-serif;
    text-align: left;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 10px;
    color: var(--e-global-color-31767f4, #333);
}

.bpf-sidebar-toggle .bpf-toggle-icon {
    margin-right: 8px;
}

.bpf-sidebar-toggle .bpf-total-badge {
    float: right;
    background: var(--e-global-color-31767f4, #333);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

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

.bpf-pagination ul {
    display: inline-flex;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.bpf-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    font-size: 14px;
    text-decoration: none;
    color: var(--e-global-color-31767f4, #333);
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.bpf-pagination .page-numbers:hover {
    background-color: #f0f0f0;
}

.bpf-pagination .page-numbers.current {
    background-color: var(--e-global-color-31767f4, #333);
    color: #fff;
    border-color: var(--e-global-color-31767f4, #333);
}

/* --- Mobile responsive --- */
@media (max-width: 768px) {
    .bpf-sidebar-toggle {
        display: block;
    }

    .bpf-sidebar {
        display: none;
        padding: 16px;
        border: 1px solid #ddd;
        border-radius: 4px;
        background: #fff;
    }

    .bpf-sidebar.bpf-sidebar-open {
        display: block;
    }
}
