/* LISTADO DE PROPIEDADES (page-propiedades.php) ----------------------------- */

.listado-page {
    --l-navy: #133E51;
    --l-ink: #2e3656;
    --l-green: #00870f;
    --l-teal: #478294;
    --l-line: #e3e8ec;
    --l-muted: #6b7790;
    --l-soft: #f4f7f8;
}

body.page-template-page-propiedades {
    background-color: #f4f7f8;
}

.listado-page .listado-intro {
    margin-bottom: 28px;
    text-align: center;
}

.listado-page .listado-intro .page-title {
    margin: 0 0 8px;
}

.listado-page .listado-texto {
    max-width: 680px;
    margin: 0 auto;
    color: var(--l-muted);
}

/* Filtros */
.listado-page .listado-filtros {
    margin-bottom: 24px;
    padding: 22px 24px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--l-line);
    box-shadow: 0 10px 30px rgba(19, 62, 81, .06);
}

.listado-page .lf-modos {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 4px;
    border-radius: 999px;
    background: var(--l-soft);
}

.listado-page .lf-modo {
    margin: 0;
    padding: 8px 22px;
    border-radius: 999px;
    color: var(--l-navy);
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.listado-page .lf-modo input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.listado-page .lf-modo.activo {
    background: var(--l-green);
    color: #fff;
}

.listado-page .lf-modo:focus-within {
    box-shadow: 0 0 0 3px rgba(0, 135, 15, .25);
}

.listado-page .lf-campos {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.listado-page .lf-campo label {
    display: block;
    margin-bottom: 5px;
    color: var(--l-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.listado-page .lf-campo select {
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #cfd8de;
    border-radius: 8px;
    background-color: #fff;
    color: var(--l-ink);
    font-size: 15px;
}

.listado-page .lf-campo select:focus {
    outline: none;
    border-color: var(--l-teal);
    box-shadow: 0 0 0 3px rgba(71, 130, 148, .18);
}

.listado-page .lf-campo select:disabled {
    background-color: var(--l-soft);
    color: #9aa5b5;
    cursor: not-allowed;
}

.listado-page .lf-buscar {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--l-green);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
}

/* Con JS los filtros se aplican solos: el botón sobra */
.listado-js .listado-page .lf-campo-boton {
    display: none;
}

.listado-js .listado-page .lf-campos {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Barra de resultados */
.listado-page .listado-barra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.listado-page .listado-total {
    margin: 0;
    color: var(--l-muted);
}

.listado-page .listado-total strong {
    color: var(--l-navy);
    font-size: 18px;
}

.listado-page .listado-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.listado-page .listado-limpiar,
.listado-page .listado-mapa-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--l-line);
    background: #fff;
    color: var(--l-navy);
    font-size: 14px;
}

.listado-page .listado-mapa-btn[aria-expanded="true"] {
    background: var(--l-navy);
    border-color: var(--l-navy);
    color: #fff;
}

.listado-page [hidden] {
    display: none !important;
}

/* Mapa */
.listado-page .listado-mapa-wrap {
    margin-bottom: 24px;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--l-line);
}

.listado-page .listado-mapa-resumen {
    margin: 0;
    padding: 10px 16px;
    color: var(--l-muted);
    font-size: 13px;
    border-bottom: 1px solid var(--l-line);
}

.listado-page .listado-mapa {
    height: 460px;
    background: #e5ebee;
}

.listado-mapa-info {
    display: block;
    min-width: 170px;
    color: #133E51;
    line-height: 1.35;
}

.listado-mapa-info small {
    display: block;
    color: #00870f;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.listado-mapa-info strong {
    display: block;
    margin: 2px 0 4px;
    font-size: 14px;
}

.listado-mapa-info span {
    display: block;
    font-size: 15px;
}

.listado-mapa-info em {
    display: block;
    margin-top: 6px;
    color: #478294;
    font-style: normal;
    font-size: 13px;
}

/* Grilla de tarjetas */
.listado-page .listado-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    transition: opacity .2s ease;
}

.listado-page .listado-grid.cargando {
    opacity: .45;
    pointer-events: none;
}

.pcard {
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e3e8ec;
    transition: transform .25s ease, box-shadow .25s ease;
}

.pcard:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(19, 62, 81, .12);
}

.pcard-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: #2e3656;
}

.pcard-link:hover,
.pcard-link:focus {
    color: #2e3656;
}

.pcard-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e5ebee;
}

.pcard-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.pcard:hover .pcard-media img {
    transform: scale(1.04);
}

.pcard-sin-foto {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #b7c3cc;
    font-size: 48px;
}

.pcard-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    background: #133E51;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.pcard-badge-comprar {
    background: #00870f;
}

.pcard-badge-alquilar {
    background: #478294;
}

.pcard-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px 20px 20px;
}

.pcard-tipo {
    color: #00870f;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.pcard-titulo {
    margin: 4px 0 6px;
    color: #133E51;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
}

.pcard-ubicacion {
    margin: 0 0 12px;
    color: #6b7790;
    font-size: 14px;
}

.pcard-ubicacion .fa {
    color: #00870f;
    margin-right: 3px;
}

.pcard-datos {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 0 0 14px;
    color: #4b5874;
    font-size: 14px;
}

.pcard-datos li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pcard-ico {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: .75;
}

.pcard-pie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #edf1f3;
}

.pcard-precio {
    color: #133E51;
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    line-height: 1;
}

.pcard-precio small {
    color: #6b7790;
    font-size: 14px;
}

.pcard-precio-consultar {
    font-size: 16px;
}

.pcard-ver {
    color: #478294;
    font-size: 14px;
    white-space: nowrap;
}

/* Vacío y "cargar más" */
.listado-page .listado-vacio {
    padding: 56px 20px;
    border-radius: 14px;
    background: #fff;
    border: 1px dashed #cfd8de;
    color: var(--l-muted);
    text-align: center;
}

.listado-page .listado-vacio .fa {
    margin-bottom: 12px;
    color: #b7c3cc;
    font-size: 36px;
}

.listado-page .listado-limpiar-btn,
.listado-page .listado-mas-btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: 8px;
    background: var(--l-navy);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    transition: background-color .2s ease, transform .2s ease;
}

.listado-page .listado-limpiar-btn:hover,
.listado-page .listado-mas-btn:hover {
    background: var(--l-teal);
    color: #fff;
    transform: translateY(-1px);
}

.listado-page .listado-mas-btn.cargando {
    opacity: .7;
    pointer-events: none;
}

.listado-page .listado-mas {
    margin-top: 36px;
    text-align: center;
}

.listado-page .listado-progreso {
    margin-bottom: 12px;
    color: var(--l-muted);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 991px) {
    .listado-page .lf-campos,
    .listado-js .listado-page .lf-campos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .listado-page .listado-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .listado-page .listado-filtros {
        padding: 18px 16px;
    }

    .listado-page .lf-modos {
        display: flex;
    }

    .listado-page .lf-modo {
        flex: 1;
        padding: 8px 10px;
        text-align: center;
    }

    .listado-page .lf-campos,
    .listado-js .listado-page .lf-campos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .listado-page .listado-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .listado-page .listado-mapa {
        height: 340px;
    }
}
