/* Contenedor General del Panel de Filtros */
.fp-sidebar-container {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1e293b;
    max-width: 320px;
    width: 100%;
    box-sizing: border-box;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

/* Cabecera del Panel */
.fp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.fp-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.fp-clear-btn {
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s ease;
}

.fp-clear-btn:hover {
    color: #0f172a;
    background: #f8fafc;
    border-color: #94a3b8;
}

/* Bloques de Filtro */
.fp-filter-block {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.fp-filter-block:last-of-type {
    border-bottom: none;
    margin-bottom: 10px;
}

.fp-filter-block h3 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 12px 0;
}

/* 0. Buscador */
.fp-search-block {
    padding-bottom: 15px;
}

.fp-search-input-wrapper {
    position: relative;
}

#fp-search-input {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #334155;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#fp-search-input:focus {
    border-color: #64748b;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.1);
}

#fp-search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

#fp-search-btn:hover {
    color: #0f172a;
}

/* Dropdowns / Selects */
.fp-select-wrapper {
    position: relative;
    width: 100%;
}

.fp-select {
    width: 100%;
    padding: 10px 35px 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #334155;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.fp-select:focus {
    border-color: #64748b;
}

/* Checkboxes List */
.fp-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.fp-checkbox-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
    user-select: none;
    width: 100%;
}

.fp-checkbox-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    margin-right: 12px;
    outline: none;
    cursor: pointer;
    display: grid;
    place-content: center;
    background-color: #fff;
    flex-shrink: 0;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.fp-checkbox-label input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-color: #fff;
    clip-path: polygon(14% 44%, 0 58%, 38% 96%, 100% 19%, 85% 5%, 38% 70%);
}

.fp-checkbox-label input[type="checkbox"]:checked {
    border-color: #0f172a;
    background-color: #0f172a;
}

.fp-checkbox-label input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.fp-checkbox-text {
    flex-grow: 1;
}

.fp-count {
    color: #94a3b8;
    margin-left: 5px;
    font-size: 13px;
}

/* Ver más button */
.fp-toggle-more-btn {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: #64748b;
    text-decoration: underline;
}

.fp-toggle-more-btn:hover {
    color: #0f172a;
}

/* 2. Slider de Precio */
.fp-slider-container {
    padding: 10px 4px 15px 4px;
}

.fp-precio-block #fp-price-slider.ui-slider-horizontal {
    height: 4px;
    background: #e2e8f0;
    border: none;
    border-radius: 2px;
    position: relative;
}

.fp-precio-block #fp-price-slider .ui-slider-range {
    background: #0f172a;
    position: absolute;
    height: 100%;
}

.fp-precio-block #fp-price-slider .ui-slider-handle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #0f172a;
    background: #fff;
    top: -6px;
    outline: none;
    cursor: pointer;
    position: absolute;
    margin-left: -8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s ease;
}

.fp-precio-block #fp-price-slider .ui-slider-handle:hover {
    transform: scale(1.1);
}

.fp-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

/* 5. Superficie */
.fp-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.fp-range-input {
    width: 45%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    color: #334155;
    outline: none;
    box-sizing: border-box;
    text-align: center;
}

.fp-range-input:focus {
    border-color: #64748b;
}

.fp-range-separator {
    font-size: 13px;
    color: #94a3b8;
    width: 10%;
    text-align: center;
}

/* 6. Bloque Submit botón */
.fp-submit-block {
    margin-top: 25px;
}

.fp-submit-button {
    width: 100%;
    padding: 14px 20px;
    background: #1e293b;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: block;
}

.fp-submit-button:hover {
    background: #0f172a;
}

.fp-submit-button:active {
    transform: scale(0.99);
}

/* Estilos de Carga / AJAX */
.fp-submit-button.loading {
    background: #64748b;
    cursor: not-allowed;
}

/* Expandable list logic when collapsed */
.fp-expandable-list.collapsed > label:nth-child(n+6) {
    display: none !important;
}

/* Grid de Propiedades Elementor integration styles */
.fp-grid-container {
    display: grid;
    gap: 20px;
}

.fp-grid-item {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fp-no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 16px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}

.fp-load-more-btn:hover {
    background-color: #0f172a !important;
}

/* Responsive */
@media (max-width: 768px) {
    .fp-sidebar-container {
        max-width: 100%;
    }
}
