.property-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(8, 15, 28, .68);
    backdrop-filter: blur(7px);
    animation: propertyPopupFade .25s ease both;
}
.property-popup-overlay.is-closing { animation: propertyPopupFade .22s ease reverse both; }
.property-popup {
    position: relative;
    width: min(94vw, 480px);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(0,0,0,.32);
    animation: propertyPopupEnter .35s cubic-bezier(.2,.8,.2,1) both;
}
.property-popup__close {
    position: absolute;
    top: 13px;
    right: 13px;
    z-index: 20;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    color: #101828;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 5px 18px rgba(0,0,0,.16);
}
.property-popup__close:hover { background: #ffbd00; }
.property-popup__header { padding: 22px 60px 16px 22px; text-align: left; }
.property-popup__header h2 { margin: 0; color: #10233f; font-size: 28px; line-height: 1.1; }
.property-popup__header p { margin: 6px 0 0; color: #667085; font-size: 14px; }
.property-popup__carousel { position: relative; min-height: 510px; background: #f4f6f9; }
.property-popup__slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: 285px 1fr;
    visibility: hidden;
    opacity: 0;
    transform: translateX(18px);
    transition: opacity .38s ease, transform .38s ease, visibility .38s;
    pointer-events: none;
}
.property-popup__slide.is-active { visibility: visible; opacity: 1; transform: translateX(0); pointer-events: auto; }
.property-popup__image-link { display: block; overflow: hidden; background: #dfe5ec; }
.property-popup__image-link img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .45s ease; }
.property-popup__image-link:hover img { transform: scale(1.025); }
.property-popup__content { display: flex; flex-direction: column; align-items: flex-start; padding: 19px 22px 20px; background: #fff; text-align: left; }
.property-popup__badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.property-popup__badges span { padding: 5px 10px; border-radius: 999px; background: #ffbd00; color: #172033; font-size: 12px; font-weight: 800; }
.property-popup__badges span + span { background: #edf1f6; color: #344054; }
.property-popup__content h3 { margin: 0 0 7px; color: #172033; font-size: 22px; line-height: 1.25; }
.property-popup__location { margin: 0 0 10px; color: #667085; font-size: 14px; }
.property-popup__location i { margin-right: 5px; color: #ffad00; }
.property-popup__price { display: block; margin-top: auto; color: #087c42; font-size: 25px; line-height: 1.2; }
.property-popup__detail { width: 100%; margin-top: 14px; padding: 12px 18px; border-radius: 10px; background: #ffbd00; color: #111827; font-weight: 800; text-align: center; text-decoration: none; transition: .2s ease; }
.property-popup__detail:hover { background: #111827; color: #fff; }
.property-popup__arrow {
    position: absolute;
    top: 123px;
    z-index: 12;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(17,24,39,.72);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.22);
    transition: .2s ease;
}
.property-popup__arrow:hover { background: #ffbd00; color: #111827; transform: scale(1.06); }
.property-popup__arrow--prev { left: 13px; }
.property-popup__arrow--next { right: 13px; }
.property-popup__footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 20px 15px; border-top: 1px solid #edf0f4; background: #fff; color: #667085; font-size: 13px; }
.property-popup__dots { display: flex; align-items: center; gap: 7px; }
.property-popup__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: #cbd2dc; cursor: pointer; transition: .25s ease; }
.property-popup__dots button.is-active { width: 24px; background: #ffbd00; }
@keyframes propertyPopupFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes propertyPopupEnter { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 560px) {
    .property-popup-overlay { padding: 10px; align-items: center; }
    .property-popup { width: min(100%, 410px); max-height: calc(100dvh - 20px); overflow-y: auto; border-radius: 17px; }
    .property-popup__header { padding: 17px 54px 12px 16px; }
    .property-popup__header h2 { font-size: 23px; }
    .property-popup__carousel { min-height: 452px; }
    .property-popup__slide { grid-template-rows: 225px 1fr; }
    .property-popup__content { padding: 15px 16px 17px; }
    .property-popup__content h3 { font-size: 19px; }
    .property-popup__price { font-size: 22px; }
    .property-popup__arrow { top: 94px; width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
    .property-popup-overlay,.property-popup,.property-popup__slide { animation: none; transition: none; }
}

/* Producción: centrado real respecto al viewport, incluso si el contenido padre usa transform. */
body.property-popup-open { overflow-y: auto !important; overflow-x: hidden !important; }
#property-popup-overlay.property-popup-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    min-height: 100vh !important;
    height: 100dvh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: clamp(12px, 3vw, 28px) !important;
    margin: 0 !important;
    overflow-y: auto !important;
}
#property-popup-overlay .property-popup {
    margin: auto !important;
    max-height: none !important;
    height: auto !important;
    overflow: hidden !important;
}


/* Corrección: el popup no bloquea el desplazamiento de la página. */
html:has(#property-popup-overlay) { overflow-y: auto !important; }
#property-popup-overlay[hidden] { display: none !important; }
@supports not selector(:has(*)) {
  html { overflow-y: auto; }
}
