/* ═══════════════════════════════════════════════════════
   WP Propiedades — Plantilla single
   ═══════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');

.wpp-single {
    --wpp-navy: #0f3157;
    --wpp-blue: #2b5788;
    --wpp-cyan: #4c9fd7;
    --wpp-soft: #eaf4fb;
    --wpp-border: #e3e9f0;
    --wpp-text: #475569;
    --wpp-muted: #94a3b8;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--wpp-text);
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 64px;
    box-sizing: border-box;
}
.wpp-single *, .wpp-single *::before, .wpp-single *::after { box-sizing: border-box; }

/* ── Galería ────────────────────────────────────────────── */
.wpp-gallery {
    position: relative;
    display: grid;
    gap: 10px;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 36px;
}
.wpp-gallery__item {
    position: relative;
    display: block;
    padding: 0;
    margin: 0;
    border: 0;
    background: #dbe4ee;
    cursor: pointer;
    overflow: hidden;
    min-height: 0;
}
.wpp-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.wpp-gallery__item:hover img { transform: scale(1.04); }

.wpp-gallery--1 { grid-template-columns: 1fr; }
.wpp-gallery--2 { grid-template-columns: 2fr 1fr; }
.wpp-gallery--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.wpp-gallery--4, .wpp-gallery--5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.wpp-gallery--3 .wpp-gallery__main,
.wpp-gallery--4 .wpp-gallery__main,
.wpp-gallery--5 .wpp-gallery__main { grid-row: 1 / span 2; }
.wpp-gallery--4 .wpp-gallery__item:nth-child(4) { grid-row: 1 / span 2; }

.wpp-gallery__badge {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--wpp-navy);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    pointer-events: none;
}
.wpp-gallery__count {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 9px 16px;
    border: 0;
    border-radius: 10px;
    background: rgba(15, 49, 87, .88);
    color: #fff;
    font: 600 13px 'DM Sans', sans-serif;
    cursor: pointer;
    transition: background .2s;
}
.wpp-gallery__count:hover { background: var(--wpp-navy); }

/* ── Layout ─────────────────────────────────────────────── */
.wpp-single__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 48px;
    align-items: start;
}

.wpp-single__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.wpp-tag {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
}
.wpp-tag--estado { background: #e8eef5; color: var(--wpp-navy); }
.wpp-tag--tipo   { background: var(--wpp-soft); color: #1b7bb8; }

.wpp-single .wpp-single__title {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
    font-weight: 700;
    color: var(--wpp-navy);
    margin: 0 0 12px;
}
.wpp-single__location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px;
    font-size: 16px;
    color: var(--wpp-text);
}
.wpp-single__location svg { color: var(--wpp-cyan); flex: none; }

.wpp-single__price { margin-bottom: 28px; }
.wpp-single__amount { font-size: 38px; font-weight: 700; color: var(--wpp-navy); }
.wpp-single__currency { font-size: 15px; color: var(--wpp-muted); margin-left: 4px; }

.wpp-single__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    border: 1px solid var(--wpp-border);
    border-radius: 16px;
    margin-bottom: 36px;
    overflow: hidden;
}
.wpp-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 22px;
    border-left: 1px solid var(--wpp-border);
    font-size: 13px;
    color: var(--wpp-muted);
}
.wpp-stat:first-child { border-left: 0; }
.wpp-stat strong { font-size: 18px; color: var(--wpp-navy); }
.wpp-stat__icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--wpp-soft);
    color: var(--wpp-cyan);
    margin-bottom: 8px;
}

.wpp-single__description h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--wpp-navy);
    margin: 0 0 22px;
    padding-bottom: 12px;
    position: relative;
}
.wpp-single__description h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 44px;
    height: 3px;
    border-radius: 2px;
    background: var(--wpp-cyan);
}
.wpp-single__content { font-size: 16px; line-height: 1.8; }
.wpp-single__content p { margin: 0 0 1em; }
.wpp-single__content ul, .wpp-single__content ol { margin: 0 0 1em 1.3em; }
.wpp-single__content li { margin-bottom: .35em; }

