/* =========================================================
   Inmobify · Portal web público
   Sistema de diseño (revisión frontend-design):
   - Color: verde bosque (marca), marfil (superficies cálidas),
     arena (detalle puntual), tinta verde-negra (texto), piedra (secundario).
   - Tipo: Manrope en una sola familia; escala 1.25 sobre 16 px,
     cifras tabulares en precios y datos.
   - Jerarquía de radios: 6 (controles) · 10 (tarjetas) · 16 (paneles/ventanas).
   ========================================================= */
:root {
  /* Color */
  --forest: #2f5d4e;
  --forest-deep: #1e3f35;
  --forest-tint: #e8efeb;
  --ivory: #f7f4ee;
  --sand: #b08d57;
  --ink: #18211d;
  --text: #333b37;
  --stone: #5e6762;
  --line: #e3e0d8;
  --line-strong: #c9ccc7;
  --white: #ffffff;
  --fav: #d42d46;

  /* Tipo (escala 1.25) */
  --fs-xs: 0.8rem;    /* 12.8 */
  --fs-sm: 0.875rem;  /* 14 */
  --fs-md: 1rem;      /* 16 */
  --fs-lg: 1.25rem;   /* 20 */
  --fs-xl: 1.5625rem; /* 25 */
  --fs-2xl: 1.953rem; /* 31 */
  --fs-3xl: 2.441rem; /* 39 */

  /* Forma */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --control-h: 44px;
  --shadow-card: 0 1px 2px rgba(24, 33, 29, 0.06), 0 6px 18px rgba(24, 33, 29, 0.07);
  --shadow-raise: 0 2px 4px rgba(24, 33, 29, 0.08), 0 14px 32px rgba(24, 33, 29, 0.14);
  --shadow-float: 0 24px 64px rgba(18, 28, 23, 0.28);
  --header-h: 76px;

  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 100%;
  color: var(--text);
  font-feature-settings: "ss01" off;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); font-size: var(--fs-md); line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0; font-weight: 700; }
p { margin: 0; }
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.section { padding-block: 72px; }
.muted { color: var(--stone); }
.small { font-size: var(--fs-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Etiqueta de sección (del diseño original: solo en portada) */
.eyebrow {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--forest); margin-bottom: 12px; display: flex; align-items: center; gap: 10px;
}
.eyebrow.light { color: rgba(255, 255, 255, 0.88); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sand); flex: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--control-h); padding: 0 20px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 0.9375rem; line-height: 1; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--forest); color: var(--white); }
.btn-primary:hover { background: var(--forest-deep); }
.btn-outline { border-color: var(--line-strong); background: var(--white); color: var(--ink); }
.btn-outline:hover { border-color: var(--forest); color: var(--forest); }
.btn-light { background: var(--white); color: var(--forest-deep); }
.btn-light:hover { background: var(--ivory); }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; color: var(--forest); }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.arrow-link { font-weight: 600; color: var(--forest); display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.arrow-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 1200; background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner {
  height: var(--header-h); display: flex; align-items: center; gap: 28px;
  width: min(1240px, 100% - 32px); margin-inline: auto;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--forest); letter-spacing: -0.025em; flex: none; }
/* «con <agente>» bajo el logo: el nombre llega del CRM (site.name); sin nombre no se muestra */
.brand-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
/* width 0 + min-width 100%: nunca más ancha que «inmobify», así la cabecera no cambia de tamaño */
.brand-agent { font-size: var(--fs-xs); font-weight: 600; line-height: 1.1; letter-spacing: 0; color: var(--stone);
  width: 0; min-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-agent[hidden] { display: none; }
.main-nav { display: flex; gap: 26px; margin-inline: auto; height: 100%; }
.main-nav a {
  display: flex; align-items: center; height: 100%; font-size: 0.9375rem; font-weight: 500; color: var(--ink);
  border-bottom: 2px solid transparent; padding-top: 2px; white-space: nowrap;
}
.main-nav a:hover { color: var(--forest); }
.main-nav a.active { color: var(--forest); border-bottom-color: var(--forest); font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.crm-btn, .fav-link {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: var(--r-sm);
  font-size: 0.9375rem; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.crm-btn { color: var(--forest); }
.crm-btn:hover, .fav-link:hover { background: var(--forest-tint); text-decoration: none; }
.fav-icon { font-size: 1.15rem; line-height: 1; width: 1.1em; text-align: center; }
.fav-icon.on { color: var(--fav); }
.fav-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--forest-tint);
  font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; color: var(--forest-deep);
  font-variant-numeric: tabular-nums;
}
.fav-count.on { background: var(--fav); color: var(--white); }
.publish-btn { height: 40px; font-size: 0.875rem; padding: 0 16px; margin-left: 6px; }
.menu-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border-radius: var(--r-sm); }
.menu-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; border-radius: 1px; }
.mobile-menu { display: flex; flex-direction: column; padding: 4px 16px 16px; border-top: 1px solid var(--line); background: var(--white); }
.mobile-menu a, .mobile-menu .link-btn { padding: 14px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 600; font-size: var(--fs-md); color: var(--ink); }
.mobile-menu .link-btn { color: var(--forest); border-bottom: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: clamp(560px, 78vh, 700px); display: flex; align-items: center; overflow: hidden; background: #26302b; isolation: isolate; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; z-index: -2; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 21, 17, .74) 0%, rgba(14, 21, 17, .5) 42%, rgba(14, 21, 17, .08) 78%); }
.hero-content { position: relative; padding-block: 80px; color: var(--white); }
.hero h1 { color: var(--white); font-size: clamp(2.441rem, 5.2vw, 3.815rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.06; max-width: 22ch; }
.hero-sub { margin-top: 18px; font-size: var(--fs-lg); line-height: 1.45; color: rgba(255, 255, 255, .92); max-width: 46ch; }
.hero-caption {
  position: absolute; right: max(16px, calc((100% - 1200px) / 2)); bottom: 28px; font-size: 0.6875rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255, 255, 255, .82); display: flex; align-items: center; gap: 14px;
}
.hero-caption::before { content: ""; width: 34px; height: 1px; background: currentColor; }

.search-card { margin-top: 36px; width: min(680px, 100%); background: var(--white); border-radius: var(--r-md); box-shadow: var(--shadow-float); padding: 0 8px 8px; color: var(--ink); }
.search-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding-inline: 8px; }
.search-tabs button { background: none; border: 0; padding: 14px 16px 12px; font-weight: 600; font-size: 0.9375rem; cursor: pointer; color: var(--stone); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.search-tabs button:hover { color: var(--ink); }
.search-tabs button.active { color: var(--forest-deep); border-bottom-color: var(--forest); }
.search-row { display: flex; gap: 8px; padding-top: 8px; }
.search-field { flex: 1; display: flex; align-items: center; gap: 10px; padding-inline: 12px; color: var(--forest); border-radius: var(--r-sm); min-width: 0; }
.search-field:focus-within { background: var(--ivory); }
.search-field input { flex: 1; border: 0; outline: 0; height: 48px; font-size: var(--fs-md); color: var(--ink); background: transparent; min-width: 0; }
.search-field input::placeholder { color: var(--stone); }
.search-row .btn { height: 48px; padding: 0 22px; }
.quick-links { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: var(--fs-sm); color: rgba(255, 255, 255, .82); }
.quick-links a { color: var(--white); font-weight: 600; }
.quick-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Accesos (comprar / alquilar / vender) ---------- */
.intents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 56px; }
.intent { border: 1px solid var(--line); border-radius: var(--r-md); padding: 28px; display: flex; flex-direction: column; gap: 10px; background: var(--white); }
.intent .btn { margin-top: 10px; align-self: flex-start; }
.intent-art { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--forest-tint); color: var(--forest); display: grid; place-items: center; margin-bottom: 6px; }
.intent-art svg { width: 26px; height: 26px; }
.intent h3 { font-size: var(--fs-lg); }
.intent p { color: var(--stone); max-width: 42ch; }

