/* ═══════════════════════════════════════════════════════
   WP Propiedades — Frontend Styles
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Lora:wght@600;700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600&display=swap');

:root {
    --prop-blue:    #2b5788;
    --prop-cyan:    #4c9fd7;
    --prop-cyan-h:  #3a8ec6;
    --prop-light:   #f4f7fb;
    --prop-border:  #d1d9e0;
    --prop-text:    #1e2d3d;
    --prop-muted:   #94a3b8;
    --prop-white:   #ffffff;
    --prop-radius:  12px;
    --prop-shadow:  0 4px 24px rgba(43,87,136,0.10);
    --prop-shadow-h:0 8px 32px rgba(43,87,136,0.18);
}

.wpp-wrap {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--prop-text);
    max-width: 1200px;
    margin: 0 auto;
}

/* ── Buscador ───────────────────────────────────────────── */
.wpp-search-bar {
    background: var(--prop-white);
    border-radius: var(--prop-radius);
    box-shadow: var(--prop-shadow);
    padding: 20px 24px;
    margin-bottom: 40px;
}

.wpp-form {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* ── Grupo: label + campo ───────────────────────────────── */
.wpp-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 180px;
}

.wpp-field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--prop-blue);
    letter-spacing: 0.01em;
    font-family: 'DM Sans', sans-serif;
}

/* ── Campo: wrapper relativo ────────────────────────────── */
.wpp-field {
    position: relative;   /* ← clave para el ícono absolute */
    display: flex;
    align-items: center;
    background: var(--prop-white);
    border: 1.5px solid var(--prop-border);
    border-radius: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.wpp-field:hover {
    border-color: #a8bdd4;
}

.wpp-field:focus-within {
    border-color: var(--prop-blue);
    box-shadow: 0 0 0 3px rgba(43,87,136,0.12);
}

/* ── Ícono: posición absoluta a la izquierda ────────────── */
.wpp-field-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--prop-muted);
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 2;
}

/* ── Input: padding-left deja espacio al ícono ──────────── */
.wpp-input {
    width: 100%;
    border: none !important;
    outline: none !important;
    background: transparent;
    padding: 0.5rem 2rem 0.5rem 2.5rem !important; /* left 2.5rem deja espacio al ícono */
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: var(--prop-text);
    box-shadow: none !important;
    border-radius: 0;
    min-width: 0;
}

.wpp-input::placeholder { color: var(--prop-muted); }

/* ── Select: mismo padding-left que el input ────────────── */
.wpp-select {
    width: 100%;
    border: none !important;
    outline: none !important;
    background: transparent;
    padding: 11px 36px 11px 38px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    color: var(--prop-text);
    appearance: none;
    cursor: pointer;
    box-shadow: none !important;
    border-radius: 0;
    min-width: 0;
}

.wpp-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--prop-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    z-index: 2;
}

/* ── Indicador de carga en el grid ─────────────────────── */
.wpp-grid {
    transition: opacity 0.2s ease;
}

/* ── Grid 3 columnas ────────────────────────────────────── */
.wpp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

@media (max-width: 900px) { .wpp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
    .wpp-grid { grid-template-columns: 1fr; }
    .wpp-form { flex-direction: column; }
    .wpp-field-group, .wpp-btn-wrap { width: 100%; }
    .wpp-btn-search { width: 100% !important; justify-content: center !important; }
}

/* ── Tarjeta ────────────────────────────────────────────── */
.wpp-card {
    background: var(--prop-white);
    border-radius: var(--prop-radius);
    box-shadow: var(--prop-shadow);
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.wpp-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--prop-shadow-h);
}

.wpp-card__image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--prop-light);
}

.wpp-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.wpp-card:hover .wpp-card__img { transform: scale(1.04); }

.wpp-card__no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--prop-light);
}

/* Badge */
.wpp-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--prop-blue);
    color: var(--prop-white);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
    pointer-events: none;
}

/* Cuerpo */
.wpp-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
}

.wpp-card__title {
    font-family: 'Lora', Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--prop-blue);
    margin: 0;
    line-height: 1.35;
}

.wpp-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.wpp-card__title a:hover { color: var(--prop-cyan); }

.wpp-card__ubicacion {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--prop-muted);
    margin: 0;
}

.wpp-card__ubicacion svg { flex-shrink: 0; color: var(--prop-cyan); }

.wpp-btn-detalle {
    display: block !important;
    text-align: center !important;
    border: 2px solid var(--prop-cyan) !important;
    color: var(--prop-cyan) !important;
    border-radius: 8px !important;
    padding: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: 'DM Sans', sans-serif !important;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s !important;
    margin-top: auto !important;
    background: transparent !important;
}

.wpp-btn-detalle:hover {
    background: var(--prop-cyan) !important;
    color: var(--prop-white) !important;
}

/* ── Sin resultados ─────────────────────────────────────── */
.wpp-empty {
    text-align: center;
    padding: 64px 24px;
    color: var(--prop-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    grid-column: 1 / -1;  /* ocupa todo el ancho del grid */
    width: 100%;
}

.wpp-empty p { font-size: 16px; margin: 0; }

/* ── Paginación ─────────────────────────────────────────── */
.wpp-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.wpp-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    color: var(--prop-text);
    background: var(--prop-white);
    border: 1.5px solid var(--prop-border);
    text-decoration: none;
    transition: all 0.2s;
    padding: 0 6px;
}

.wpp-pagination .page-numbers:hover {
    border-color: var(--prop-cyan);
    color: var(--prop-cyan);
}

.wpp-pagination .page-numbers.current {
    background: var(--prop-blue);
    color: var(--prop-white);
    border-color: var(--prop-blue);
}

.wpp-pagination .page-numbers.dots {
    border-color: transparent;
    background: transparent;
    color: var(--prop-muted);
    cursor: default;
}

.wpp-pagination .page-numbers.prev,
.wpp-pagination .page-numbers.next {
    color: var(--prop-muted);
}

.wpp-pagination .page-numbers.prev:hover,
.wpp-pagination .page-numbers.next:hover {
    color: var(--prop-cyan);
    border-color: var(--prop-cyan);
}