/* ── Tarjeta de contacto ────────────────────────────────── */
.wpp-single__side { position: sticky; top: 110px; }
.wpp-contact {
    background: #fff;
    border: 1px solid var(--wpp-border);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 8px 40px rgba(15, 49, 87, .08);
}
.wpp-single .wpp-contact__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--wpp-navy);
    margin: 0 0 8px;
}
.wpp-contact__lead { margin: 0 0 20px; font-size: 14px; color: var(--wpp-text); }
.wpp-contact .wpforms-container { margin: 0 !important; }
.wpp-contact .wpforms-field { padding: 6px 0 !important; }
.wpp-contact .wpforms-field input:not([type=checkbox]):not([type=radio]),
.wpp-contact .wpforms-field textarea,
.wpp-contact .wpforms-field .choices__inner { max-width: 100% !important; width: 100% !important; }
.wpp-contact .wpforms-field-medium,
.wpp-contact .wpforms-field-large { max-width: 100% !important; }
.wpp-contact .wpforms-submit-container { margin-top: 6px !important; }
.wpp-contact button.wpforms-submit { width: 100% !important; }

.wpp-contact__or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--wpp-muted);
}
.wpp-contact__or::before, .wpp-contact__or::after { content: ''; flex: 1; height: 1px; background: var(--wpp-border); }

.wpp-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 18px;
    border-radius: 12px;
    background: #25d366;
    color: #fff !important;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none !important;
    transition: background .2s, transform .2s;
}
.wpp-whatsapp:hover { background: #1fb457; transform: translateY(-1px); }

/* ── Carrusel (lightbox) ────────────────────────────────── */
.wpp-lb {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8, 20, 36, .94);
    font-family: 'DM Sans', sans-serif;
}
.wpp-lb.is-open { display: flex; }
.wpp-lb__img {
    max-width: min(92vw, 1400px);
    max-height: 86vh;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    -webkit-user-drag: none;
}
.wpp-lb__btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
    transition: background .2s;
}
.wpp-lb__btn:hover { background: rgba(255, 255, 255, .28); }
.wpp-lb__close { top: 20px; right: 20px; }
.wpp-lb__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.wpp-lb__next { right: 20px; top: 50%; transform: translateY(-50%); }
.wpp-lb__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}
body.wpp-lb-open { overflow: hidden; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
    .wpp-single__layout { grid-template-columns: 1fr; gap: 32px; }
    .wpp-single__side { position: static; }
    .wpp-gallery { height: 420px; }
}
@media (max-width: 640px) {
    .wpp-single { padding: 16px 14px 48px; }
    .wpp-gallery, .wpp-gallery--2, .wpp-gallery--3, .wpp-gallery--4, .wpp-gallery--5 {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        height: 300px;
        border-radius: 16px;
    }
    .wpp-gallery__item:not(.wpp-gallery__main) { display: none; }
    .wpp-gallery--3 .wpp-gallery__main, .wpp-gallery--4 .wpp-gallery__main, .wpp-gallery--5 .wpp-gallery__main { grid-row: auto; }
    .wpp-single__amount { font-size: 32px; }
    .wpp-stat { padding: 16px; }
    .wpp-stat:nth-child(odd) { border-left: 0; }
    .wpp-lb__prev { left: 8px; }
    .wpp-lb__next { right: 8px; }
}

/* ── Reset de botones del tema ──────────────────────────── */
.wpp-single button.wpp-gallery__item,
.wpp-single button.wpp-gallery__item:hover,
.wpp-single button.wpp-gallery__item:focus {
    border: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: #dbe4ee !important;
    color: inherit !important;
    box-shadow: none !important;
}
.wpp-single button.wpp-gallery__count,
.wpp-single button.wpp-gallery__count:focus {
    border: 0 !important;
    border-radius: 10px !important;
    background: rgba(15, 49, 87, .88) !important;
    color: #fff !important;
    padding: 9px 16px !important;
}
.wpp-single button.wpp-gallery__count:hover { background: #0f3157 !important; color: #fff !important; }
.wpp-lb button.wpp-lb__btn,
.wpp-lb button.wpp-lb__btn:focus {
    border: 0 !important;
    border-radius: 50% !important;
    padding: 0 !important;
    background: rgba(255, 255, 255, .14) !important;
    color: #fff !important;
}
.wpp-lb button.wpp-lb__btn:hover { background: rgba(255, 255, 255, .28) !important; color: #fff !important; }

.wpp-lb button.wpp-lb__btn {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    aspect-ratio: 1 / 1;
    flex: none !important;
    box-sizing: border-box !important;
    border-radius: 50% !important;
    line-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.wpp-lb button.wpp-lb__btn svg { flex: none; display: block; }