/* ---------- Secciones ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.section-head h2 { font-size: clamp(1.75rem, 3vw, var(--fs-3xl)); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.page-title { font-size: clamp(1.75rem, 3.4vw, var(--fs-3xl)); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 10px; }
.lead { font-size: var(--fs-lg); line-height: 1.5; max-width: 60ch; margin-top: 8px; }

/* ---------- Tarjetas de propiedad ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.card-grid.compact { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--white); border: 1px solid var(--line);
  box-shadow: var(--shadow-card); cursor: pointer; display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s;
}
.card:hover { box-shadow: var(--shadow-raise); }
.card.highlight { border-color: var(--forest); box-shadow: 0 0 0 1px var(--forest), var(--shadow-raise); }
.card-media { position: relative; aspect-ratio: 3 / 2; background: var(--forest-tint); flex: none; overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; left: 10px; top: 10px; background: var(--white); color: var(--ink);
  font-size: 0.75rem; font-weight: 700; line-height: 1; padding: 6px 9px; border-radius: var(--r-sm);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
}
.badge.rent { background: var(--forest); color: var(--white); }
.badge.done { background: var(--ink); color: var(--white); }
.heart {
  position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .94); display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.heart:hover { background: var(--white); }
.heart svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; transition: transform .15s; }
.heart:active svg { transform: scale(.85); }
.heart.on svg { fill: var(--fav); stroke: var(--fav); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.price { font-size: var(--fs-xl); font-weight: 800; color: var(--ink); letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.price small { font-size: var(--fs-sm); font-weight: 600; color: var(--stone); letter-spacing: 0; margin-left: 2px; }
.facts { display: flex; flex-wrap: nowrap; font-size: var(--fs-sm); color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.facts span:not(:last-child)::after { content: ""; display: inline-block; width: 1px; height: 12px; background: var(--line-strong); margin-inline: 9px; vertical-align: -1px; }
.facts b { font-weight: 700; }
.address { font-size: var(--fs-sm); color: var(--stone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-foot { font-size: var(--fs-xs); color: var(--stone); margin-top: auto; padding-top: 6px; }

/* ---------- Ciudades ---------- */
.city-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.city { position: relative; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; color: var(--white); isolation: isolate; }
.city img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s; }
.city:hover img { transform: scale(1.03); }
.city::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(12, 20, 16, .72), rgba(12, 20, 16, 0) 58%); }
.city div { position: absolute; left: 20px; right: 20px; bottom: 18px; }
.city h3 { color: var(--white); font-size: var(--fs-xl); }
.city p { font-size: var(--fs-sm); color: rgba(255, 255, 255, .9); }

/* ---------- CTA CRM ---------- */
.crm-cta {
  background: var(--forest-deep); color: var(--white); border-radius: var(--r-lg); padding: 44px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap;
}
.crm-cta h2 { color: var(--white); font-size: clamp(1.5625rem, 3vw, var(--fs-2xl)); letter-spacing: -0.02em; margin-bottom: 8px; }
.crm-cta p { color: rgba(255, 255, 255, .84); max-width: 52ch; }

