/* =========================================
   PÁGINA DE PROPIEDADES
   - Layout general
   - Sidebar de filtros
   - Listado de cards
   - Estado sin resultados
========================================= */


/* =========================================
   LAYOUT GENERAL
========================================= */

.contenedor-propiedades {
    width: 90%;
    max-width: 1300px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

.contenido-propiedades {
    min-width: 0;
}

.encabezado-propiedades {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.encabezado-propiedades h1 {
    font-size: 32px;
    color: #111;
}

.encabezado-propiedades p {
    color: #666;
    font-size: 15px;
}


/* =========================================
   SIDEBAR DE FILTROS
========================================= */

.filtros-lateral {
    position: sticky;
    top: 20px;
}

.filtro-form {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filtros-titulo {
    font-size: 22px;
    margin-bottom: 5px;
    color: #111;
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filtro-grupo label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.filtro-grupo select,
.filtro-grupo input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.filtro-grupo select:focus,
.filtro-grupo input:focus {
    outline: none;
    border-color: #d4af37;
}

.filtro-botones {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.btn-principal {
    background: #d4af37;
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

.btn-principal:hover {
    background: #b9972e;
}

.btn-secundario {
    background: #f2f2f2;
    color: #111;
    border: none;
    padding: 12px 18px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s ease;
}

.btn-secundario:hover {
    background: #e7e7e7;
}

.btn-restablecer {
    text-align: center;
}

.mobile-filtros-bar {
    display: none;
}

.btn-toggle-filtros {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: #111;
    color: #fff;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.btn-toggle-filtros__icono {
    width: 18px;
    height: 18px;
    display: inline-flex;
}

.btn-toggle-filtros__icono svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* =========================================
   LISTADO
========================================= */

.listado-propiedades {
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}


/* =========================================
   CARD DE PROPIEDAD
========================================= */

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.card-propiedad {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-propiedad:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

.card-propiedad .imagen {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-propiedad .imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.card-propiedad:hover .imagen img {
    transform: scale(1.06);
}

.badges-card {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    pointer-events: none;
}

.badge-destacado,
.badge-operacion {
    display: inline-block;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    line-height: 1.2;
}

.badge-destacado {
    background: #ff6a00;
    color: #fff;
}

.badge-operacion {
    background: rgba(17, 17, 17, 0.9);
    color: #fff;
    margin-left: auto;
}

.card-propiedad .contenido {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-propiedad h3 {
    font-size: 18px;
    margin-bottom: 6px;
    color: #111;
    line-height: 1.35;
}

.card-propiedad .ubicacion {
    font-size: 14px;
    color: #777;
    margin-bottom: 14px;
}

.caracteristicas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.caracteristicas span {
    background: #f2f2f2;
    padding: 5px 9px;
    border-radius: 5px;
    font-size: 13px;
    color: #333;
}

.precio-box {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #efefef;
}

.precio-etiqueta {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #888;
    margin-bottom: 6px;
}

.precio {
    font-size: 24px;
    font-weight: 800;
    color: #111;
    line-height: 1.2;
}


/* =========================================
   SIN RESULTADOS
========================================= */

.sin-resultados-section {
    max-width: 1200px;
    margin: 80px auto;
    padding: 40px 20px;
    text-align: center;
}

.sin-resultados {
    text-align: center;
    padding: 80px 20px;
    max-width: 650px;
    margin: 0 auto;
}

.sin-resultados h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #111;
    line-height: 1.4;
}

.sin-resultados p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.btn-whatsapp {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25d366;
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
}

.btn-whatsapp:hover {
    background: #1da851;
}




/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 992px) {
    .contenedor-propiedades {
        width: 92%;
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .filtros-lateral {
        position: static;
    }

    .filtro-form {
        padding: 18px;
    }
}

@media (max-width: 768px) {
    .contenedor-propiedades {
        width: calc(100% - 32px);
        margin: 24px auto 40px;
        gap: 18px;
    }

    .mobile-filtros-bar {
        display: flex;
        justify-content: flex-start;
    }

    .filtros-lateral {
        display: none;
    }

    .filtros-lateral.filtros-abiertos {
        display: block;
    }

    .filtro-form {
        border-radius: 14px;
    }

    .encabezado-propiedades {
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .encabezado-propiedades h1 {
        font-size: 26px;
        line-height: 1.15;
    }

    .listado-propiedades {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-propiedad .imagen {
        height: 210px;
    }

    .card-propiedad .contenido {
        padding: 16px;
    }

    .precio {
        font-size: 22px;
    }

    .sin-resultados {
        padding: 40px 12px;
    }
}

@media (max-width: 480px) {
    .contenedor-propiedades {
        width: calc(100% - 24px);
    }

    .filtro-form {
        padding: 16px;
        gap: 12px;
    }

    .filtros-titulo {
        font-size: 20px;
    }

    .card-propiedad .imagen {
        height: 190px;
    }

    .caracteristicas span {
        font-size: 12px;
    }

    .btn-principal,
    .btn-secundario {
        width: 100%;
    }
}