/**
 * BDV Filtro - Integration Styles
 * Estilos para la integración con BDV Smart Search
 */

/* Panel de filtros en overlay de búsqueda */
.bdv-filtro-search-panel {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.bdv-filtro-search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.bdv-filtro-search-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
}

.bdv-filtro-toggle {
    position: relative;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bdv-filtro-toggle:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.bdv-filtro-toggle.active {
    background: #FF6B35;
    border-color: #FF6B35;
    color: #fff;
}

.bdv-filter-icon {
    font-size: 18px;
}

.bdv-filter-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f44336;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Body del panel */
.bdv-filtro-search-body {
    margin-top: 15px;
}

/* Filtros mínimos */
.bdv-filtro-search-minimal {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bdv-filtro-price-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bdv-filtro-price-range label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    min-width: 50px;
}

.bdv-filtro-price-range input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.bdv-filtro-price-range span {
    color: #999;
}

.bdv-filtro-stock-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.bdv-apply-search-filters {
    width: 100%;
    padding: 10px;
    background: #FF6B35;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bdv-apply-search-filters:hover {
    background: #E55A24;
}

/* Productos filtrados (ocultos) */
.wd-suggestion.bdv-filtered-out {
    display: none !important;
}

/* Indicador de filtros activos en búsqueda */
.bdv-search-filters-active {
    background: #e3f2fd;
    border-left: 3px solid #2196F3;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.bdv-search-filters-active-text {
    font-size: 13px;
    color: #1976D2;
    font-weight: 600;
}

.bdv-clear-search-filters {
    background: transparent;
    border: none;
    color: #1976D2;
    text-decoration: underline;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    margin-left: 10px;
}

/* Animación de filtrado */
@keyframes bdvFilterFade {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

.bdv-filtering {
    animation: bdvFilterFade 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .bdv-filtro-search-panel {
        padding: 12px;
    }
    
    .bdv-filtro-price-range {
        flex-wrap: wrap;
    }
    
    .bdv-filtro-price-range input {
        width: calc(50% - 15px);
    }
}

/* Integración con overlay de Smart Search */
.wd-search-results.wd-opened .bdv-filtro-search-panel {
    margin: 0 0 20px 0;
}

.bdv-column-right .bdv-filtro-search-panel {
    position: sticky;
    top: 80px;
    z-index: 10;
}