/* ---------- Resultados (mapa + lista) ---------- */
.results-view { display: flex; flex-direction: column; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--white); position: relative; z-index: 5; }
.filter-bar select, .filter-search {
  height: var(--control-h); border: 1px solid var(--line-strong); border-radius: var(--r-sm); background-color: var(--white);
  padding: 0 12px; font-weight: 600; font-size: var(--fs-sm); color: var(--ink);
}
.filter-bar select {
  cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2318211d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.filter-bar select:hover, .filter-search:hover { border-color: var(--stone); }
.filter-bar select:focus, .filter-search:focus-within { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(47, 93, 78, .18); }
.filter-search { display: flex; align-items: center; gap: 8px; width: min(320px, 100%); color: var(--stone); }
.filter-search input { border: 0; outline: 0; flex: 1; min-width: 0; font-weight: 500; font-size: var(--fs-sm); background: transparent; }
#clearFilters { padding: 0 8px; height: var(--control-h); }
.map-toggle { display: none; }
.results-layout { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(540px, 46%); min-height: 0; }
.map-pane { position: relative; min-height: 0; isolation: isolate; }
#map { position: absolute; inset: 0; background: var(--forest-tint); }
.list-pane { overflow-y: auto; padding: 20px 24px 28px; border-left: 1px solid var(--line); overscroll-behavior: contain; }
.list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.list-head h1 { font-size: var(--fs-lg); letter-spacing: -0.01em; }
.list-head .muted { font-size: var(--fs-sm); }
.sort { display: flex; align-items: center; gap: 4px; font-size: var(--fs-sm); color: var(--stone); }
.sort select { border: 0; font-weight: 700; font-size: var(--fs-sm); color: var(--forest); background: none; cursor: pointer; padding: 6px 2px; }
.demo-note { margin-top: 28px; font-size: var(--fs-xs); color: var(--stone); text-align: center; }
.empty { text-align: center; padding: 48px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-title { font-weight: 700; color: var(--ink); font-size: var(--fs-lg); }
.empty .btn { margin-top: 12px; }
#favGrid { margin-top: 28px; }
#favGrid:empty { display: none; }

/* Mapa: tipografía y capas */
.leaflet-container { font-family: inherit; font-size: var(--fs-sm); }
.leaflet-control-zoom a { color: var(--ink); }
.leaflet-control-attribution { font-size: 11px; }
.price-pin {
  background: var(--forest); color: var(--white); font: 700 12px/1 "Manrope", sans-serif; font-variant-numeric: tabular-nums;
  padding: 6px 8px; border-radius: var(--r-sm); white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
  border: 1.5px solid var(--white); transform: translate(-50%, -50%); display: inline-block; cursor: pointer;
}
.price-pin.fav { background: var(--fav); }
.price-pin.active, .price-pin:hover { background: var(--ink); }
.leaflet-marker-icon.pin-active { z-index: 10000 !important; }
.leaflet-div-icon.pin-wrap { background: none; border: 0; }
.leaflet-popup-content { margin: 0; width: 230px !important; }
.leaflet-popup-content-wrapper { padding: 0; overflow: hidden; border-radius: var(--r-md); box-shadow: var(--shadow-raise); }
.map-pop { display: block; color: inherit; }
.map-pop img { width: 100%; height: 130px; object-fit: cover; }
.map-pop div { padding: 10px 12px 12px; }
.map-pop b { font-size: var(--fs-md); color: var(--ink); font-variant-numeric: tabular-nums; }
.map-pop p { font-size: var(--fs-xs); color: var(--stone); margin: 2px 0 0; }

/* ---------- Ficha (ventana) ---------- */
.detail {
  width: min(1000px, 100% - 32px); max-height: min(900px, 100vh - 48px); max-height: min(900px, 100dvh - 48px);
  padding: 0; border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-float); overflow-y: auto; overscroll-behavior: contain;
  color: var(--text);
}
.detail::backdrop { background: rgba(14, 21, 17, .58); }
.detail-inner { position: relative; }
.detail-top {
  position: sticky; top: 0; z-index: 1100; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  height: 64px; padding: 0 16px 0 20px; background: var(--white); border-bottom: 1px solid var(--line);
}
.detail-top .brand { font-size: 1.2rem; }
.detail-top .actions { display: flex; gap: 8px; }
.icon-btn {
  height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); background: var(--white); border-radius: var(--r-sm);
  cursor: pointer; font-weight: 600; font-size: var(--fs-sm); display: inline-flex; gap: 6px; align-items: center; justify-content: center; white-space: nowrap;
}
.icon-btn:hover { border-color: var(--forest); color: var(--forest); }
.icon-btn.on { color: var(--fav); border-color: var(--fav); }
.icon-btn.close { width: 40px; padding: 0; font-size: 1.1rem; }
.gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; height: clamp(280px, 46vh, 440px); }
.gallery img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.gallery img:first-child { grid-row: span 2; }
.detail-content { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 40px; padding: 28px 28px 32px; }
.detail h2 { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.detail h2 small { font-size: var(--fs-md); }
.detail .facts { font-size: var(--fs-md); margin-top: 6px; }
.detail .address { white-space: normal; font-size: var(--fs-md); margin-top: 4px; }
.detail h3 { font-size: var(--fs-lg); margin: 28px 0 12px; }
.detail-desc { max-width: 68ch; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; padding: 0; margin: 0; list-style: none; }
.feature-list li { display: flex; gap: 10px; font-size: 0.9375rem; }
.feature-list li::before { content: "✓"; color: var(--forest); font-weight: 800; flex: none; }
.mini-map { height: 240px; border-radius: var(--r-md); overflow: hidden; margin-top: 10px; isolation: isolate; border: 1px solid var(--line); }
.contact-box { border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; align-self: start; position: sticky; top: 84px; display: flex; flex-direction: column; gap: 10px; background: var(--white); }
.contact-box h4 { font-size: var(--fs-lg); }

/* ---------- Formularios ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.form input, .form select, .form textarea {
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 12px; height: var(--control-h);
  font-weight: 500; font-size: var(--fs-md); background: var(--white); color: var(--ink); width: 100%;
}
.form textarea { resize: vertical; height: auto; min-height: 112px; padding: 10px 12px; line-height: 1.5; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(47, 93, 78, .18); }
.form .btn { width: 100%; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-msg { color: var(--forest); font-weight: 600; font-size: var(--fs-sm); }
.form-error { margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: #fbeaec; color: #a3152b; font-size: var(--fs-sm); font-weight: 600; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form .btn:disabled { opacity: .7; cursor: progress; }
.panel { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; background: var(--white); box-shadow: var(--shadow-card); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 12px; }
.checks li { display: flex; gap: 10px; }
.checks li::before { content: "✓"; color: var(--forest); font-weight: 800; }

/* ---------- Pie ---------- */
.site-footer { background: var(--ivory); border-top: 1px solid var(--line); padding-top: 56px; margin-top: 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.6fr; gap: 32px; }
.footer-grid h4 { font-size: var(--fs-sm); font-weight: 700; margin-bottom: 14px; }
.footer-grid a, .footer-grid .link-btn { display: block; margin-bottom: 10px; font-size: var(--fs-sm); color: var(--text); font-weight: 500; text-align: left; }
.footer-grid a:hover, .footer-grid .link-btn:hover { color: var(--forest); }
.footer-grid .brand { color: var(--forest); font-size: 1.35rem; margin-bottom: 12px; display: inline-flex; }
.footer-grid p { max-width: 44ch; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 22px 0 28px; margin-top: 40px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--stone); }
body.on-results .site-footer { display: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: var(--r-md); font-weight: 600; font-size: var(--fs-sm);
  transition: opacity .2s, transform .2s; z-index: 3000; max-width: calc(100% - 32px); box-shadow: var(--shadow-raise);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .crm-btn { display: none; }
  .main-nav { gap: 20px; }
  .results-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, 50%); }
  .list-pane .card-grid.compact { grid-template-columns: 1fr; }
  .detail-content { gap: 28px; }
}
@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .main-nav, .publish-btn, .fav-label { display: none; }
  .header-actions { margin-left: auto; gap: 4px; }
  .fav-link { padding: 0 10px; }
  .menu-toggle { display: flex; }
  .intents { grid-template-columns: 1fr; gap: 12px; }
  .city-grid { grid-template-columns: 1fr 1fr; }
  .detail-content, .split { grid-template-columns: 1fr; }
  .contact-box { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .results-view { height: auto; }
  .results-layout { grid-template-columns: 1fr; }
  .map-pane { display: none; height: calc(100dvh - var(--header-h) - 140px); min-height: 380px; }
  .results-view.show-map .map-pane { display: block; }
  .results-view.show-map .list-pane { display: none; }
  .map-toggle { display: inline-flex; margin-left: auto; }
  .list-pane { border-left: 0; overflow: visible; }
  .list-pane .card-grid.compact { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  body.on-results .site-footer { display: block; }
  .filter-bar { position: sticky; top: var(--header-h); }
}
@media (max-width: 640px) {
  .section { padding-block: 48px; }
  .brand { font-size: 1.35rem; }
  .hero { min-height: 0; align-items: flex-start; }
  .hero-img { object-position: 70% 50%; }
  .hero-shade { background: linear-gradient(180deg, rgba(14, 21, 17, .7) 0%, rgba(14, 21, 17, .45) 60%, rgba(14, 21, 17, .55) 100%); }
  .hero-content { padding-block: 40px 76px; }
  .hero h1 { font-size: 2.25rem; }
  .hero-sub { font-size: var(--fs-md); }
  .search-card { margin-top: 28px; }
  .search-row { flex-direction: column; }
  .search-row .btn { width: 100%; }
  .hero-caption { right: 16px; bottom: 22px; }
  .intents { padding-top: 32px; }
  .intent { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; row-gap: 4px; padding: 20px; }
  .intent-art { grid-row: span 3; margin: 0; }
  .intent .btn { margin-top: 8px; height: 40px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .city-grid { grid-template-columns: 1fr; }
  .city { aspect-ratio: 16 / 9; }
  .crm-cta { padding: 32px 24px; }
  .crm-cta .btn { width: 100%; white-space: normal; height: auto; min-height: var(--control-h); padding-block: 12px; text-align: center; }
  .filter-bar { padding: 10px 16px; position: static; }
  .filter-search { flex: 1 1 0; width: auto; order: 1; }
  #clearFilters { flex: none; order: 2; }
  .filter-bar select { flex: 1 1 calc(50% - 4px); min-width: 0; order: 3; }
  .map-toggle { order: 4; flex: 1 1 calc(50% - 4px); margin-left: 0; }
  .list-pane { padding: 16px; }
  .list-pane .card-grid.compact { grid-template-columns: 1fr; }
  /* Ficha a pantalla completa en móvil */
  .detail { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border-radius: 0; }
  .detail-top { height: 56px; padding: 0 8px 0 16px; }
  .detail-top .brand { display: none; }
  .detail-top .actions { width: 100%; justify-content: flex-end; }
  .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; height: 260px; gap: 2px; }
  .gallery img { flex: 0 0 100%; scroll-snap-align: start; }
  .detail-content { padding: 20px 16px 28px; gap: 24px; }
  .detail h2 { font-size: var(--fs-xl); }
  .feature-list, .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-grid > div:first-child, .footer-grid > div:last-child { grid-column: 1 / -1; }
  .split { gap: 32px; }
  .panel { padding: 20px; }
}

/* =========================================================
   Tour 360° (ficha de propiedad)
   ========================================================= */
.media-tabs { display: flex; gap: 8px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--white); flex-wrap: wrap; }
.media-tab {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--white); font-weight: 600; font-size: var(--fs-sm); color: var(--ink); cursor: pointer; white-space: nowrap;
}
.media-tab svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.media-tab:hover { border-color: var(--forest); color: var(--forest); }
.media-tab[aria-selected="true"] { background: var(--forest); border-color: var(--forest); color: var(--white); }
.media-tab .tag360 { font-size: 0.6875rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: var(--forest-tint); color: var(--forest-deep); }
.media-tab[aria-selected="true"] .tag360 { background: rgba(255, 255, 255, .2); color: var(--white); }
.media-stage { position: relative; }
.media-stage .gallery { height: clamp(280px, 46vh, 440px); }
.tour-slot, .tour-missing { height: clamp(320px, 56vh, 500px); }

