/* =====================================================================
   Negocio Miami · Listados de propiedades, mapa y ficha (diseño 2026)
   Usa los tokens de site.css. Prefijo propio: .lst-
   ===================================================================== */

/* ---------- Encabezado de listados: texto + panel de datos / foto ---------- */
.lst-hero { padding: clamp(28px, 4vw, 56px) 0 clamp(24px, 3.5vw, 44px); }
.lst-hero__inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: stretch; }
.lst-hero__text { align-self: center; }
.lst-hero .hv2-pagehero__title { font-size: clamp(34px, 4.4vw, 60px); font-weight: 300; letter-spacing: -.02em; }
.lst-hero__answer { max-width: 62ch; }
.lst-hero__updated { margin: 14px 0 0; font-size: 13px; letter-spacing: .04em; color: var(--muted); }

.lst-hero__side { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; background: var(--ink); color: var(--white); overflow: hidden; }
/* Fotos de propiedades: 800×500 (16:10). Nunca se estiran a otra proporción */
.lst-hero__side--photo { min-height: 0; justify-content: flex-start; }
.lst-hero__photo { aspect-ratio: 16 / 10; flex: none; }
.lst-stats { position: relative; z-index: 1; padding: clamp(20px, 2.4vw, 32px); }
.lst-stats dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 0; }
.lst-stats dl > div:first-child dd { font-size: clamp(34px, 3.4vw, 46px); }
.lst-stats dt { font: 600 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .65); }
.lst-stats dd { margin: 8px 0 0; font: 300 clamp(17px, 1.4vw, 21px)/1.2 var(--sans); letter-spacing: -.01em; }
.lst-stats__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 22px; }
.lst-stats__cta .hv2-btn { min-height: 46px; padding: 0 20px; }
.lst-stats__wa { font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

.lst-intro { margin-top: -8px; }
.lst-intro p { max-width: 80ch; margin: 0 0 8px; color: var(--muted); }

/* ---------- Barra de filtros ---------- */
.lst-browser { padding-bottom: clamp(48px, 7vw, 96px); }
.lst-filters { align-items: flex-end; gap: 16px; padding: 22px 0; }
.lst-filters__count { flex: 1 1 100%; margin: 0; color: var(--ink); }
.lst-filters__count p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.lst-filters__count strong { color: var(--ink); }
.lst-filters__title { margin: 0; font: 300 clamp(24px, 2.6vw, 34px)/1.15 var(--sans); letter-spacing: -.015em; }
.lst-filters__count .lst-filters__caption { max-width: 80ch; margin-top: 10px; font-size: 16px; line-height: 1.55; }
.lst-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; }
.lst-chips .hv2-chip { padding: 8px 14px; font-size: 13px; }
.lst-filters__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.lst-more-btn svg { flex: none; }

.lst-more { display: grid; grid-template-columns: 2fr repeat(5, minmax(0, 1fr)) auto; gap: 14px; align-items: end; padding: 20px 0; border-bottom: 1px solid var(--line); }
.lst-more[hidden] { display: none; }
.lst-more__actions { display: flex; align-items: center; gap: 16px; }
.lst-more .hv2-btn { min-height: 48px; }

/* ---------- Grilla y tarjeta ---------- */
.lst-grid { margin-top: 36px; }
.lst-card__photo { display: block; }
.lst-card .hv2-card__media .hv2-photo { aspect-ratio: 16 / 10; }
.lst-card .btn-favorite { position: absolute; top: 10px; right: 10px; z-index: 3; }
.lst-card__deal { top: auto; bottom: 14px; right: auto; left: 14px; }
.lst-card__addr { margin: 8px 0 0; font: 500 16px/1.4 var(--sans); }
.lst-card__addr a:hover { color: var(--accent-dark); }
.lst-card .hv2-card__price { font-weight: 300; }
.lst-card__up { display: inline-block; margin-left: 8px; color: var(--sea) !important; font-size: .45em !important; letter-spacing: .08em; text-transform: uppercase; }

