/* ══ Vida Costera — Single Property ══════════════════════════ */
.vc-prop-page {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--fg, #1A1F36);
  background: var(--bg, #F7F8FC);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* Breadcrumb */
.vc-prop-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted-fg, #6B7494);
  padding: 24px 0 20px;
  flex-wrap: wrap;
}
.vc-prop-breadcrumb a {
  color: var(--muted-fg, #6B7494);
  text-decoration: none;
  transition: color .15s;
}
.vc-prop-breadcrumb a:hover { color: var(--primary, #4D6AE0); }
.vc-prop-breadcrumb-sep { color: #C8CADE; }

/* Galería */
.vc-prop-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 300px 300px;
  gap: 6px;
  border-radius: var(--radius, 12px);
  overflow: hidden;
  margin-bottom: 36px;
  position: relative;
}
.vc-prop-gallery-main {
  grid-column: 1;
  grid-row: 1 / 3;
  background: #D0D4E0;
  cursor: pointer;
  position: relative;
}
.vc-prop-gallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.vc-prop-gallery-main:hover img { transform: scale(1.025); }
.vc-prop-gallery-thumbs {
  grid-column: 2;
  grid-row: 1 / 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
}
.vc-prop-gallery-thumb {
  background: #D0D4E0;
  overflow: hidden;
  cursor: pointer;
}
.vc-prop-gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.vc-prop-gallery-thumb:hover img { transform: scale(1.04); }
.vc-prop-gallery-thumb.vc-gallery-more {
  position: relative;
}
.vc-prop-gallery-thumb.vc-gallery-more::after {
  content: attr(data-count);
  position: absolute; inset: 0;
  background: rgba(26,31,54,.55);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; font-weight: 600;
  letter-spacing: -.02em;
}

/* Galería en celular — OJO: este bloque tiene que ir DESPUÉS de las reglas
 * base de arriba. Las media queries no suman especificidad, así que estando
 * antes (como estaba) las reglas base lo pisaban y el layout de celular
 * nunca se aplicaba: las miniaturas seguían en la columna 2 con
 * grid-row: 1/3, o sea las fotos metidas en media pantalla de ~390px, que
 * es por qué se veían apretadas.
 *
 * Además las alturas van por proporción y no en píxeles fijos (antes
 * 260px/130px): así cada foto escala con el ancho real del teléfono en vez
 * de quedar achatada recortando fotos 16:9 en una franja de 1.46:1. */
@media (max-width: 700px) {
  .vc-prop-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
  }
  .vc-prop-gallery-main {
    grid-column: 1;
    grid-row: 1;
    aspect-ratio: 4 / 3;
  }
  .vc-prop-gallery-thumbs {
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
  }
  .vc-prop-gallery-thumb { aspect-ratio: 4 / 3; }
}

/* Píldoras Video / Tour 360° sobre la foto principal */
.vc-prop-gallery-pills {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.vc-prop-gallery-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(10,12,30,.68); backdrop-filter: blur(3px);
  color: #fff; border: none; border-radius: 100px;
  padding: 8px 16px; font-size: 0.82rem; font-weight: 600;
  font-family: 'Inter', system-ui, sans-serif;
  cursor: pointer; transition: background .15s, transform .12s;
}
.vc-prop-gallery-pill:hover { background: rgba(77,106,224,.9); transform: translateY(-1px); }

/* ── Modal multimedia: pestañas Fotos / Video / Tour / VR / Ubicación ── */
.vc-lightbox {
  /* Overlay claro que ofusca el resto; por encima de la admin bar de WP (z-index 99999) */
  display: none; position: fixed; inset: 0; z-index: 100000;
  background: rgba(247,248,252,.9);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  padding: 20px 14px;
}
.vc-lightbox.open { display: flex; }

/* Foto única: pantalla completa de verdad, en cualquier ancho — no solo
   celular. Se activa/desactiva por JS (showSingle/showMosaic) via la
   clase vc-lb-photo-mode en .vc-lightbox, no por media query, porque acá
   lo que manda es "¿se está viendo una foto sola?", no el tamaño de
   pantalla. El mosaico y las demás pestañas (video, tour, VR) no la
   llevan y se quedan como tarjeta en desktop, igual que siempre. */
.vc-lightbox.vc-lb-photo-mode { padding: 0; }
.vc-lightbox.vc-lb-photo-mode .vc-lb-panel {
  width: 100vw; height: 100vh; height: 100dvh;
  border-radius: 0; border: none;
  /* Negro, no blanco: la mayoría de las fotos son horizontales y el
     celular es vertical, así que SIEMPRE va a quedar franja arriba/abajo
     al no recortar la foto — es normal en cualquier visor (Instagram,
     Fotos de Google), pero con fondo blanco se lee como "se ve chica y
     rota" en vez de a pantalla completa. */
  background: #0b0c10;
}
/* La barra de pestañas (Fotos/Video/Tour/VR) es redundante acá — la
   vista de foto única ya tiene su propio "‹ Todas las fotos" — y le come
   espacio vertical a la foto. Se oculta, dejando solo el botón cerrar. */
.vc-lightbox.vc-lb-photo-mode .vc-lb-tabs { display: none; }
.vc-lightbox.vc-lb-photo-mode .vc-lb-head { justify-content: flex-end; border-bottom: none; }
.vc-lightbox.vc-lb-photo-mode .vc-lb-close { background: rgba(255,255,255,.14); color: #fff; }
.vc-lightbox.vc-lb-photo-mode .vc-lb-close:hover { background: rgba(255,255,255,.28); }
.vc-lightbox.vc-lb-photo-mode .vc-lb-back { background: rgba(255,255,255,.14); color: #fff; }
.vc-lightbox.vc-lb-photo-mode .vc-lb-back:hover { background: rgba(255,255,255,.24); }
.vc-lightbox.vc-lb-photo-mode .vc-lb-caption { color: rgba(255,255,255,.72); }
.vc-lightbox.vc-lb-photo-mode .vc-lb-body,
.vc-lightbox.vc-lb-photo-mode .vc-lb-single { background: #0b0c10; }

/* La foto usa todo el espacio disponible: sin padding lateral (las flechas
   flotan por encima, no empujan) y sin bordes redondeados, que a pantalla
   completa solo recortan esquinas de la foto. */
.vc-lightbox.vc-lb-photo-mode .vc-lb-stage { padding: 0; }
.vc-lightbox.vc-lb-photo-mode .vc-lb-stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  border-radius: 0;
}
.vc-lightbox.vc-lb-photo-mode .vc-lightbox-prev,
.vc-lightbox.vc-lb-photo-mode .vc-lightbox-next {
  background: rgba(0,0,0,.42); color: #fff; border-color: rgba(255,255,255,.22);
  box-shadow: none;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.vc-lightbox.vc-lb-photo-mode .vc-lightbox-prev:hover,
.vc-lightbox.vc-lb-photo-mode .vc-lightbox-next:hover { background: rgba(0,0,0,.68); color: #fff; }

.vc-lb-panel {
  background: #fff; border: 1px solid var(--border, #E3E5EE);
  border-radius: 16px; overflow: hidden;
  width: min(1140px, 96vw); height: min(780px, 92vh);
  display: flex; flex-direction: column;
  box-shadow: 0 8px 24px rgba(26,31,54,.14), 0 24px 80px rgba(26,31,54,.22);
}
.vc-lb-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 0 14px 0 6px;
  border-bottom: 1px solid var(--border, #E3E5EE); flex-shrink: 0;
}
.vc-lb-tabs { display: flex; gap: 2px; overflow-x: auto; }
.vc-lb-tab {
  background: none; border: none; cursor: pointer;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .875rem; font-weight: 600; color: var(--muted-fg, #6B7494);
  padding: 15px 18px 13px; position: relative; white-space: nowrap;
  transition: color .15s;
}
.vc-lb-tab:hover { color: var(--fg, #1A1F36); }
.vc-lb-tab.active { color: var(--primary, #4D6AE0); }
.vc-lb-tab.active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px;
  height: 2.5px; border-radius: 3px 3px 0 0; background: var(--primary, #4D6AE0);
}
.vc-lb-close {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--secondary, #ECEEF5); color: var(--fg, #1A1F36);
  border: none; font-size: .9rem; cursor: pointer; line-height: 1; padding: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.vc-lb-close:hover { background: var(--fg, #1A1F36); color: #fff; }
.vc-lb-body { flex: 1; min-height: 0; position: relative; background: #fff; }
.vc-lb-pane { display: none; position: absolute; inset: 0; }
.vc-lb-pane.active { display: block; }

/* Pestaña Fotos: mosaico scrolleable (2 grandes + 4 chicas, alternado) */
.vc-lb-mosaic {
  height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; padding: 14px; align-content: start;
  /* Sin esto las fotos se montan unas sobre otras. El contenedor tiene alto
     definido (height:100%) y las tiles chicas sacan su alto SOLO del
     aspect-ratio; en ese escenario el navegador dimensiona las filas
     automáticas ignorando el ratio, la fila queda de unos 40px y cada tile
     igual se pinta a su alto real, desbordando sobre la fila de abajo.
     min-content sí toma el ratio al medir la fila. */
  grid-auto-rows: min-content;
}
.vc-lb-tile {
  position: relative; display: block; cursor: pointer;
  border-radius: 10px; overflow: hidden; background: var(--secondary, #ECEEF5);
  aspect-ratio: 4 / 3;
}
.vc-lb-tile.wide { grid-column: span 2; aspect-ratio: auto; height: 300px; }
.vc-lb-tile img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s ease;
}
.vc-lb-tile:hover img { transform: scale(1.04); }
.vc-lb-tile-label {
  position: absolute; left: 8px; bottom: 8px;
  background: rgba(255,255,255,.92); color: var(--fg, #1A1F36);
  font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  border-radius: 100px; padding: 3px 10px; box-shadow: 0 1px 4px rgba(0,0,0,.14);
}
@media (max-width: 700px) {
  .vc-lb-mosaic { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 10px; }
  .vc-lb-tile.wide { grid-column: span 2; height: 230px; }
}

/* Celular: el modal pasa de "tarjeta" (bordes redondeados, con margen) a
   pantalla completa de verdad — sin esto, aunque el overlay tape toda la
   pantalla, el panel de adentro (mosaico, foto única) se queda a 92vh/96vw
   con recuadro, y todo se siente apretado en vez de a pantalla completa. */
@media (max-width: 700px) {
  .vc-lightbox { padding: 0; }
  .vc-lb-panel {
    width: 100vw; height: 100vh; height: 100dvh;
    border-radius: 0; border: none;
  }
  /* Los botones prev/next dejaban 66px fijos de cada lado — en un celular
     angosto eso le come una porción grande al ancho disponible para la
     foto. Pasan a flotar encima de la imagen en vez de empujarla. */
  .vc-lb-stage { padding: 0 10px 10px; }
  .vc-lightbox-prev, .vc-lightbox-next {
    width: 38px; height: 38px; font-size: 1rem;
    background: rgba(255,255,255,.88);
  }
  .vc-lightbox-prev { left: 6px; }
  .vc-lightbox-next { right: 6px; }
}

/* Vista de foto única dentro de la pestaña Fotos */
.vc-lb-single { display: none; position: absolute; inset: 0; flex-direction: column; background: #fff; }
.vc-lb-single.open { display: flex; }
.vc-lb-single-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; flex-shrink: 0; }
.vc-lb-back {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--secondary, #ECEEF5); border: none; border-radius: 100px;
  padding: 8px 16px; font-family: 'Inter', system-ui, sans-serif;
  font-size: .8rem; font-weight: 600; color: var(--fg, #1A1F36); cursor: pointer;
  transition: background .15s;
}
.vc-lb-back:hover { background: var(--border, #E3E5EE); }
.vc-lb-caption { font-size: .8rem; font-weight: 600; color: var(--muted-fg, #6B7494); font-variant-numeric: tabular-nums; }
.vc-lb-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 0 66px 14px; }
.vc-lb-stage img { max-width: 100%; max-height: 100%; border-radius: 10px; display: block; }
.vc-lightbox-prev,.vc-lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: #fff; color: var(--fg, #1A1F36);
  border: 1px solid var(--border, #E3E5EE);
  box-shadow: 0 2px 10px rgba(26,31,54,.14);
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.15rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, transform .12s; z-index: 2;
}
.vc-lightbox-prev:hover,.vc-lightbox-next:hover { background: var(--fg, #1A1F36); color: #fff; transform: translateY(-50%) scale(1.06); }
.vc-lightbox-prev { left: 12px; }
.vc-lightbox-next { right: 12px; }

/* Pestañas de iframe (video / tour / mapa) y VR */
.vc-lb-frame-wrap { position: absolute; inset: 0; background: #000; }
.vc-lb-frame-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
/* Video propio subido al servidor: se centra y respeta su proporción en
   vez de estirarse como el iframe, que sí llena el recuadro. */
.vc-lb-video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.vc-lb-video[hidden], .vc-lb-frame-wrap iframe[hidden] { display: none; }

/* Cuando hay más de un video, el reproductor comparte la pestaña con una
   fila de botones para elegir cuál. El recuadro del reproductor no puede
   ser absolute::inset-0 acá — tiene que dejarle el alto a la fila. */
.vc-lb-video-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; background: #000; }
.vc-lb-video-wrap .vc-lb-frame-wrap { position: relative; inset: auto; flex: 1; min-height: 0; }
.vc-lb-video-picker {
  flex: 0 0 auto; display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 14px; background: #0b0c10;
  border-top: 1px solid rgba(255,255,255,.1);
}
.vc-lb-video-chip {
  flex: 0 0 auto; cursor: pointer; white-space: nowrap;
  background: rgba(255,255,255,.1); color: #E7E9F5;
  border: 1px solid rgba(255,255,255,.16); border-radius: 100px;
  padding: 7px 16px; font-size: .8rem; font-weight: 600;
  font-family: 'Inter', system-ui, sans-serif;
  transition: background .15s, color .15s;
}
.vc-lb-video-chip:hover { background: rgba(255,255,255,.2); }
.vc-lb-video-chip.active { background: var(--primary, #4D6AE0); color: #fff; border-color: transparent; }
.vc-lb-frame-wrap.light { background: var(--secondary, #ECEEF5); }
#vcLbVr { position: absolute; inset: 0; background: #000; }

/* Layout dos columnas */
.vc-prop-body {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 36px;
  align-items: start;
}
@media (max-width: 900px) {
  .vc-prop-body { grid-template-columns: 1fr; }
  .vc-prop-sidebar { order: -1; }
}

/* Columna principal */
.vc-prop-main {}

/* Tipo + Status badge */
.vc-prop-badges {
  display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap;
}
.vc-badge {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: 100px; font-size: 0.75rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
}
.vc-badge-category { background: var(--primary-lt, #EEF1FB); color: var(--primary, #4D6AE0); }
.vc-badge-status   { background: #E8F5EF; color: #1B7A50; }
.vc-badge-furnished { background: #FFF4E5; color: #B54708; }
.vc-badge-sold     { background: #FEF3F2; color: #B42318; }

/* Título */
.vc-prop-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 400; line-height: 1.2; margin: 0 0 8px;
  color: var(--fg, #1A1F36);
}

/* Ubicación */
.vc-prop-location {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.9rem; color: var(--muted-fg, #6B7494);
  margin-bottom: 20px;
}
.vc-prop-location svg { flex-shrink: 0; }

/* Precio */
.vc-prop-price {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  font-weight: 400; color: var(--fg, #1A1F36);
  margin-bottom: 28px; letter-spacing: -.02em;
}
.vc-prop-price small {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem; color: var(--muted-fg, #6B7494);
  font-weight: 400; margin-left: 6px;
}
.vc-prop-price-clp {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem; color: var(--muted-fg, #6B7494);
  font-variant-numeric: tabular-nums; margin-top: 4px;
}
.vc-prop-price-clp span { font-size: 0.72rem; }

/* Stats grid */
/* El ancho mínimo de columna y el tamaño del label están calibrados para
 * que la etiqueta más larga ("Estacionamientos") entre en una sola línea
 * incluso en la columna más angosta posible (2 columnas en celular). */
.vc-prop-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 32px;
}
.vc-prop-stat {
  background: var(--card, #FEFFFE);
  border: 1px solid var(--border, #E3E5EE);
  border-radius: var(--radius, 12px);
  padding: 14px 12px;
  min-width: 0;
}
.vc-prop-stat-icon { font-size: 1.2rem; margin-bottom: 6px; }
.vc-prop-stat-val {
  font-size: 1.15rem; font-weight: 700; color: var(--fg, #1A1F36);
  line-height: 1.1; margin-bottom: 3px;
}
.vc-prop-stat-label {
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: .03em;
  color: var(--muted-fg, #6B7494); font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

/* Separador */
.vc-prop-divider {
  border: none; border-top: 1px solid var(--border, #E3E5EE);
  margin: 28px 0;
}

/* Descripción */
.vc-prop-description h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.35rem; font-weight: 400;
  color: var(--fg, #1A1F36); margin: 0 0 16px;
}
.vc-prop-desc-body {
  font-size: 0.93rem; line-height: 1.75; color: #3A4060;
  max-height: 120px; overflow: hidden; position: relative;
  transition: max-height .5s ease;
}
.vc-prop-desc-body.expanded { max-height: 6000px; }
/* Respeta los saltos de línea y párrafos escritos en el editor */
.vc-prop-desc-body p { margin: 0 0 0.9em; }
.vc-prop-desc-body p:last-child { margin-bottom: 0; }
.vc-prop-desc-body br { line-height: inherit; }
.vc-prop-desc-body ul,
.vc-prop-desc-body ol { margin: 0 0 0.9em; padding-left: 1.25em; }
.vc-prop-desc-body li { margin: 0 0 .3em; }
.vc-prop-desc-body h2,
.vc-prop-desc-body h3,
.vc-prop-desc-body h4 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400; color: var(--fg, #1A1F36);
  font-size: 1.08rem; margin: 1.1em 0 .4em;
}
.vc-prop-desc-body strong { color: var(--fg, #1A1F36); }
.vc-prop-desc-body:not(.expanded)::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(transparent, var(--bg, #F7F8FC));
}
.vc-prop-desc-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; font-size: 0.875rem; font-weight: 600;
  color: var(--primary, #4D6AE0); background: none; border: none;
  cursor: pointer; padding: 0;
}
.vc-prop-desc-toggle:hover { opacity: .8; }

/* Características / amenidades */
.vc-prop-amenities h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.35rem; font-weight: 400;
  color: var(--fg, #1A1F36); margin: 0 0 16px;
}
.vc-prop-amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.vc-prop-amenity {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.875rem; color: var(--fg, #1A1F36);
  background: var(--card, #FEFFFE);
  border: 1px solid var(--border, #E3E5EE);
  border-radius: 8px; padding: 10px 14px;
}
.vc-prop-amenity-icon { font-size: 1rem; flex-shrink: 0; }

/* Mapa */
.vc-prop-map h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.35rem; font-weight: 400;
  color: var(--fg, #1A1F36); margin: 0 0 16px;
}
.vc-prop-map-box {
  border-radius: var(--radius, 12px); overflow: hidden;
  border: 1px solid var(--border, #E3E5EE);
  height: 300px; position: relative;
}
/* Placeholder antes de cargar el mapa: mapa estático real, difuminado */
.vc-map-placeholder {
  width: 100%; height: 100%;
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0e2a38 0%, #1a3a5c 40%, #2d5a8e 100%); /* fallback si la imagen no carga */
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  cursor: pointer;
}
.vc-map-placeholder::before {
  content: ''; position: absolute; inset: -12%;
  background-image: url('<?= esc_url( VC_PLUGIN_URL ) ?>assets/images/vc-map-placeholder.png');
  background-size: cover; background-position: center;
  filter: blur(7px) brightness(.7) saturate(1.1);
  transition: filter .2s;
}
.vc-map-placeholder::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(14,42,56,.5), rgba(45,90,142,.4));
}
.vc-map-placeholder:hover::before { filter: blur(7px) brightness(.6) saturate(1.1); }
.vc-map-placeholder > * { position: relative; z-index: 1; }
.vc-map-placeholder svg { opacity: .9; filter: drop-shadow(0 1px 3px rgba(0,0,0,.4)); }
.vc-map-placeholder-label {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .9rem; color: #fff;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.vc-map-load-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--fg, #1A1F36); color: #fff;
  border: none; border-radius: 100px;
  padding: 9px 20px; font-size: .82rem; font-weight: 600;
  font-family: 'Inter', system-ui, sans-serif;
  cursor: pointer; transition: background .15s, transform .12s;
}
.vc-map-load-btn:hover { background: var(--primary, #4D6AE0); transform: translateY(-1px); }
/* El box actúa como link */
a.vc-prop-map-box { display: block; text-decoration: none; }

/* ── Sidebar ───────────────────────────────────────────────── */
.vc-prop-sidebar {
  position: sticky; top: 100px;
}
.vc-prop-contact-card {
  background: var(--card, #FEFFFE);
  border: 1px solid var(--border, #E3E5EE);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow-elev, 0 2px 4px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.08));
}
.vc-prop-contact-title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.2rem; font-weight: 400;
  margin: 0 0 8px; color: var(--fg, #1A1F36);
}
.vc-prop-contact-sub {
  font-size: 0.825rem; color: var(--muted-fg, #6B7494);
  margin: 0 0 20px;
}
.vc-prop-contact-form label {
  display: block; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted-fg, #6B7494); margin-bottom: 6px;
}
.vc-prop-contact-form input,
.vc-prop-contact-form textarea,
.vc-prop-contact-form select {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--border, #E3E5EE);
  border-radius: 8px; padding: 10px 12px;
  font-size: 0.9rem; font-family: 'Inter', system-ui, sans-serif;
  color: var(--fg, #1A1F36); background: #fff;
  outline: none; transition: border-color .15s, box-shadow .15s;
  margin-bottom: 14px;
  -webkit-appearance: none;
}
.vc-prop-contact-form input:focus,
.vc-prop-contact-form textarea:focus {
  border-color: var(--primary, #4D6AE0);
  box-shadow: 0 0 0 3px rgba(77,106,224,.12);
}
.vc-prop-contact-form textarea { resize: vertical; min-height: 90px; }
.vc-prop-contact-form .vc-prop-hidden-price {
  font-size: 0.8rem; color: var(--muted-fg, #6B7494);
  font-style: italic; margin: -6px 0 14px;
}
.vc-prop-btn-send {
  width: 100%; padding: 13px;
  background: var(--fg, #1A1F36); color: #fff;
  border: none; border-radius: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s;
  margin-bottom: 10px;
}
.vc-prop-btn-send:hover {
  background: var(--primary, #4D6AE0);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(77,106,224,.35);
}
.vc-prop-btn-wa {
  width: 100%; padding: 12px;
  background: #25D366; color: #fff;
  border: none; border-radius: 10px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: background .15s, transform .15s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
}
.vc-prop-btn-wa:hover {
  background: #1ebe5a;
  transform: translateY(-1px);
  color: #fff; text-decoration: none;
}
.vc-prop-contact-terms {
  font-size: 0.75rem; color: var(--muted-fg, #6B7494);
  text-align: center; margin-top: 14px; line-height: 1.5;
}
.vc-prop-contact-terms a {
  color: var(--primary, #4D6AE0); text-decoration: none;
}
.vc-prop-optin {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.78rem; color: var(--muted-fg, #6B7494);
  line-height: 1.4; margin: 2px 0 14px; cursor: pointer;
}
.vc-prop-optin input {
  width: auto; height: auto; margin: 2px 0 0; flex: 0 0 auto;
  -webkit-appearance: checkbox; appearance: checkbox;
  border: none; padding: 0; border-radius: 0; background: none; box-shadow: none;
}

/* Compartir */
.vc-prop-share {
  margin-top: 16px; display: flex; align-items: center;
  gap: 10px; justify-content: center;
  font-size: 0.8rem; color: var(--muted-fg, #6B7494);
}
.vc-prop-share-btn {
  background: var(--secondary, #ECEEF5);
  border: none; border-radius: 50%;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 0.9rem; transition: background .15s;
}
.vc-prop-share-btn:hover { background: var(--border, #E3E5EE); }

/* ══ Simulador Hipotecario ══════════════════════════════════ */
.vc-sim-section h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.35rem; font-weight: 400;
  color: var(--vc-fg); margin: 0 0 16px;
}
.vc-sim-card {
  background: var(--vc-card);
  border: 1px solid var(--vc-border);
  border-radius: var(--vc-radius);
  padding: 22px 24px 20px;
  box-shadow: var(--vc-shadow-s);
}
.vc-sim-prop-val {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 6px;
  padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 1px solid var(--vc-border);
}
.vc-sim-prop-val .vc-sim-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--vc-muted); }
.vc-sim-prop-num { font-family: 'Instrument Serif', Georgia, serif; font-size: 1.4rem; color: var(--vc-fg); }
.vc-sim-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 640px) { .vc-sim-fields { grid-template-columns: 1fr; } }
.vc-sim-field-group {}
.vc-sim-label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--vc-muted); margin-bottom: 10px; }
.vc-sim-badge-warn {
  display: inline-block; margin-left: 8px; font-size: .65rem; font-weight: 600;
  background: #FFF4E5; color: #B54708; border-radius: 100px;
  padding: 2px 8px; text-transform: none; letter-spacing: 0;
}
.vc-sim-range {
  width: 100%; accent-color: var(--vc-primary);
  height: 4px; border-radius: 4px; cursor: pointer; margin-bottom: 10px;
}
.vc-sim-pie-row { display: flex; flex-direction: column; gap: 6px; }
.vc-sim-pie-info { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--vc-fg); font-weight: 500; }
.vc-sim-num-input {
  width: 52px; border: 1px solid var(--vc-border); border-radius: 6px;
  padding: 5px 7px; font-size: .875rem; font-family: inherit;
  color: var(--vc-fg); background: var(--vc-bg); text-align: center;
  outline: none; transition: border-color .15s;
}
.vc-sim-num-input:focus { border-color: var(--vc-primary); box-shadow: 0 0 0 3px rgba(77,106,224,.12); }
.vc-sim-pct { font-size: .8rem; color: var(--vc-muted); }
.vc-sim-eq { font-size: .8rem; color: var(--vc-muted); }
.vc-sim-pie-monto { font-family: 'Instrument Serif', Georgia, serif; font-size: 1rem; color: var(--vc-primary); font-weight: 400; }
.vc-sim-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vc-sim-cta {
  width: 100%; padding: 12px; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--vc-fg); color: #fff; border: none; border-radius: 10px;
  font-family: 'Inter', system-ui, sans-serif; font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: background .15s, transform .12s, box-shadow .15s;
}
.vc-sim-cta:hover { background: var(--vc-primary); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(77,106,224,.35); }

/* Modal */
/* ── Overlay ── */
.vc-sim-overlay {
  display: none; position: fixed; inset: 0; z-index: 10000;
  background: rgba(10,14,40,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.vc-sim-overlay.open { display: block; }

/* ── Modal — full-screen en móvil, panel centrado en desktop ── */
.vc-sim-modal {
  display: none; position: fixed; z-index: 10001;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--vc-card);
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
  border: 1px solid var(--vc-border);
  flex-direction: column;
  /* Móvil: ocupa toda la pantalla */
  inset: 0;
  border-radius: 0;
  overflow: hidden;
}
.vc-sim-modal.open { display: flex; }

/* Desktop: panel centrado flotante */
@media (min-width: 768px) {
  .vc-sim-modal {
    inset: auto;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: min(1060px, calc(100vw - 40px));
    height: min(640px, calc(100vh - 48px));
    border-radius: 18px;
  }
}

/* ── Header ── */
.vc-sim-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--vc-border);
  background: var(--vc-card); flex-shrink: 0;
  gap: 12px;
}
.vc-sim-modal-title { font-family: 'Instrument Serif', Georgia, serif; font-size: 1.15rem; font-weight: 400; color: var(--vc-fg); margin: 0 0 2px; }
.vc-sim-modal-sub { font-size: .75rem; color: var(--vc-muted); margin: 0; }
.vc-sim-close {
  background: var(--vc-bg); border: 1px solid var(--vc-border); border-radius: 50%;
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; color: var(--vc-muted); transition: background .15s, color .15s;
}
.vc-sim-close:hover { background: var(--vc-border); color: var(--vc-fg); }

/* ── Cuerpo: dos columnas en desktop ── */
.vc-sim-modal-body {
  display: flex; flex: 1; overflow: hidden; min-height: 0;
  flex-direction: column; /* móvil: apilado */
}
@media (min-width: 768px) {
  .vc-sim-modal-body { flex-direction: row; }
}

/* Panel de datos de referencia */
.vc-sim-ref-panel {
  flex: 1;
  overflow-y: auto; padding: 18px 20px;
  background: var(--vc-card);
  -webkit-overflow-scrolling: touch;
  min-height: 0; /* permite scroll en flex */
}

/* Componentes del panel referencia */
.vc-sim-ref-title { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--vc-muted); margin-bottom: 12px; }
.vc-sim-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.vc-sim-sum-item { background: var(--vc-bg); border: 1px solid var(--vc-border); border-radius: 8px; padding: 10px 12px; }
.vc-sim-sum-label { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--vc-muted); margin-bottom: 3px; }
.vc-sim-sum-val { font-family: 'Instrument Serif', Georgia, serif; font-size: 1rem; color: var(--vc-fg); }
.vc-sim-table-wrap { border-radius: 10px; border: 1px solid var(--vc-border); margin-bottom: 14px; overflow: hidden; }

/* Resultado estilo CMF */
.vc-sim-result-card { background: var(--vc-card); border-radius: 10px; overflow: hidden; }
.vc-sim-result-title { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--vc-muted); padding: 10px 14px 6px; border-bottom: 1px solid var(--vc-border); background: var(--vc-bg); }
.vc-sim-result-table { width: 100%; border-collapse: collapse; }
.vc-sim-result-table td { padding: 7px 14px; font-size: .8rem; border-bottom: 1px solid var(--vc-border); font-variant-numeric: tabular-nums; }
.vc-srt-label { color: var(--vc-muted); font-weight: 500; }
.vc-srt-val { text-align: right; color: var(--vc-fg); font-weight: 600; }
.vc-srt-interest { color: #b54708; }
/* Cuota mensual destacada */
.vc-sim-cuota-wrap { background: var(--vc-primary); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.vc-sim-cuota-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.75); }
.vc-sim-cuota-val { font-family: 'Instrument Serif', Georgia, serif; font-size: 1.45rem; color: #fff; font-weight: 400; }
/* Comparativa de tasas */
.vc-sim-comp-section { margin-top: 14px; border: 1px solid var(--vc-border); border-radius: 10px; overflow: hidden; }
.vc-sim-table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.vc-sim-table th { background: var(--vc-bg); padding: 7px 10px; text-align: right; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--vc-muted); border-bottom: 1px solid var(--vc-border); white-space: nowrap; }
.vc-sim-table th:first-child { text-align: left; }
.vc-sim-table td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--vc-border); color: var(--vc-fg); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vc-sim-table td:first-child { text-align: left; font-weight: 600; color: var(--vc-muted); }
.vc-sim-table tr:last-child td { border-bottom: none; }
.vc-sim-table tr.vc-sim-row-highlight td { background: var(--vc-prim-lt); color: var(--vc-primary); font-weight: 700; }
.vc-sim-table tr.vc-sim-row-highlight td:first-child { color: var(--vc-primary); }
.vc-sim-disclaimer { display: flex; align-items: flex-start; gap: 6px; font-size: .7rem; color: var(--vc-muted); line-height: 1.5; background: #FAFBFF; border: 1px solid var(--vc-border); border-radius: 8px; padding: 9px 11px; }
.vc-sim-disclaimer a { color: var(--vc-primary); text-decoration: none; font-weight: 600; }

/* ── Footer ── */
.vc-sim-modal-foot {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--vc-border);
  background: var(--vc-card); flex-shrink: 0;
  flex-wrap: wrap;
}
.vc-sim-dl-btn {
  flex: 1; min-width: 130px; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--vc-fg); color: #fff; border: none; border-radius: 10px;
  padding: 11px 14px; font-family: 'Inter', system-ui, sans-serif; font-size: .84rem; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.vc-sim-dl-btn:hover { background: var(--vc-primary); }
.vc-sim-dl-btn:disabled { opacity: .6; cursor: default; }
.vc-sim-cmf-btn {
  flex: 1; min-width: 130px; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #0e2a38; color: #fff; border: none;
  border-radius: 10px; padding: 11px 14px; font-family: 'Inter', system-ui, sans-serif;
  font-size: .84rem; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .15s;
}
.vc-sim-cmf-btn:hover { background: #1a3a5c; color: #fff; }

/* ── Gate anti-bot del informe PDF ──
 * El widget va en appearance="interaction-only": lo normal es que resuelva
 * solo y nunca se vea. El bloque ocupa toda la fila del footer y solo se
 * muestra (clase .visible, puesta desde JS) cuando Cloudflare pide
 * interacción o cuando la verificación falla. */
.vc-sim-ts-gate {
  flex-basis: 100%; display: none;
  flex-direction: column; align-items: center; gap: 8px;
  padding: 10px 0 2px;
}
.vc-sim-ts-gate.visible { display: flex; }
.vc-sim-ts-msg {
  margin: 0; font-size: .74rem; line-height: 1.4; text-align: center;
  color: var(--vc-muted);
}
.vc-sim-ts-gate.error .vc-sim-ts-msg { color: #B42318; font-weight: 600; }
.vc-sim-turnstile:empty { display: none; }

/* QR hidden canvas para PDF */
#vcQrCanvas { display: none; }
