/* ==========================================
   1. ESTILOS GLOBALES Y ESCRITORIO
   ========================================== */

.btn-back-modern {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 14px;
    color: #475569;
}

.price-card-premium {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border-radius: 20px;
}

.sticky-sidebar {
    position: sticky;
    top: 100px;
}

.btn-whatsapp-modern {
    background-color: #22c55e;
    color: white !important;
    border-radius: 10px;
    font-weight: 600;
}

/* Rejilla de Características (Desktop) */
.modern-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.feature-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
}

.feature-box i { font-size: 20px; color: #3b82f6; }
.feature-box span { display: block; font-size: 11px; color: #64748b; text-transform: uppercase; }

/* Filtros - Botón Principal */
.show_filters {
    background: #1e3a8a !important;
    color: #fff !important;
    border-radius: 50px !important;
    padding: 12px 25px !important;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3) !important;
    border: none !important;
    font-size: 14px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.show_filters i { color: #82e0aa; }

/* Botón Filtros ACTIVO (Prioridad Alta) */
.show_filters.btn-active {
    background-color: #f87171 !important; /* Rojo coral moderno */
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.2) !important;
    border: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   2. COMPONENTES DE TARJETA (ELEMENTOS INTERNOS)
   ========================================== */

.casa_info_favorito {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 99;
    background: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin: 0 !important;
}

.commission-badge {
    background-color: #f0f7ff;
    color: #2563eb;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #dbeafe;
    white-space: nowrap;
}

/* Overlay de Sliders (Legibilidad Pro) */
.minimal-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%) !important;
    height: 70% !important;
    top: auto !important;
    bottom: 0 !important;
    position: absolute;
    width: 100%;
}

.minimal-title, .minimal-price {
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5) !important;
}

/* ==========================================
   3. BLOQUE ÚNICO DE MEDIA QUERIES (MÓVIL)
   ========================================== */

@media (max-width: 768px) {

    /* --- Estructura de Tarjeta Principal --- */
    .property-card {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        margin: 10px 15px 25px 15px !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        background: #fff !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    }

    /* Imagen con altura optimizada y Peek Effect */
    .property-image-container {
        width: 100% !important;
        height: 180px !important; /* Altura final acordada */
        overflow: hidden !important;
        position: relative;
    }

    .property-img {
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Columna de Detalles (Compacta) */
    .details-column {
        width: 100% !important;
        padding: 15px !important;
        background-color: #ffffff !important;
        color: #334155 !important;
    }

    /* Ocultar botones (Estrategia Minimalista Final) */
    .action-header-group, 
    .btn-detail-expert, 
    .btn-whatsapp-expert {
        display: none !important;
    }

    /* Tipografía de la Tarjeta */
    .title-link-main, .property-title a {
        font-size: 19px !important;
        color: #1e293b !important;
        font-weight: 800 !important;
        text-decoration: none !important;
        line-height: 1.2 !important;
        margin-bottom: 5px !important;
        display: block !important;
        white-space: normal !important;
    }

    .price-value-top {
        font-size: 22px !important;
        color: #1e3a8a !important;
        font-weight: 700 !important;
        margin-bottom: 15px !important;
        display: block !important;
    }

    .minimal-divider {
        margin: 10px 0 !important;
        border: 0;
        border-top: 1px solid #f1f5f9;
    }

    /* Grid de Características Móvil */
    .property-features-grid {
        display: flex !important;
        justify-content: space-between !important;
        padding: 0 !important;
        border: none !important;
        margin: 10px 0 !important;
    }

    .property-features-grid span {
        font-size: 14px !important;
        color: #64748b !important;
        font-weight: 500 !important;
    }

    .property-features-grid i { color: #1e3a8a !important; }

    /* --- Sección Filtros --- */
    .section_filter {
        display: none; /* Se mantiene para el toggle de jQuery */
        width: 92% !important; /* No uses 100% para dejar un pequeño margen visual */
        max-width: 500px !important; 
        margin: 15px auto !important; /* Centra el bloque horizontalmente */
        position: relative !important;
        left: 0 !important;
        right: 0 !important;
        padding: 20px !important;
        box-sizing: border-box !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 16px !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
        z-index: 1000; /* Asegura que esté por encima de las tarjetas */
    }

    /* Asegura que el contenido interno no se desplace a la izquierda */
    .section_filter form, 
    .section_filter .inner-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100% !important;
    }

    /* Ajuste de inputs para que llenen el contenedor centrado */
    .section_filter .form-control,
    .section_filter select,
    .section_filter input {
        width: 100% !important;
        height: 45px !important; /* Un poco más alto para mejor UX táctil */
        margin-top: 5px !important;
    } 

    /* --- Slider Nuevos Desarrollos --- */
    .wrapper-desarrollos-top-minimal {
        padding: 10px 0 !important;
        margin-bottom: 5px !important;
    }
    .wrapper-desarrollos-top {
        margin-top: 10px !important;
    }

    .card-desarrollo-minimal {
        height: 200px !important; /* Altura final */
        border-radius: 12px !important;
        margin: 0 8px !important; /* Espacio para el Peek Effect */
        transition: transform 0.3s ease;
    }

    .slick-center .card-desarrollo-minimal {
        transform: scale(1.02); /* Destaca la tarjeta central */
    }

    .badge-desarrollo-minimal {
        font-size: 10px !important;
        padding: 4px 8px !important;
        top: 10px !important;
        left: 10px !important;
    }

    .minimal-title {
        font-size: 15px !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        white-space: nowrap !important;
    }

    /* --- Ajustes menores --- */
    .commission-badge { font-size: 0.75rem; padding: 2px 8px; }
}
@media (max-width: 768px) {
    .section_filter {
        /* Añade una transición de entrada suave */
        animation: slideIn 0.3s ease-out;
        border: 1px solid rgba(0,0,0,0.05) !important;
    }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}