/* Favorito (partial compartido usa clases de Font Awesome: aquí se dibuja el corazón con máscara SVG) */
.btn-favorite {
    width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .92); color: var(--ink); cursor: pointer; box-shadow: 0 4px 14px rgba(12, 26, 34, .18);
    transition: transform .2s var(--ease), color .2s;
}
.btn-favorite:hover { transform: scale(1.08); color: #d6453a; }
.btn-favorite.favorited, .btn-favorite.active { color: #d6453a; }
.btn-favorite.loading { opacity: .6; }
.btn-favorite .fa {
    width: 19px; height: 19px; display: block; background: currentColor;
    -webkit-mask: var(--lst-heart-o) center / contain no-repeat; mask: var(--lst-heart-o) center / contain no-repeat;
}
.btn-favorite .fa-heart { -webkit-mask-image: var(--lst-heart); mask-image: var(--lst-heart); }
:root {
    --lst-heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.2C.9 8.4 3 4.5 6.7 4.5c2.1 0 3.6 1.2 4.3 2.4h2c.7-1.2 2.2-2.4 4.3-2.4 3.7 0 5.8 3.9 4.3 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E");
    --lst-heart-o: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 20s-7-4.3-8.9-8.6C1.7 8.2 3.6 5 6.8 5c2 0 3.4 1.1 4.1 2.3h2.2C13.8 6.1 15.2 5 17.2 5c3.2 0 5.1 3.2 3.7 6.4C19 15.7 12 20 12 20z'/%3E%3C/svg%3E");
}

/* ---------- Vista mapa ---------- */
.lst-view--map { margin-top: 28px; }
.lst-map__note { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.lst-map { position: relative; z-index: 0; height: min(72vh, 720px); min-height: 420px; background: var(--sand); border: 1px solid var(--line); }
.lst-map.is-loading::after { content: ''; position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 3px solid var(--ink); border-right-color: transparent; border-radius: 50%; animation: hv2-spin .8s linear infinite; }
.lst-map.is-error::after, .lst-minimap.is-error::after { content: 'No se pudo cargar el mapa / Map could not be loaded'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; color: var(--muted); }
.lst-pin { background: none; border: 0; }
.lst-pin span {
    display: inline-block; transform: translate(-50%, -100%); padding: 6px 10px; border-radius: 999px; white-space: nowrap;
    background: var(--ink); color: var(--white); font: 600 12px/1 var(--sans); box-shadow: 0 6px 16px rgba(12, 26, 34, .3);
}
.lst-pin span::after { content: ''; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink); }
.lst-pin:hover span, .leaflet-marker-icon.lst-pin:focus span { background: var(--accent); color: var(--ink); }
.lst-pin:hover span::after { border-top-color: var(--accent); }
.lst-map--dots .lst-pin span { width: 14px; height: 14px; padding: 0; border: 2px solid var(--white); font-size: 0; transform: translate(-50%, -50%); }
.lst-map--dots .lst-pin span::after { display: none; }
.lst-pin--dot span { width: 22px; height: 22px; padding: 0; border: 4px solid var(--white); background: var(--accent); transform: translate(-50%, -50%); }
.lst-pin--dot span::after { display: none; }
.lst-pop { display: grid; gap: 4px; color: var(--ink) !important; text-decoration: none; font-family: var(--sans); }
.lst-pop img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; margin-bottom: 6px; }
.lst-pop strong { font-size: 18px; font-weight: 500; }
.lst-pop span { font-size: 13px; line-height: 1.35; color: var(--muted); }
.lst-pop em { margin-top: 4px; font-style: normal; font-size: 13px; font-weight: 600; color: var(--accent-dark); }
.leaflet-popup-content { margin: 12px; }
.leaflet-container { font-family: var(--sans); }

/* ---------- FAQ ---------- */
.lst-faq { background: var(--sand); padding: clamp(56px, 7vw, 96px) 0; }
.lst-faq .hv2-title { font-size: clamp(28px, 3.2vw, 44px); font-weight: 300; }
.lst-faq__list { max-width: 920px; margin-top: 32px; border-top: 1px solid var(--line); }
.lst-faq__item { border-bottom: 1px solid var(--line); }
.lst-faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; }
.lst-faq__item summary::-webkit-details-marker { display: none; }
.lst-faq__item summary::after { content: '+'; flex: none; font: 300 28px/1 var(--sans); color: var(--accent-dark); transition: transform .2s; }
.lst-faq__item[open] summary::after { transform: rotate(45deg); }
.lst-faq__item h3 { margin: 0; font: 500 clamp(17px, 1.4vw, 20px)/1.35 var(--sans); }
.lst-faq__item p { max-width: 75ch; margin: 0 0 22px; color: #24323a; }

/* ---------- Enlazado interno ---------- */
.lst-related { padding: clamp(48px, 6vw, 80px) 0; border-top: 1px solid var(--line); }
.lst-related__title { margin: 0 0 28px; font: 300 clamp(24px, 2.4vw, 32px)/1.2 var(--sans); letter-spacing: -.015em; }
.lst-related__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.lst-related h3 { margin: 0 0 12px; font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--sea); }
.lst-related ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.lst-related a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.lst-related a:hover { color: var(--accent-dark); text-decoration-color: currentColor; }
.lst-related li span { color: var(--muted); font-size: 14px; }