/* Etiqueta 360° en tarjetas */
.badge-360 {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px;
  background: rgba(24, 33, 29, .82); color: var(--white); font-size: 0.75rem; font-weight: 700; line-height: 1;
  padding: 6px 9px; border-radius: var(--r-sm);
}
.badge-360 svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* Visor */
.tour { position: relative; background: #1b221f; overflow: hidden; color: var(--white); user-select: none; -webkit-user-select: none; }
.tour-pano { position: absolute; inset: 0; outline: none; cursor: grab; touch-action: none; }
.tour-pano:active { cursor: grabbing; }
.tour-pano:focus-visible { box-shadow: inset 0 0 0 3px var(--sand); }
.tour-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; color: rgba(255, 255, 255, .9); font-size: var(--fs-sm); }
.tour-state[data-state="error"] p { max-width: 42ch; }
.tour-err-title { font-size: var(--fs-lg); font-weight: 700; color: var(--white); }
.tour-err-actions { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; justify-content: center; }
.btn-ghost-light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .5); }
.btn-ghost-light:hover { border-color: var(--white); }
.tour-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--white); animation: tourspin .9s linear infinite; }
@keyframes tourspin { to { transform: rotate(360deg); } }
.tour-ui { position: absolute; inset: 0; pointer-events: none; }
.tour-top { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tour-room { background: rgba(24, 33, 29, .78); padding: 8px 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour-ctrls, .tour-rooms, .tour-info { pointer-events: auto; }
.tour-ctrls { display: flex; gap: 6px; flex: none; }
.tour-btn { width: 40px; height: 40px; border: 0; border-radius: var(--r-sm); background: rgba(255, 255, 255, .94); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.tour-btn:hover { background: var(--white); color: var(--forest); }
.tour-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tour-btn[aria-pressed="true"] { background: var(--forest); color: var(--white); }
.tour-hint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px;
  background: rgba(24, 33, 29, .78); padding: 10px 14px; border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: 600;
  pointer-events: none; transition: opacity .4s;
}
.tour-hint svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tour-hint.gone { opacity: 0; }
.tour-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.tour-rooms { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-top: 4px; }
.tour-rooms::-webkit-scrollbar { display: none; }
.tour-room-btn {
  flex: none; display: flex; align-items: center; gap: 8px; height: 46px; padding: 4px 12px 4px 4px; border-radius: var(--r-sm); border: 2px solid transparent;
  background: rgba(255, 255, 255, .94); color: var(--ink); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap;
}
.tour-room-btn img { width: 56px; height: 34px; object-fit: cover; border-radius: 4px; }
.tour-room-btn:hover { border-color: rgba(47, 93, 78, .5); }
.tour-room-btn.on { border-color: var(--forest); background: var(--white); color: var(--forest-deep); }
.tour-credit { font-size: 0.6875rem; color: rgba(255, 255, 255, .88); text-shadow: 0 1px 2px rgba(0, 0, 0, .7); text-align: right; }

/* Puntos dentro de la imagen */
.tour-hs { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; transform: translate(-20px, -20px); color: var(--white); font: inherit; }
.tour-hs-dot {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: rgba(255, 255, 255, .95); color: var(--forest); border: 2px solid var(--forest); box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  transition: transform .15s;
}
.tour-hs-dot svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tour-hs--info .tour-hs-dot { color: var(--forest-deep); border-color: var(--sand); }
.tour-hs:hover .tour-hs-dot, .tour-hs:focus-visible .tour-hs-dot { transform: scale(1.1); }
.tour-hs-label { background: rgba(24, 33, 29, .85); padding: 6px 10px; border-radius: var(--r-sm); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.tour-hs--info .tour-hs-label { display: none; }
.tour-hs--info:hover .tour-hs-label, .tour-hs--info:focus-visible .tour-hs-label { display: inline; }
.tour-info {
  position: absolute; left: 50%; top: 64px; transform: translateX(-50%); width: min(340px, calc(100% - 24px));
  background: var(--white); color: var(--text); border-radius: var(--r-md); padding: 14px 40px 14px 16px; box-shadow: var(--shadow-raise);
}
.tour-info-title { font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.tour-info-text { font-size: var(--fs-sm); }
.tour-info-close { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border: 0; background: none; cursor: pointer; font-size: 1rem; color: var(--stone); border-radius: var(--r-sm); }
.tour-info-close:hover { background: var(--ivory); }

/* Pantalla completa */
.tour:fullscreen { width: 100%; height: 100%; }
.tour:-webkit-full-screen { width: 100%; height: 100%; }
.tour--expanded { position: fixed !important; inset: 0; z-index: 5000; height: 100% !important; }

/* Sin tour disponible */
.tour-missing { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; background: var(--ivory); padding: 24px; }
.tour-missing p { max-width: 44ch; color: var(--stone); }
.tour-missing .empty-title { color: var(--ink); }

@media (max-width: 640px) {
  .media-tabs { padding: 10px 12px; gap: 6px; }
  .media-tab { flex: 1 1 0; justify-content: center; padding: 0 8px; }
  .media-stage .gallery { height: 260px; }
  .tour-slot, .tour-missing { height: min(68vh, 520px); }
  .tour-btn[data-act="zoom-in"], .tour-btn[data-act="zoom-out"] { display: none; }
  .tour-room-btn img { display: none; }
  .tour-room-btn { height: 40px; padding: 0 12px; }
  .tour-hs-label { font-size: 0.75rem; padding: 5px 8px; }
  .tour-credit { text-align: left; }
}

/* =========================================================
   Ficha de propiedad (página)
   ========================================================= */
.pp { padding-bottom: 56px; }
.pp-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; }
.pp-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--forest); height: 40px; padding-right: 8px; }
.pp-back svg, .pp-act svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pp-back:hover span { text-decoration: underline; text-underline-offset: 3px; }
.pp-toolbar-actions { display: flex; gap: 6px; }
.pp-act { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; font-weight: 600; font-size: var(--fs-sm); color: var(--ink); cursor: pointer; }
.pp-act:hover { background: var(--forest-tint); }
.save-btn.on svg { fill: var(--fav); stroke: var(--fav); }
.save-btn svg { fill: none; stroke: currentColor; stroke-width: 2; }

.pp-hero { position: relative; display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; height: clamp(320px, 56vh, 520px); border-radius: var(--r-lg); overflow: hidden; }
.pp-hero button { border: 0; padding: 0; cursor: pointer; background: var(--forest-tint); overflow: hidden; position: relative; }
.pp-hero img { width: 100%; height: 100%; object-fit: cover; transition: filter .2s; }
.pp-hero button:hover img { filter: brightness(.92); }
.pp-hero-main { grid-row: span 2; }
.pp-hero-side { display: contents; }
.pp-chips { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.pp-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border: 0; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .96); color: var(--ink); font-weight: 700; font-size: var(--fs-sm); cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.pp-chip svg { width: 18px; height: 18px; fill: none; stroke: var(--forest); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pp-chip:hover { background: var(--white); color: var(--forest); }
.pp-chip[data-lb-open="tour"] { background: var(--forest); color: var(--white); }
.pp-chip[data-lb-open="tour"] svg { stroke: var(--white); }
.pp-chip[data-lb-open="tour"]:hover { background: var(--forest-deep); color: var(--white); }

.pp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; margin-top: 28px; align-items: start; }
.pp-status { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink); flex-wrap: wrap; }
.pp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--forest); }
.pp-dot.rent { background: var(--sand); }
.pp-dot.done { background: var(--stone); }
.pp-hero--single { grid-template-columns: 1fr; }
.pp-hero-empty { background: var(--forest-tint); }
.pp-hero-empty img { object-fit: contain !important; }
.pp-hero:has(.pp-hero-empty) { height: clamp(220px, 38vh, 360px); }
.pp-pill { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--forest-tint); color: var(--forest-deep); }
.pp-pill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.pp-headline { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 10px; flex-wrap: wrap; }
.pp-price { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pp-price small { font-size: var(--fs-lg); font-weight: 600; color: var(--stone); letter-spacing: 0; }
.pp-address { color: var(--text); margin-top: 4px; }
.pp-bigfacts { display: flex; gap: 28px; }
.pp-bigfacts div { display: flex; flex-direction: column; line-height: 1.1; }
.pp-bigfacts b { font-size: var(--fs-2xl); font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.pp-bigfacts span { font-size: var(--fs-sm); color: var(--stone); }
.pp-cuota { margin-top: 14px; font-size: var(--fs-sm); }
.pp-cuota b { color: var(--ink); }
.pp-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 22px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.pp-quick div { background: var(--white); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.pp-quick span { font-size: var(--fs-xs); color: var(--stone); }
.pp-quick b { color: var(--ink); font-variant-numeric: tabular-nums; }
.pp-sec { padding-top: 36px; margin-top: 36px; border-top: 1px solid var(--line); }
.pp-sec h2 { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.015em; margin-bottom: 16px; }
.pp-sec h3 { font-size: var(--fs-md); margin-bottom: 8px; }
.pp-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pp-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; }
.pp-tags li { background: var(--ivory); border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.pp-desc { max-width: 68ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pp-desc.open { display: block; }
#ppMore { margin-top: 6px; }
.pp-stats { margin-top: 16px; font-size: var(--fs-sm); color: var(--stone); }
.pp-tourcard { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: center; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; }
.pp-tourcard-media { position: relative; border: 0; padding: 0; border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 16 / 9; cursor: pointer; background: #1b221f; }
.pp-tourcard-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.35); }
.pp-tourcard-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; background: var(--forest); color: var(--white); font-weight: 700; padding: 10px 16px; border-radius: var(--r-sm); white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.pp-tourcard-play svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.pp-tourcard-media:hover .pp-tourcard-play { background: var(--forest-deep); }
.pp-tourcard-title { font-weight: 700; color: var(--ink); font-size: var(--fs-lg); margin-bottom: 4px; }
.pp-rooms { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pp-room { border: 1px solid var(--line-strong); background: var(--white); border-radius: 999px; padding: 6px 12px; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; color: var(--ink); }
.pp-room:hover { border-color: var(--forest); color: var(--forest); }
.pp-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pp-photos button { border: 0; padding: 0; aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden; cursor: pointer; background: var(--forest-tint); }
.pp-photos img { width: 100%; height: 100%; object-fit: cover; }
.pp-photos button:hover img { filter: brightness(.92); }
.pp-features { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; }
.pp-features ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 0.9375rem; }
.pp-features li::before { content: "•"; color: var(--forest); font-weight: 800; margin-right: 8px; }
.pp-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.pp-table th { text-align: left; font-size: var(--fs-xs); color: var(--stone); font-weight: 700; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pp-table td { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.pp-var { margin-left: 8px; font-size: var(--fs-xs); font-weight: 700; color: var(--forest); }
.pp-map { height: 320px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); margin-top: 12px; isolation: isolate; }

.pp-aside { position: sticky; top: calc(var(--header-h) + 64px + 20px); }
.pp-agent { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-card); background: var(--white); }
.pp-agent-label { font-size: var(--fs-xs); color: var(--stone); font-weight: 600; }
.pp-agent-row { display: flex; align-items: center; gap: 12px; }
.pp-agent-name { font-weight: 700; color: var(--ink); }
.pp-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--forest-tint); color: var(--forest-deep); display: grid; place-items: center; font-weight: 800; flex: none; }
.pp-avatar.sm { width: 28px; height: 28px; font-size: 0.7rem; }
.pp-agent-tel { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--forest); font-size: var(--fs-sm); }
.pp-agent-tel svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.pp-agent .btn { width: 100%; }
.pp-ctabar { display: none; }

