/* ═════════════════════════════════════════════════════════════════════════════
   ESTILOS MEJORADOS PARA FILTROS DE OFERTAS
   ═════════════════════════════════════════════════════════════════════════════
   
   Archivo: assets/css/ofertas-filters-mejorado.css
   Versión: 1.0
   Incluir en: functions.php con wp_enqueue_style()
   
   ═════════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   SECCIÓN DE FILTROS - CONTENEDOR PRINCIPAL
   ───────────────────────────────────────────────────────────────────────────── */

.ofertas-filters {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 30px 20px;
    border-bottom: 2px solid #e8e8e8;
    margin: 30px 0;
}

.filters-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   INPUT DE BÚSQUEDA
   ───────────────────────────────────────────────────────────────────────────── */

.filter-search {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-search:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.filter-search::placeholder {
    color: #999;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CONTENEDOR DE SELECTS Y BOTONES
   ───────────────────────────────────────────────────────────────────────────── */

.filters-compact {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SELECT (DROPDOWN)
   ───────────────────────────────────────────────────────────────────────────── */

.filter-select {
    padding: 11px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background-color: white;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231b4f72' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px 14px;
    padding-right: 42px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-width: 140px;
}

.filter-select:hover {
    border-color: #f39c12;
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.1);
}

.filter-select:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.filter-select option {
    padding: 8px;
    color: #333;
    background: white;
}

/* ─────────────────────────────────────────────────────────────────────────────
   BOTÓN LIMPIAR
   ───────────────────────────────────────────────────────────────────────────── */

.filter-btn-clear {
    padding: 11px 18px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    white-space: nowrap;
}

.filter-btn-clear:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

.filter-btn-clear:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.filter-btn-clear span {
    font-size: 16px;
    font-weight: bold;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CONTADOR DE RESULTADOS
   ───────────────────────────────────────────────────────────────────────────── */

.results-count {
    padding: 15px 0;
    border-top: 2px solid #e8e8e8;
    color: #666;
    font-size: 14px;
    margin-top: 15px;
}

.results-count strong {
    color: #f39c12;
    font-weight: 700;
    font-size: 16px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE - TABLET (768px - 1024px)
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .filter-select {
        min-width: 120px;
        padding: 10px 12px;
        padding-right: 36px;
        font-size: 13px;
    }

    .filter-btn-clear {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE - MOBILE (max-width: 767px)
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .ofertas-filters {
        padding: 20px 15px;
        margin: 20px 0;
    }

    .filter-search {
        padding: 11px 14px;
        font-size: 14px;
        width: 100%;
    }

    .filters-compact {
        gap: 8px;
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
        padding: 11px 14px;
        padding-right: 36px;
        font-size: 13px;
        min-width: unset;
    }

    .filter-btn-clear {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }

    .results-count {
        font-size: 13px;
        padding-top: 12px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   EFECTO DE FOCUS Y ANIMACIONES
   ───────────────────────────────────────────────────────────────────────────── */

.filter-search,
.filter-select {
    position: relative;
}

/* Animación de label flotante (opcional) */
.filter-search:focus + label,
.filter-search:not(:placeholder-shown) + label {
    transform: translateY(-20px) scale(0.8);
}

/* ─────────────────────────────────────────────────────────────────────────────
   ESTADOS ESPECIALES
   ───────────────────────────────────────────────────────────────────────────── */

/* Cuando no hay resultados */
.filters-compact.disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* Estado de carga */
.filter-btn-clear.loading {
    position: relative;
    color: transparent;
}

.filter-btn-clear.loading::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    top: 50%;
    left: 50%;
    margin-left: -7px;
    margin-top: -7px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

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

.no-results {
    display: none !important;
}

/* ═════════════════════════════════════════════════════════════════════════════
   FIN DEL ARCHIVO
   ═════════════════════════════════════════════════════════════════════════════ */