/* ---------- Precio con historial (partial front.partials.listing-price) ---------- */
.listing-price-wrap { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.listing-price-old { font-size: .5em; color: var(--muted); text-decoration: line-through; }
.listing-price-badge { align-self: center; padding: 5px 8px; font: 600 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.listing-price-badge--reduced { background: var(--accent); color: var(--ink); }
.listing-price-badge--increased { background: var(--sea); color: var(--white); }
.listing-price-badge .fa { display: none; }

/* ---------- Ficha de propiedad ---------- */
.lst-ficha__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; padding-top: clamp(24px, 3.5vw, 48px); padding-bottom: 24px; }
.lst-ficha__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.lst-ficha__tags span { padding: 7px 10px; background: var(--sand); font: 600 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.lst-ficha__tags span:first-child { background: var(--ink); color: var(--white); }
.lst-ficha__tags .is-off { background: #fbeae6; color: #8a2b1d; }
.lst-ficha__head h1 { margin: 0; font: 300 clamp(30px, 4vw, 56px)/1.08 var(--sans); letter-spacing: -.02em; text-wrap: balance; }
.lst-ficha__answer { max-width: 70ch; margin: 14px 0 0; font-size: 16px; color: var(--muted); }
.lst-ficha__pricebox { display: grid; justify-items: end; gap: 14px; }
.lst-ficha__price { font: 300 clamp(30px, 3.4vw, 46px)/1 var(--sans); letter-spacing: -.02em; white-space: nowrap; }
.lst-ficha__price small { margin-left: 4px; font-size: .4em; color: var(--muted); }
.lst-ficha__actions { display: flex; gap: 10px; }
.lst-iconbtn { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--ink); cursor: pointer; transition: background .2s, color .2s; }
.lst-iconbtn:hover, .lst-iconbtn.is-done { background: var(--ink); color: var(--white); }
.lst-ficha__actions .btn-favorite { box-shadow: none; border: 1px solid var(--line); background: var(--white); }

.lst-gallery { position: relative; display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.lst-gallery__item { position: relative; padding: 0; border: 0; overflow: hidden; background: var(--sand); cursor: zoom-in; aspect-ratio: 16 / 10; }
.lst-gallery__item:first-child { grid-row: 1 / 3; aspect-ratio: auto; height: 100%; }
.lst-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.lst-gallery__item:hover img { transform: scale(1.04); }
.lst-gallery--single { grid-template-columns: minmax(0, 1fr); max-width: 1100px; }
.lst-gallery--single .lst-gallery__item:first-child { grid-row: auto; aspect-ratio: 16 / 10; height: auto; }
.lst-gallery__more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8, 18, 24, .55); color: var(--white); font: 300 34px/1 var(--sans); }
.lst-gallery__all { position: absolute; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; background: var(--white); color: var(--ink); font: 600 13px/1 var(--sans); cursor: pointer; box-shadow: 0 6px 18px rgba(12, 26, 34, .2); }
/* Con 2 fotos: la principal ocupa una fila y la segunda queda al lado, ambas 16:10 */
.lst-gallery:has(.lst-gallery__item:nth-child(2):last-of-type) .lst-gallery__item:first-child { grid-row: auto; aspect-ratio: 16 / 10; height: auto; }

.lst-ficha__body { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(56px, 8vw, 110px); }
.lst-ficha__main { display: grid; gap: clamp(40px, 5vw, 64px); }
.lst-h2 { margin: 0 0 20px; font: 300 clamp(24px, 2.4vw, 32px)/1.2 var(--sans); letter-spacing: -.015em; }
.lst-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.lst-facts > div { padding: 18px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
/* El último dato se estira hasta el final de su fila: nunca queda un hueco, tenga la ficha los datos que tenga */
.lst-facts > div:last-child { grid-column-end: -1; }
.lst-facts dt { font: 600 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.lst-facts dd { margin: 10px 0 0; font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
.lst-facts a { text-decoration: underline; text-underline-offset: 3px; }
.lst-desc { max-width: none; font-size: 17px; }
.lst-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; margin: 0; padding: 0; list-style: none; }
.lst-features li { position: relative; padding-left: 22px; }
.lst-features li::before { content: ''; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; background: var(--accent); }
.lst-minimap { position: relative; z-index: 0; height: 360px; background: var(--sand); border: 1px solid var(--line); }
.lst-minimap__note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.lst-iframe iframe { display: block; width: 100% !important; height: 360px; border: 0; }

.lst-calc { padding: clamp(24px, 3vw, 40px); background: var(--white); border: 1px solid var(--line); }
.lst-calc__lead { margin: -8px 0 24px; color: var(--muted); }
.lst-calc__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; }
.lst-calc__adv summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--sea); margin-bottom: 14px; }
.lst-calc__adv .hv2-form__row + .hv2-form__row { margin-top: 14px; }
.lst-calc__result { padding: 24px; background: var(--ink); color: var(--white); }
.lst-calc__label { margin: 0; font: 600 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .65); }
.lst-calc__total { margin: 12px 0 18px; font: 300 clamp(34px, 3.4vw, 46px)/1 var(--sans); letter-spacing: -.02em; color: #ffb36b; }
.lst-calc__result dl { margin: 0; display: grid; gap: 10px; }
.lst-calc__result dl > div { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; }
.lst-calc__result dd { margin: 0; font-weight: 600; }

.lst-contact__note { margin: -6px 0 16px; font-size: 13px; color: var(--muted); }
.lst-contact .hv2-alert { margin-bottom: 14px; }
.lst-contact__wa { display: block; margin-top: 14px; text-align: center; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.lst-contact .g-recaptcha { max-width: 100%; overflow: hidden; }
.lst-agent__link { display: flex; align-items: center; gap: 14px; }
.lst-agent__link img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.lst-agent__link strong { display: block; font-weight: 600; }
.lst-agent__link em { font-style: normal; font-size: 14px; color: var(--muted); }
.lst-agent p { margin: 14px 0 0; font-size: 15px; }
.lst-posts ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.lst-posts a { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; font-size: 14px; line-height: 1.4; }
.lst-posts a:hover span { color: var(--accent-dark); }
.lst-posts img { width: 64px; height: 64px; object-fit: cover; }

/* Visor de fotos y ebook */
.lst-lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8, 18, 24, .96); }
.lst-lightbox[open] { display: grid; place-items: center; }
.lst-lightbox::backdrop, .lst-ebook::backdrop { background: rgba(8, 18, 24, .7); }
.lst-lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 120px); object-fit: contain; }
.lst-lightbox__close { position: absolute; top: 14px; right: 18px; z-index: 2; width: 44px; height: 44px; border: 0; background: none; color: var(--white); font-size: 36px; line-height: 1; cursor: pointer; }
.lst-ebook .lst-lightbox__close { color: var(--ink); }
.lst-lightbox__nav { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--white); font-size: 34px; line-height: 1; cursor: pointer; }
.lst-lightbox__nav:hover { background: rgba(255, 255, 255, .25); }
.lst-lightbox__nav--prev { left: 20px; }
.lst-lightbox__nav--next { right: 20px; }
.lst-lightbox__count { position: absolute; bottom: 18px; left: 0; right: 0; margin: 0; text-align: center; color: rgba(255, 255, 255, .75); font-size: 14px; }
.lst-ebook { width: min(760px, calc(100vw - 32px)); padding: 0; border: 0; background: var(--white); color: var(--ink); }
.lst-ebook[open] { display: grid; grid-template-columns: 240px 1fr; }
.lst-ebook > img { width: 100%; height: 100%; padding: 28px; object-fit: contain; background: var(--sand); }
.lst-ebook > div { padding: 36px 32px; }
.lst-ebook h2 { margin: 0 0 12px; font: 300 32px/1.15 var(--sans); }
.lst-ebook p:not(.hv2-eyebrow) { margin: 0 0 22px; color: var(--muted); }
.lst-ebook small { display: block; margin-top: 12px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .lst-more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lst-more__search { grid-column: 1 / -1; }
    .lst-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
    .lst-hero__inner { grid-template-columns: 1fr; }
    .lst-hero__side { min-height: 0; }
    .lst-ficha__head { grid-template-columns: 1fr; }
    .lst-ficha__pricebox { justify-items: start; }
    .lst-calc__grid { grid-template-columns: 1fr; }
    .lst-related__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .lst-filters__tools { margin-left: 0; width: 100%; justify-content: space-between; }
    .lst-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
    .lst-chips::-webkit-scrollbar { display: none; }
    .lst-chips .hv2-chip { flex: none; }
    .lst-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lst-more__actions { grid-column: 1 / -1; }
    .lst-more__actions .hv2-btn { flex: 1; }
    .lst-map { height: calc(100svh - 150px); min-height: 380px; margin: 0 calc(var(--gutter) * -1); border-left: 0; border-right: 0; }
    .lst-gallery { grid-template-columns: 1fr 1fr; margin: 0 calc(var(--gutter) * -1); }
    .lst-gallery__item:first-child { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 10; height: auto; }
    .lst-gallery--single { grid-template-columns: 1fr; }
    .lst-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lst-features { grid-template-columns: 1fr; }
    .lst-related__cols { grid-template-columns: 1fr; }
    .lst-lightbox img { max-width: 100vw; max-height: calc(100vh - 140px); }
    .lst-lightbox__nav { top: auto; bottom: 8px; margin-top: 0; }
    .lst-ebook[open] { grid-template-columns: 1fr; }
    .lst-ebook > img { height: 200px; }
    .lst-ebook > div { padding: 24px; }
}