/* Barra fija superior al bajar */
.pp-subnav { position: fixed; left: 0; right: 0; top: var(--header-h); z-index: 1100; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 6px 16px rgba(24, 33, 29, .08); transform: translateY(-110%); visibility: hidden; transition: transform .2s, visibility .2s; }
.pp-subnav.show { transform: none; visibility: visible; }
.pp-subnav-inner { width: min(1200px, 100% - 32px); margin-inline: auto; display: flex; align-items: center; gap: 20px; height: 64px; }
.pp-subnav-chips { display: flex; gap: 6px; }
.pp-subnav .pp-chip { box-shadow: none; border: 1px solid var(--line-strong); height: 38px; }
.pp-subnav .pp-chip[data-lb-open="tour"] { border-color: var(--forest); }
.pp-subnav-price { display: flex; flex-direction: column; line-height: 1.2; margin-left: auto; text-align: right; }
.pp-subnav-price b { font-size: var(--fs-lg); color: var(--ink); font-variant-numeric: tabular-nums; }
.pp-subnav-price b small { font-size: var(--fs-sm); color: var(--stone); }
.pp-subnav-price span { font-size: var(--fs-xs); color: var(--stone); }

/* Contacto */
.contact-dlg { width: min(520px, 100% - 24px); border: 0; border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-float); color: var(--text); }
.contact-dlg::backdrop { background: rgba(14, 21, 17, .58); }
.contact-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.contact-head h2 { font-size: var(--fs-xl); }
.check-row { flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-weight: 500 !important; }
.check-row input { width: 18px !important; height: 18px !important; margin-top: 2px; accent-color: var(--forest); flex: none; }

/* =========================================================
   Visor a pantalla completa: Fotos · Tour 360° · Plano
   ========================================================= */
.lb { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #141a17; color: var(--white); overflow: hidden; }
.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb::backdrop { background: #141a17; }
body.lb-open { overflow: hidden; }
.lb-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 12px 16px; }
.lb-left, .lb-right { display: flex; align-items: center; gap: 8px; }
.lb-right { justify-content: flex-end; }
.lb-icon { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: var(--white); display: grid; place-items: center; cursor: pointer; }
.lb-icon:hover { background: rgba(255, 255, 255, .22); }
.lb-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-icon.save-btn span { display: none; }
.lb-icon.save-btn.on svg { fill: var(--fav); stroke: var(--fav); }
.lb-agent { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .12); padding: 5px 12px 5px 5px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; }
.lb-tabs { display: inline-flex; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 4px; gap: 2px; }
.lb-tab { border: 0; background: none; color: rgba(255, 255, 255, .85); font-weight: 700; font-size: var(--fs-sm); padding: 8px 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.lb-tab:hover { color: var(--white); }
.lb-tab[aria-selected="true"] { background: var(--white); color: var(--forest-deep); }
.lb-stage { position: relative; min-height: 0; }
.lb-pane { position: absolute; inset: 0; }
.lb-pane.tour { position: absolute; }

/* Fotos */
.lb-photo-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 72px 12px; }
.lb-photo { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-sm); user-select: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.lb-nav:hover { background: var(--white); color: var(--forest); }
.lb-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lb-nav.prev { left: 14px; }
.lb-nav.next { right: 14px; }
.lb-counter { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); background: rgba(20, 26, 23, .78); padding: 6px 12px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.lb-pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }
.lb-pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lb-allbtn { position: absolute; left: 86px; top: 12px; }
.lb-grid { position: absolute; inset: 0; overflow-y: auto; padding: 8px 16px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; align-content: start; }
.lb-grid button { border: 0; padding: 0; aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden; cursor: pointer; background: #222a26; }
.lb-grid img { width: 100%; height: 100%; object-fit: cover; }
.lb-grid button:hover img { filter: brightness(1.08); }

/* Tour dentro del visor */
.tour--embedded { position: absolute !important; inset: 0; height: auto !important; }

/* Plano */
.lb-plan { background: var(--ivory); color: var(--text); overflow: auto; }
.lb-plan-inner { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
.lb-plan-svg { width: min(900px, 100%); }
.lb-plan-foot { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; align-items: center; font-size: var(--fs-sm); }
.lb-legend { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.lg-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--forest); border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--forest); }
.pl-svg { width: 100%; height: auto; display: block; font-family: inherit; }
.pl-outline { fill: var(--white); stroke: var(--forest-deep); stroke-width: 0.9; }
.pl-room rect { fill: var(--white); stroke: var(--forest); stroke-width: 0.45; transition: fill .15s; }
.pl-room text { font-size: 3px; font-weight: 700; fill: var(--ink); pointer-events: none; }
.pl-dot { fill: var(--forest); stroke: var(--white); stroke-width: 0.6; }
.pl-room { cursor: pointer; outline: none; }
.pl-room:hover rect, .pl-room:focus-visible rect { fill: var(--forest-tint); }
.pl-room.on rect { fill: #d6e5dc; stroke: var(--forest-deep); stroke-width: 0.8; }
.pl-room.on .pl-dot { fill: var(--sand); }

/* Barra inferior fija */
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 20px; background: var(--white); color: var(--text); }
.lb-bar-info p:first-child { display: flex; align-items: baseline; gap: 10px; }
.lb-bar-info b { font-size: var(--fs-xl); color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-bar-info b small { font-size: var(--fs-sm); color: var(--stone); }
.lb-bar-info span { font-size: var(--fs-sm); color: var(--ink); }
.lb-bar-addr { font-size: var(--fs-sm); color: var(--stone); }
.lb-bar-actions { display: flex; gap: 10px; }

/* Puntos de navegación en el suelo y mini plano */
.tour-hs--nav { flex-direction: column; gap: 6px; transform: translate(-50%, -78%); }
.tour-hs-floor {
  width: 64px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .28); border: 2px solid rgba(255, 255, 255, .95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .15), 0 4px 10px rgba(0, 0, 0, .25); backdrop-filter: blur(2px); transition: transform .15s, background .15s;
}
.tour-hs-floor svg { width: 18px; height: 18px; fill: none; stroke: var(--white); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.tour-hs--nav .tour-hs-label { background: none; padding: 0; font-size: 0.875rem; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .8), 0 0 8px rgba(0, 0, 0, .5); }
.tour-hs--nav:hover .tour-hs-floor, .tour-hs--nav:focus-visible .tour-hs-floor { transform: scale(1.12); background: rgba(47, 93, 78, .7); }
.tour-hs--info { transform: translate(-20px, -20px); }
.tour-minimap {
  position: absolute; right: 12px; top: 62px; width: 190px; border: 0; padding: 10px; border-radius: var(--r-md); background: rgba(255, 255, 255, .94);
  color: var(--ink); text-align: left; cursor: pointer; pointer-events: auto; box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.tour-minimap:hover { background: var(--white); }
.tour-minimap-name { display: block; font-size: var(--fs-xs); font-weight: 700; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour-minimap .pl-room { pointer-events: none; }

@media (max-width: 960px) {
  .pp-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .pp-main { min-width: 0; }
  .pp-aside { position: static; margin-top: 36px; }
  .pp-ctabar { display: flex; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -6px 16px rgba(24, 33, 29, .08); }
  .pp-ctabar .btn { flex: 1; }
  body:has(.pp-ctabar) .site-footer { padding-bottom: 72px; }
  .pp-subnav-chips .pp-chip span { display: none; }
  .pp-subnav-chips .pp-chip { width: 40px; padding: 0; justify-content: center; }
  .lb-agent { display: none; }
  .lb-bar { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .pp-toolbar { padding: 8px 0; }
  .pp-toolbar .pp-act span { display: none; }
  .pp-hero { grid-template-columns: 1fr; grid-template-rows: 1fr; height: 300px; margin-inline: -16px; border-radius: 0; }
  .pp-hero-side { display: none; }
  .pp-chips { left: 12px; right: 12px; bottom: 12px; gap: 6px; }
  .pp-chip { height: 36px; padding: 0 10px; font-size: 0.8125rem; }
  .pp-headline { flex-direction: column; align-items: flex-start; gap: 12px; }
  .pp-bigfacts { gap: 22px; }
  .pp-bigfacts b { font-size: var(--fs-xl); }
  .pp-quick { grid-template-columns: 1fr 1fr; }
  .pp-tourcard, .pp-features { grid-template-columns: 1fr; }
  .pp-photos { grid-template-columns: 1fr 1fr; }
  .pp-subnav-price span { display: none; }
  .pp-subnav-inner { gap: 10px; }
  .lb-top { grid-template-columns: auto 1fr auto; padding: 8px 10px; gap: 8px; }
  .lb-tabs { justify-self: center; }
  .lb-tab { padding: 7px 11px; font-size: 0.8125rem; }
  .lb-right .lb-icon[data-lb-share] { display: none; }
  .lb-photo-wrap { padding: 0 0 8px; }
  .lb-photo { border-radius: 0; }
  .lb-nav { width: 40px; height: 40px; background: rgba(255, 255, 255, .8); }
  .lb-nav.prev { left: 8px; }
  .lb-nav.next { right: 8px; }
  .lb-allbtn { left: 8px; top: 8px; }
  .lb-grid { grid-template-columns: 1fr 1fr; padding: 4px 8px 8px; gap: 4px; }
  .lb-bar { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .lb-bar-addr { display: none; }
  .lb-bar-info b { font-size: var(--fs-lg); }
  .lb-bar-actions { width: 100%; }
  .lb-bar-actions .btn { flex: 1; height: 42px; padding: 0 10px; }
  .tour-minimap { width: 128px; top: 58px; padding: 7px; }
  .tour-hs-floor { width: 52px; height: 22px; }
  .tour--embedded .tour-bottom { padding-bottom: 6px; }
}

/* =========================================================
   El barrio (ficha de propiedad)
   ========================================================= */
.nb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.nb-head h2 { margin-bottom: 4px; }
.nb-score { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 16px 10px 10px; background: var(--white); cursor: help; }
.nb-score-num {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; align-content: center; line-height: 1; flex: none;
  background: conic-gradient(var(--forest) calc(var(--v) * 1%), var(--forest-tint) 0); position: relative;
}
.nb-score-num::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--white); }
.nb-score-num b, .nb-score-num span { position: relative; }
.nb-score-num b { font-size: var(--fs-lg); font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.nb-score-num span { font-size: 0.6875rem; color: var(--stone); }
.nb-score-title { font-size: var(--fs-xs); color: var(--stone); font-weight: 600; }
.nb-score-level { font-weight: 800; color: var(--ink); }
.nb-score-note { font-size: 0.6875rem; color: var(--stone); }
.nb-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.nb-chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--white); font-weight: 600; font-size: var(--fs-sm); color: var(--ink); cursor: pointer; }
.nb-chip:hover { border-color: var(--forest); }
.nb-chip.on { background: var(--forest); border-color: var(--forest); color: var(--white); }
.nb-n { font-size: 0.75rem; font-weight: 700; color: var(--stone); font-variant-numeric: tabular-nums; }
.nb-chip.on .nb-n { color: rgba(255, 255, 255, .8); }
.nb-sw { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.nb-chip.on .nb-sw { box-shadow: 0 0 0 2px var(--white); }
.nb-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.nb-map { height: 380px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); isolation: isolate; }
.nb-list { max-height: 380px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.nb-list ul { list-style: none; padding: 0; margin: 0; }
.nb-list-title { font-size: var(--fs-xs); font-weight: 700; color: var(--stone); margin-bottom: 4px; }
.nb-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.nb-item:last-child { border-bottom: 0; }
.nb-item .nb-sw { margin-top: 6px; }
.nb-cat { font-size: var(--fs-xs); font-weight: 700; color: var(--stone); }
.nb-name { font-weight: 700; color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; }
.nb-dist { text-align: right; display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; }
.nb-dist b { color: var(--ink); font-variant-numeric: tabular-nums; }
.nb-dist span { font-size: var(--fs-xs); color: var(--stone); }
.nb-home-wrap { background: none; border: 0; }
.nb-home { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--forest); border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--forest), 0 2px 8px rgba(0, 0, 0, .35); transform: translate(-50%, -50%); }
.nb-commute { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; background: var(--ivory); display: flex; flex-direction: column; gap: 10px; }
.nb-commute label { color: var(--ink); }
.nb-commute-row { display: flex; gap: 8px; }
.nb-commute-row input { flex: 1; min-width: 0; height: var(--control-h); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 12px; background: var(--white); font-size: var(--fs-md); }
.nb-commute-row input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(47, 93, 78, .18); }
.nb-dest { font-size: var(--fs-sm); color: var(--ink); }
.nb-dest span { color: var(--stone); }
.nb-dest .link-btn { margin-left: 8px; font-size: var(--fs-sm); }
.nb-times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.nb-times div { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; line-height: 1.25; }
.nb-times b { color: var(--ink); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.nb-times span { font-size: var(--fs-xs); color: var(--stone); }
.nb-err { color: var(--fav); font-size: var(--fs-sm); font-weight: 600; }
.nb-source { margin-top: 10px; font-size: var(--fs-xs); color: var(--stone); }
.nb-source a { color: var(--forest); text-decoration: underline; }
.pp-similar { margin-top: 4px; }
@media (max-width: 900px) {
  .nb-grid { grid-template-columns: 1fr; }
  .nb-map { height: 300px; }
  .nb-list { max-height: none; }
}
@media (max-width: 640px) {
  .nb-head { flex-direction: column; }
  .nb-score { width: 100%; }
  .nb-filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .nb-filters::-webkit-scrollbar { display: none; }
  .nb-chip { flex: none; }
  .nb-times { grid-template-columns: 1fr 1fr; }
  .nb-commute-row { flex-direction: column; }
}
