/* V3 Noir editorial — capa progresiva sobre los componentes probados. */
[data-theme="dark"] {
  color-scheme: dark;
  --v-bg:#0b0d0f; --v-surface:#101316; --v-card:#151a1e;
  --v-elevated:#1b2126; --v-ink:#f3eee4; --v-accent:#39A5DD;
  --p-ink:var(--v-bg); --p-ink-2:var(--v-surface); --p-ink-3:var(--v-card);
  --p-bone:var(--v-bg); --p-bone-2:var(--v-surface); --p-white:var(--v-surface);
  --p-t-ink:var(--v-ink); --p-t-body:rgba(243,238,228,.82);
  --p-t-mute:rgba(243,238,228,.70); --p-t-bone:var(--v-ink);
  --p-t-bone-2:rgba(243,238,228,.82); --p-t-bone-3:rgba(243,238,228,.70);
  --p-line-light:rgba(243,238,228,.18); --p-line-dark:rgba(243,238,228,.18);
  --p-line-dark-2:rgba(243,238,228,.10);
  --p-mag-soft:var(--v-accent); --p-mag-deep:var(--v-accent);
  --p-display:'Barlow Condensed','Archivo',Impact,sans-serif; --p-gut:clamp(20px,4vw,64px);
}
body.page-premium, body.home-premium, body.page-premium:not(.home-premium) { background:var(--v-bg); color:var(--v-ink); }
::selection { background:var(--v-accent); color:#0b0d0f; }
:focus-visible { outline:2px solid var(--v-accent); outline-offset:3px; }
.p-h1,.p-h2,.p-h3,.p-card__title,.f-block__title,.p-post h3 {
  font-family:var(--p-display); font-weight:600; text-transform:uppercase; letter-spacing:.005em; line-height:1.06;
}
.p-h1 { font-size:clamp(44px,6.4vw,104px); }
.p-h2 { font-size:clamp(34px,4.2vw,64px); }
.p-h1 em,.p-h2 em { color:var(--v-accent); font-weight:inherit; font-style:normal; }
.p-eyebrow,.p-sec--ink .p-eyebrow,.p-sec--ink-2 .p-eyebrow,.p-hero .p-eyebrow {
  color:var(--v-accent); font-family:var(--p-mono); font-size:12px; font-weight:400; letter-spacing:.12em;
}
.p-eyebrow::before { width:28px; }
.p-lead { font-size:clamp(16px,1.15vw,17.5px); line-height:1.7; }
.p-mono,.s-migas,.s-head__tiny,.s-filters__title,.s-filters summary,.s-filters .p-field label,
.s-filters .ayuda,.s-filters .chk em,.s-bar__count,.s-orden label,.s-chip,.s-chips__clear {
  font-family:var(--p-mono); font-size:12px; letter-spacing:.06em;
}
.s-filters .ayuda { font-family:var(--p-sans); }
.p-head--solid,.p-head.is-stuck { background:rgba(11,13,15,.94); }
.p-brand img { height: 56px; width: auto; transition: height .35s var(--p-ease); }
.p-head.is-stuck .p-brand img { height: 44px; }
@media (max-width: 980px) {
  .p-brand img { height: 46px; }
  .p-head.is-stuck .p-brand img { height: 40px; }
}
.p-head__cta,.p-burger { min-height:44px; min-width:44px; }
.p-nav a::after { background:var(--v-accent); }
.p-hero__in { max-width:var(--p-max); }
.p-hero__h1 { max-width:17ch; }
.p-hero__lead { color:rgba(243,238,228,.9); }
.p-sec--ink,.p-sec--ink-2 { background:var(--v-bg); }
.p-sec--bone,.p-sec--white { background:var(--v-surface); }
.p-listings { gap:24px; }
.p-card,.p-card--light { background:var(--v-card); color:var(--v-ink); border:1px solid rgba(243,238,228,.1); }
.p-card__title,.p-card--light .p-card__title { color:var(--v-ink); font-size:clamp(23px,2vw,30px); }
.p-card__price,.p-card--light .p-card__price { color:var(--v-ink); font-family:var(--p-display); font-weight:600; font-size:clamp(26px,2.5vw,34px); }
.p-card__price small,.p-card--light .p-card__price small,.p-card__where,.p-card--light .p-card__where,
.p-card__specs,.p-card--light .p-card__specs { color:rgba(243,238,228,.78); font-family:var(--p-mono); font-size:12px; letter-spacing:.02em; }
.p-card__id,.p-card__chars { display:none; }
.p-card__badge,.p-card--light .p-card__badge { background:rgba(11,13,15,.88); color:var(--v-ink); border:1px solid rgba(243,238,228,.25); font:600 12px var(--p-sans); }
.p-card__badge--destacado { color:var(--v-accent); }
.p-card__sinfoto { background:var(--v-elevated); color:rgba(243,238,228,.8); font:400 12px var(--p-sans); }
.p-card:hover .p-card__go { background:var(--v-accent); border-color:var(--v-accent); color:#0b0d0f; }
.p-card__title a:hover,.s-migas a:hover { color:var(--v-accent); }
.p-field label { font-family:var(--p-sans); font-size:12px; letter-spacing:.04em; }
.p-search { background:var(--v-bg); }
.p-trust { padding-block:32px 64px; }
.p-trust .p-hero__stats { margin-top:0; }
.p-stat b { font-weight:600; }
.p-stat span { font-family:var(--p-mono); font-size:12px; letter-spacing:.04em; color:rgba(243,238,228,.76); }
.f-galeria { margin-bottom:0; padding-block:0; }
.f-galeria__nota { margin-bottom:24px; }
.f-galeria__nota,.f-head__ubi,.f-tarifa dt,.f-tarifa dd span,.f-tarifa em {
  font-family:var(--p-mono); font-size:12px; letter-spacing:.04em;
}
.f-contacto__nota { font-family:var(--p-sans); font-size:12px; letter-spacing:.04em; }
.p-search__in { background:var(--v-card); padding:22px 24px; }
.p-search__submit { background:var(--v-accent); color:#0b0d0f; }
.p-search__submit::before { background:#6FC0EA; }
.p-search__submit:focus-visible { outline-color:var(--v-ink); }
.s-filters { background:var(--v-surface); min-height:0; }
.s-filters__body { min-height:0; flex:1 1 auto; }
.s-filters__acciones { position:static; flex:0 0 auto; background:var(--v-surface); }
.s-filters input[type=checkbox] { accent-color:var(--v-accent); }
.s-orden select { min-height:44px; }
.f-head__h1 { text-transform:uppercase; }
.f-tarifa dd strong,.f-specs--primarios dd strong { font-family:var(--p-display); font-weight:600; }
.f-contacto { background:var(--v-card); }
.f-contacto__acciones .p-btn { min-height:48px; }
.p-foot { background:var(--v-bg); }
.p-foot__word { font-family:var(--p-display); font-weight:600; text-transform:uppercase; }
@media (max-width:900px) {
  .p-head__actions { margin-left:auto; }
  .s-filters.panel--filtros { max-height:100dvh; }
  .s-filters__acciones { padding-bottom:max(18px,env(safe-area-inset-bottom)); }
}
@media (max-width:640px) {
  .p-h1 { font-size:clamp(42px,11vw,58px); }
  .p-hero__h1 { max-width:17ch; }
  .p-search__in { padding:16px; }
  .p-listings { gap:18px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* ==========================================================================
   Buscador + filtros · mejoras de UI/UX (auditoría con Opus)
   ========================================================================== */

/* 0) Utilidad: etiqueta solo para lectores de pantalla (evita el doble rótulo) */
.p-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* 1) Jerarquía: el título de cada sección deja de ser micro-mono en mayúsculas */
.s-filters summary {
  font: 600 14px/1.3 var(--p-sans);
  letter-spacing: 0;
  text-transform: none;
  color: var(--p-t-ink);
  min-height: 48px;
  padding: 18px 0;
}
.s-filters summary::after { font-size: 16px; color: var(--p-t-mute); }
.s-filters details[open] summary { color: var(--t-ink, var(--p-t-ink)); }

/* 2) Campos: caja visible, 44px de alto y foco azul (antes eran solo una línea) */
.s-filters .p-field select,
.s-filters .p-field input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--p-line-light);
  background: var(--v-elevated);
  border-radius: 2px;
  color: var(--p-t-ink);
  width: 100%;
}
.s-filters .p-field select:focus,
.s-filters .p-field input:focus {
  border-color: var(--v-accent);
  outline: none;
}
.s-filters .p-field { padding-bottom: 14px; }

/* 3) Estado activo: borde y label azules; los valores por defecto quedan neutros */
.s-filters .is-activo > label,
.s-filters .is-activo summary { color: var(--v-accent); }
.s-filters .is-activo select,
.s-filters .is-activo input,
.s-filters .p-field input:not(:placeholder-shown) { border-color: var(--v-accent); }

/* 4) Prefijo de moneda en los rangos de precio */
.s-filters__rango .p-field { position: relative; }
.s-filters__rango .p-field input[name^="precio"] { padding-left: 26px; }
.s-filters__rango .p-field:has(input[name^="precio"]) label { padding-left: 14px; }
.s-filters__rango .p-field:has(input[name^="precio"])::before {
  content: "$";
  position: absolute;
  left: 12px;
  top: 31px;
  color: var(--p-t-mute);
  font-size: 13px;
  pointer-events: none;
}

/* 5) Zonas táctiles de 44px (chips, limpiar, checkboxes) */
.s-filters .chk { min-height: 44px; cursor: pointer; }
.s-chips .s-chip a,
.s-chips .s-chip { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.s-chips__clear { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 10px; }
.s-chips .s-chip { font: 500 13px/1.2 var(--p-sans); letter-spacing: 0; text-transform: none; }
.s-chips__clear { font: 500 13px/1.2 var(--p-sans); letter-spacing: 0; text-transform: none; }

/* 6) Acciones del panel: sticky y visibles en móvil (noir las había dejado estáticas) */
.s-filters__acciones {
  position: sticky !important;
  bottom: 0;
  z-index: 2;
  grid-template-columns: 2fr 1fr;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}
.s-filters__acciones .p-btn { min-height: 46px; }

/* 7) BUSCAR ocupa todo el alto del bloque y llega al borde derecho */
@media (min-width: 901px) {
  .p-search__in { padding: 0 0 0 24px; }
  .p-search__submit { min-width: 148px; }
}

/* 8) "Afinar la búsqueda" es acción secundaria, no un segundo CTA azul */
.p-search .p-advanced > summary,
.p-advanced > summary {
  color: var(--p-t-body);
  font: 500 13px/1.2 var(--p-sans);
  letter-spacing: 0;
  text-transform: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.p-advanced > summary::after { color: var(--v-accent); text-decoration: none; }

/* 9) Ayuda bajo el buscador */
.p-search__ayuda {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--p-t-mute);
}
@media (max-width: 900px) { .p-search__ayuda { padding-inline: 22px; } }

/* El último campo no debe quedar pegado a las acciones sticky del panel */
.s-filters__body { padding-bottom: 24px; }
.s-filters details:last-of-type .p-field:last-child { padding-bottom: 4px; }

/* --- Características del panel de filtros --------------------------------- */
.s-filters__buscar {
  width: 100%;
  min-height: 44px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--p-line-light);
  border-radius: 2px;
  background: var(--v-elevated);
  color: var(--p-t-ink);
  font-size: 13px;
}
.s-filters__buscar::-webkit-search-cancel-button { filter: invert(1) opacity(.6); }
.s-filters__buscar:focus { border-color: var(--v-accent); outline: none; }

/* Fila de característica: caja, marca de selección y mejor contraste del icono */
.s-filters .chk {
  position: relative;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 2px;
  gap: 10px;
}
.s-filters .chk + .chk { margin-top: 2px; }
.s-filters .chk:hover { background: color-mix(in srgb, var(--v-accent) 8%, transparent); }
.s-filters .chk__txt { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.s-filters .chk__txt .ic { width: 15px; height: 15px; opacity: .85; color: var(--p-t-body); flex: 0 0 auto; }
.s-filters .chk em { font-style: normal; font-size: 11px; color: var(--p-t-mute); }

/* La casilla nativa se oculta y se dibuja una marca más clara */
.s-filters .chk input {
  position: absolute; opacity: 0; width: 1px; height: 1px;
}
.s-filters .chk__marca {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  border: 1px solid var(--p-line-light);
  border-radius: 2px;
  display: grid; place-items: center;
  background: transparent;
}
.s-filters .chk:has(input:checked) {
  border-color: var(--p-mag);
  background: color-mix(in srgb, var(--p-mag) 10%, transparent);
}
.s-filters .chk:has(input:checked) .chk__marca {
  background: var(--p-mag);
  border-color: var(--p-mag);
}
.s-filters .chk:has(input:checked) .chk__marca::after {
  content: "";
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.s-filters .chk:has(input:checked) .chk__txt { color: var(--p-t-ink); }
.s-filters .chk:has(input:focus-visible) { outline: 2px solid var(--v-accent); outline-offset: 2px; }
.s-filters__sinresultados { margin: 6px 0 0; font-size: 12.5px; color: var(--p-t-mute); }

/* "Limpiar" inactivo no parece accionable */
.s-filters__acciones .p-btn.is-inactivo { opacity: .45; pointer-events: none; }

/* Scrollbar del panel en armonía con el tema oscuro */
.s-filters, .s-filters__body { scrollbar-color: var(--p-line-light) transparent; scrollbar-width: thin; }
.s-filters::-webkit-scrollbar, .s-filters__body::-webkit-scrollbar { width: 8px; }
.s-filters::-webkit-scrollbar-track, .s-filters__body::-webkit-scrollbar-track { background: transparent; }
.s-filters::-webkit-scrollbar-thumb, .s-filters__body::-webkit-scrollbar-thumb { background: var(--p-line-light); border-radius: 4px; }

/* ==========================================================================
   Buscador · segunda pasada (QA visual con Opus)
   ========================================================================== */

/* 1) Cuatro columnas iguales + borde que cierra la barra */
@media (min-width: 901px) {
  .p-search__in {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    border: 1px solid var(--p-line-light);
    background: var(--v-card);
  }
  .p-search__in .p-field { border-right: 1px solid var(--p-line-light); }
  .p-search__in .p-field:first-child { padding-left: 24px; }
}

/* 2) Labels en una sola línea y con la misma línea base */
.p-search .p-field label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  display: block;
}

/* 3) Estado deshabilitado legible */
.p-search input:disabled {
  cursor: not-allowed;
  color: var(--p-t-mute);
  opacity: .55;
}
.p-search .p-field:has(input:disabled) label { opacity: .55; }

/* 4) Iconos del mismo set: chevron de trazo en vez del triángulo nativo */
.p-search .p-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A8F98' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 16px 16px;
  padding-right: 22px;
}

/* 5) La ayuda queda pegada a su campo y desaparece al elegir operación */
.p-search__ayuda {
  margin: 10px 0 0;
  text-align: right;
  font-size: 12.5px;
  color: var(--p-t-mute);
  max-width: 46ch;
  margin-left: auto;
}
.p-search__ayuda[hidden] { display: none; }
.p-search__extra {
  border-top: 1px solid var(--p-line-light);
  margin-top: 14px;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

/* 6) Fila de pie en una sola voz: mono, mayúsculas y tracking como el pie del bloque */
.p-search .p-advanced > summary {
  font-family: var(--p-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--v-accent);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.p-search .p-advanced > summary::after { text-decoration: none; }

/* 7) El texto de BUSCAR con más presencia */
.p-search__submit { font-weight: 600; letter-spacing: .14em; }

/* ==========================================================================
   Filtros · tercera pasada (QA visual con Opus sobre el resultado ejecutado)
   ========================================================================== */

/* A) Rail de escritorio: columna flex con un solo scroll (sin scroll anidado) */
@media (min-width: 981px) {
  .s-filters {
    position: sticky;
    top: 96px;
    max-height: calc(100dvh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .s-filters__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
  .s-filters__acciones {
    position: static !important;
    flex: 0 0 auto;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding-top: 14px;
  }
}
/* sin flechas nativas de scrollbar */
.s-filters::-webkit-scrollbar-button,
.s-filters__body::-webkit-scrollbar-button { display: none; height: 0; width: 0; }

/* B) Botones de acción del panel: una sola línea, siempre */
.s-filters__acciones .p-btn {
  white-space: nowrap;
  font-size: 11px;
  letter-spacing: .1em;
  padding-inline: 14px;
  min-height: 44px;
}
.s-filters__acciones .p-btn--ink { padding-inline: 12px; }

/* C) Chevron de trazo en los selects del panel (mismo set que el buscador) */
.s-filters .p-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A8F98' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  padding-right: 38px;
}

/* D) El "$" alineado con el texto del campo (antes iba posicionado a ojo) */
.s-filters__rango .p-field:has(input[name^="precio"])::before { content: none; }
.s-filters__rango .p-field input[name^="precio"] {
  padding-left: 26px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A8F98' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 3v18M16 7H10.5a3 3 0 0 0 0 6h3a3 3 0 0 1 0 6H8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 10px center;
  background-size: 12px 12px;
}

/* E) Valor activo en el encabezado plegado */
.s-filters summary { display: flex; align-items: center; gap: 10px; }
.s-filters summary::after { margin-left: auto; }
.s-filters__val {
  margin-left: auto;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--p-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--v-accent);
}
.s-filters summary::after { margin-left: 0; }

/* F) Buscador: paddings iguales en las cuatro columnas */
@media (min-width: 901px) {
  .p-search__in .p-field { padding: 22px 24px; }
  .p-search__in .p-field:first-child { padding-left: 24px; }
  .p-search__in .p-field:last-of-type { border-right: 1px solid var(--p-line-light); }
}

/* G) Chips del listado: densidad de escritorio (60px era demasiado) */
@media (min-width: 981px) {
  .s-chips .s-chip, .s-chips .s-chip a { min-height: 34px; padding: 6px 12px; }
  .s-chips__clear { min-height: 34px; }
}

/* Chip: el padding lo lleva el enlace, no el contenedor (evitaba 48px de alto) */
@media (min-width: 981px) {
  .s-chips .s-chip { padding: 0; }
  .s-chips .s-chip > a { padding: 6px 12px; display: inline-flex; align-items: center; }
}

/* Chip: sin padding duplicado en ningún ancho (móvil quedaba a 60px) */
.s-chips .s-chip { padding: 0; }
.s-chips .s-chip > a { padding: 9px 12px; display: inline-flex; align-items: center; min-height: 44px; }
@media (min-width: 981px) {
  .s-chips .s-chip > a { min-height: 34px; padding: 6px 12px; }
}

/* ==========================================================================
   Buscador · título de contexto (el bloque se leía sin decir qué era)
   ========================================================================== */
.p-search__head {
  padding-top: 34px;
  padding-bottom: 22px;
}
.p-search__head-txt { max-width: 62ch; }
.p-search__head .p-h2 {
  margin: 0;
  font-size: clamp(24px, 2.5vw, 34px);
  color: var(--p-t-bone);
}
.p-search__head .p-eyebrow { margin-bottom: 14px; color: var(--p-mag-soft); }
.p-search__head .p-lead { margin: 12px 0 0; }
.p-search__head .p-lead { color: var(--p-t-bone-2); }
@media (max-width: 900px) {
  .p-search__head { padding-top: 26px; padding-bottom: 16px; }
  .p-search__head .p-h2 { font-size: 26px; }
}


/* La nota del presupuesto se alinea con la columna del bloque, no flota a la derecha */
.p-search__ayuda { text-align: left; margin-left: 0; max-width: 52ch; }

/* El placeholder del presupuesto deshabilitado necesita leerse */
.p-search input:disabled { opacity: .72; }

/* ==========================================================================
   HERO · composición con panel de inventario + movimiento (plan de Opus)
   ========================================================================== */

/* --- 1. Rejilla: texto a la izquierda, panel de datos a la derecha -------- */
@media (min-width: 981px) {
  .p-hero__in {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    align-items: end;
    gap: clamp(32px, 5vw, 72px);
    max-width: var(--p-max);
    width: 100%;
  }
}
@media (max-width: 980px) {
  .p-hero__in { gap: 22px; }
}

/* --- 2. Panel de inventario ---------------------------------------------- */
.p-hero__panel {
  border: 1px solid var(--p-line-dark);
  background: rgba(10, 16, 19, .78);
  padding: 20px 22px 18px;
  align-self: end;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.p-hero__k {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-family: var(--p-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--p-t-bone-3);
}
.p-live {
  position: relative;
  width: 7px; height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #4ADE80;
}
.p-live::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #4ADE80;
  opacity: .55;
  animation: pLive 2.4s ease-out infinite;
}
@keyframes pLive {
  from { transform: scale(1); opacity: .55; }
  to   { transform: scale(2.6); opacity: 0; }
}
.p-hero__lista { list-style: none; margin: 0 0 14px; padding: 0; }
.p-hero__lista li + li { border-top: 1px solid rgba(255,255,255,.07); }
.p-hero__lista a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  padding: 8px 0;
  color: var(--p-t-bone);
  text-decoration: none;
  position: relative;
}
.p-hero__lista b {
  font-family: var(--p-cond, var(--p-sans));
  font-size: 24px;
  line-height: 1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 2.4ch;
  color: var(--p-t-bone);
}
.p-hero__lista span {
  font-size: 12.5px;
  color: var(--p-t-bone-2);
  flex: 1 1 auto;
}
.p-hero__lista em {
  font-style: normal;
  color: var(--v-accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .3s var(--p-ease), transform .3s var(--p-ease);
}
.p-hero__lista a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 1px;
  background: var(--v-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--p-ease);
  opacity: .5;
}
.p-hero__lista a:hover em,
.p-hero__lista a:focus-visible em { opacity: 1; transform: none; }
.p-hero__lista a:hover::after,
.p-hero__lista a:focus-visible::after { transform: scaleX(1); }
.p-hero__lista a:hover b { color: var(--v-accent); }

.p-hero__zona,
.p-hero__mini {
  margin: 0;
  font-family: var(--p-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--p-t-bone-3);
}
.p-hero__zona { margin-bottom: 6px; display: flex; gap: 6px; align-items: baseline; }
.p-rot {
  display: inline-block;
  overflow: hidden;
  height: 1.2em;
  line-height: 1.2em;
  color: var(--v-accent);
  max-width: 60%;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.p-rot > span { display: block; }
.p-rot.is-cambiando > span { animation: pRot .45s var(--p-ease); }
@keyframes pRot {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* En móvil el panel pasa a franja compacta bajo los CTA */
@media (max-width: 980px) {
  .p-hero__panel { margin-bottom: 0; padding: 14px 16px; }
  .p-hero__lista { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-bottom: 10px; }
  .p-hero__lista li + li { border-top: 0; }
  .p-hero__lista li:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.07); }
  .p-hero__lista a { min-height: 40px; padding: 6px 0; }
  .p-hero__lista b { font-size: 19px; min-width: 2.2ch; }
  .p-hero__lista span { font-size: 11.5px; }
  .p-rot { max-width: 55%; }
}

/* --- 3. Movimiento ------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  /* la foto se asienta (sin opacity, para no retrasar el LCP) */
  .p-hero__media {
    scale: 1.06;
    animation: pSettle 2.4s var(--p-ease) both;
  }
  @keyframes pSettle {
    from { scale: 1.14; }
    to   { scale: 1.06; }
  }
  /* respiración muy lenta, solo en pantallas grandes */
  @media (hover: hover) and (min-width: 1024px) {
    .p-hero__media { animation: pSettle 2.4s var(--p-ease) both, pDrift 22s 2.4s ease-in-out infinite alternate; }
    @keyframes pDrift {
      from { scale: 1.06; }
      to   { scale: 1.10; }
    }
  }

  /* el H1 entra palabra por palabra, no como bloque */
  .p-hero .p-eyebrow, .p-hero__h1 { animation: none; }
  .p-hero .p-eyebrow::before {
    transform: scaleX(0);
    transform-origin: left;
    animation: pLine .7s var(--p-ease) .05s both;
  }
  @keyframes pLine { to { transform: scaleX(1); } }

  .p-w {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: .14em;
    margin-bottom: -.14em;
  }
  .p-w > span {
    display: inline-block;
    transform: translateY(105%);
    animation: pWord .8s var(--p-ease) both;
    animation-delay: calc(.12s + var(--i, 0) * 55ms);
  }
  @keyframes pWord { to { transform: none; } }

  .p-w--em > span { color: var(--v-accent); }
  .p-w--em { position: relative; }
  .p-w--em::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: .12em;
    height: 2px;
    background: currentColor;
    color: var(--v-accent);
    opacity: .45;
    transform: scaleX(0);
    transform-origin: left;
    animation: pUnder .7s var(--p-ease) both;
    animation-delay: calc(.95s + (var(--i, 0) - 4) * 80ms);
  }
  @keyframes pUnder { to { transform: scaleX(1); } }

  /* el panel entra después del titular */
  .p-hero__panel {
    opacity: 0;
    translate: 24px 0;
    animation: pPanel .8s var(--p-ease) .6s both;
  }
  @keyframes pPanel { to { opacity: 1; translate: 0 0; } }
  .p-hero__lista li {
    opacity: 0;
    animation: pUp .6s var(--p-ease) both;
    animation-delay: calc(.7s + var(--i, 0) * 70ms);
  }
  .p-hero__lista li:nth-child(1) { --i: 0; }
  .p-hero__lista li:nth-child(2) { --i: 1; }
  .p-hero__lista li:nth-child(3) { --i: 2; }
  .p-hero__lista li:nth-child(4) { --i: 3; }
}

/* El subrayado del acento no debe tocar la línea siguiente */
.p-w--em::after { bottom: .26em !important; opacity: .38 !important; }

/* Acento de acción: la misma magenta del botón primario (--p-mag), no el dorado.
   Va fuera de @media para que aplique también con reduced-motion. */
.p-w--mag > span { color: var(--p-mag); }

/* --- 4. Correcciones del QA visual (Opus, iteración 2) -------------------- */

/* el panel se ancla abajo, a la misma línea de los CTA (antes flotaba) */
.p-hero__panel { margin-bottom: 0; }

/* números con ancho fijo y a la derecha: las etiquetas comparten columna */
.p-hero__lista b {
  min-width: 3.4ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* el acento ya se lee por color: el subrayado partido por palabra parecía un enlace */
.p-w--em::after { content: none !important; }

/* aire real entre el párrafo y los botones */
.p-hero__lead { margin: 0 0 clamp(22px, 2.6vw, 30px); }

/* el eyebrow de dos líneas: la rayita queda en la primera, no centrada */
.p-hero .p-eyebrow { align-items: flex-start; }
.p-hero .p-eyebrow::before { margin-top: .58em; flex: 0 0 auto; }

/* rotador: todas las zonas en la misma celda, ancho estable, sin recortes */
.p-rot {
  display: inline-grid;
  vertical-align: bottom;
  max-width: 100%;
  overflow: visible;
  height: auto;
  white-space: normal;
}
.p-rot > span {
  grid-area: 1 / 1;
  white-space: nowrap;
  visibility: hidden;
  animation: none;
}
.p-rot > span.is-activa {
  visibility: visible;
  animation: pRot .45s var(--p-ease);
}

/* móvil: una fila por dato y CTA de ancho completo */
@media (max-width: 600px) {
  .p-hero__lista { grid-template-columns: 1fr; }
  .p-hero__lista li:nth-child(n+2) { border-top: 1px solid rgba(255,255,255,.07); }
  .p-hero__cta { display: grid; gap: 10px; }
  .p-hero__cta > * { width: 100%; justify-content: center; }
}
@media (min-width: 601px) and (max-width: 980px) {
  .p-hero__lista { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   TEXTURA · grano de concreto estático (plan de Opus)
   La textura es el "piso" de la página. Lo que va encima —tarjetas, rail,
   inputs, fotos— queda liso: ese contraste es lo que da profundidad.
   ========================================================================== */
:root {
  /* grano monocromo en SVG: motas blancas dispersas, opacidad máx ~3,4 % */
  --tex-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1.6 0 0 0 -.8'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.10'/%3E%3C/svg%3E");
}
.p-sec--ink,
.p-sec--ink-2,
.p-foot,
.p-search,
.s-sec {
  background-image: var(--tex-grain);
  background-size: 200px 200px;
}

/* Retícula de plano técnico: solo en las cabeceras de sección, desvanecida
   hacia el texto para que nunca quede una cuadrícula completa detrás del H1. */
.p-sec__head,
.s-head {
  position: relative;
  isolation: isolate;
}
.p-sec__head::before,
.s-head::before {
  content: "";
  position: absolute;
  inset: -48px 0 0;
  z-index: -1;
  pointer-events: none;
  --l: color-mix(in srgb, var(--v-accent) 6%, transparent);
  background:
    linear-gradient(var(--l) 1px, transparent 1px),
    linear-gradient(90deg, var(--l) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: radial-gradient(ellipse 60% 90% at 0 0, #000 25%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 90% at 0 0, #000 25%, transparent 75%);
}
@media (max-width: 640px) {
  .p-sec__head::before,
  .s-head::before { background-size: 72px 72px; }
}

/* Salida de accesibilidad: con más contraste o colores forzados, sin textura */
@media (prefers-contrast: more), (forced-colors: active) {
  :root { --tex-grain: none; }
  .p-sec__head::before,
  .s-head::before { display: none; }
}

/* ==========================================================================
   Ficha · precios y módulos del rail
   ========================================================================== */

/* Los dos precios van apilados: la columna del hero mide ~340px y dos cifras
   de 10-14 caracteres lado a lado se pisaban entre sí y con el divisor. */
.f-tarifas { flex-direction: column; }
.f-tarifa { flex: 0 0 auto; padding: 18px 0; }
.f-tarifa + .f-tarifa {
  border-left: 0;
  border-top: 1px solid var(--p-line-light);
  padding-left: 0;
}
.f-tarifa dd strong {
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.02;
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}
.f-tarifa dd, .f-tarifa dd strong { max-width: 100%; }

/* Aire entre la tarjeta del asesor y el bloque de compartir */
.f-contacto + .f-block {
  margin-top: clamp(22px, 2.6vw, 34px);
  border-top: 1px solid var(--p-line-light) !important;
  padding-top: clamp(18px, 2vw, 26px) !important;
}

/* Compartir: tres acciones parejas (antes la tercera quedaba sola a media fila) */
.f-compartir {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.f-compartir .p-btn {
  justify-content: center;
  padding-inline: 8px;
  font-size: 10.5px;
  letter-spacing: .1em;
  white-space: nowrap;
  min-height: 42px;
}
@media (max-width: 420px) {
  .f-compartir { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   FORMULARIOS · contacto, consignar y escribir al asesor
   Los campos tenían solo línea inferior: no se leían como editables.
   ========================================================================== */

/* Caja visible, 46px y foco del color de marca */
.s-form .p-field input,
.s-form .p-field select,
.s-form .p-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--p-line-light);
  border-radius: 2px;
  background: var(--v-elevated);
  color: var(--p-t-ink);
  font-family: var(--p-sans);
  font-size: 15px;
  transition: border-color .2s var(--p-ease), background-color .2s var(--p-ease);
}
.s-form .p-field textarea { min-height: 108px; resize: vertical; line-height: 1.55; }
.s-form .p-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A8F98' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  padding-right: 38px;
}
.s-form .p-field input:hover,
.s-form .p-field select:hover,
.s-form .p-field textarea:hover { border-color: color-mix(in srgb, var(--v-accent) 45%, var(--p-line-light)); }
.s-form .p-field input:focus,
.s-form .p-field select:focus,
.s-form .p-field textarea:focus {
  outline: none;
  border-color: var(--v-accent);
  background: color-mix(in srgb, var(--v-accent) 6%, var(--v-elevated));
}
.s-form .p-field:focus-within label { color: var(--v-accent); }

/* Etiquetas: contraste suficiente (antes gris muy bajo) */
.s-form .p-field label {
  font-family: var(--p-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--p-t-body);
  margin-bottom: 8px;
}

/* Leyenda de obligatorios + aviso técnico más sobrio */
.s-form__leyenda {
  margin: -4px 0 18px;
  font-family: var(--p-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--p-t-mute);
}
.s-form__leyenda span { color: var(--p-mag); }
.s-form__aviso {
  margin: 18px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--p-line-light);
  font-size: 11px;
  line-height: 1.65;
  color: var(--p-t-mute);
}

/* Validación: el error aparece solo después de intentar enviar */
.s-form .p-field input:user-invalid,
.s-form .p-field select:user-invalid,
.s-form .p-field textarea:user-invalid {
  border-color: #FF6B5A;
  background: color-mix(in srgb, #FF6B5A 8%, var(--v-elevated));
}
.s-form.is-tocado .p-field:has(:user-invalid) label { color: #FF6B5A; }

/* Checkbox con área táctil real */
.s-form__check {
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--p-t-body);
}
.s-form__check input {
  width: 20px; height: 20px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--p-mag);
}
.s-form__check:has(input:focus-visible) { outline: 2px solid var(--v-accent); outline-offset: 4px; }

/* Botón de envío a todo el ancho, con estado de envío */
.s-form__enviar {
  width: 100%;
  min-height: 52px;
  justify-content: center;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: .14em;
}
.s-form__enviar[aria-busy="true"] { opacity: .75; cursor: progress; }

/* En el rail de la ficha el formulario va a una sola columna */
.f-block .s-form { padding: 0; border: 0; background: transparent; }
.f-block .s-form__grid { grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 600px) {
  .f-block .s-form__grid { grid-template-columns: 1fr; }
}

/* El error se marca con el borde del campo, no tiñendo todas las etiquetas */
.s-form.is-tocado .p-field:has(:user-invalid) label { color: var(--p-t-body); }
.s-form__check { align-items: flex-start; }
.s-form__check input { margin-top: 2px; }

/* Subgrupos dentro del formulario: separan "tus datos" de "el inmueble" */
.s-form__grupo {
  margin: 4px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--p-line-light);
  font-family: var(--p-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--v-accent);
}
.s-form__grupo:not(:first-child) { margin-top: 10px; }

/* --- Cuarta pasada de formularios (QA de Opus) ---------------------------- */

/* Controles nativos en modo oscuro (select, checkbox, autofill) */
.s-form { color-scheme: dark; }

/* Títulos de grupo con jerarquía real, no otra micro-etiqueta */
.s-form__grupo {
  margin: 6px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--p-line-light);
  font-family: var(--p-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--p-t-ink);
}

/* Referencia del inmueble dentro del formulario del asesor */
.s-form__ref {
  margin: 0 0 18px;
  padding: 10px 12px;
  border-left: 2px solid var(--v-accent);
  background: rgba(57, 165, 221, .07);
  font-family: var(--p-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--p-t-bone-2, var(--p-t-body));
}
.s-form__ref b { color: var(--v-accent); }

/* Aviso de pruebas: antes del botón, con salida a WhatsApp */
.s-form__aviso {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--p-line-light);
  border-left: 2px solid var(--v-accent);
  background: rgba(255, 255, 255, .02);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--p-t-mute);
}
.s-form__aviso a {
  color: var(--p-t-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 24px;
  display: inline-block;
}
.s-form__aviso a:hover { color: var(--v-accent); }

/* Móvil: sin caja ni relleno, para ganar ancho útil */
@media (max-width: 640px) {
  .s-form { border: 0; padding: 0; background: transparent; }
}

/* El ancla del asesor debe quedar debajo del encabezado fijo */
#form-asesor { scroll-margin-top: calc(var(--head-h, 72px) + 20px); }

/* ==========================================================================
   WhatsApp flotante: visible en todo el sitio, siempre
   (antes se ocultaba en el hero y en las páginas con formulario o rail)
   ========================================================================== */
.wa-flotante,
body.listado-premium .wa-flotante,
body.ficha-premium .wa-flotante,
body.consignar-premium .wa-flotante,
body.contacto-premium .wa-flotante,
body.error-404 .wa-flotante,
.wa-flotante[hidden] {
  display: grid;
  place-items: center;
  z-index: 200;
}
/* En la ficha móvil hay barra de acciones abajo: el botón sube para no taparla */
@media (max-width: 980px) {
  body.ficha-premium .wa-flotante {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   Franja de cifras (.p-trust) · "marcador industrial" (plan de Opus)
   Antes: 46px en columnas de 440px, todo gris y sin jerarquía.
   ========================================================================== */
.p-trust { padding-block: 40px 64px; }
.p-trust .p-hero__stats { border-top: 0; }

.p-stat {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 28px 32px 4px 0;
}
.p-stat + .p-stat { padding-left: 32px; }
.p-stat { border-left-color: var(--p-line-dark); }

/* línea azul que se dibuja al entrar */
.p-stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--v-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .9s var(--p-ease) calc(var(--i, 0) * 120ms);
}
.p-stat + .p-stat::before { left: 32px; }
.p-trust.is-in .p-stat::before { transform: scaleX(1); }

/* eyebrow numerado en azul */
.p-stat__k {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--p-mono);
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--v-accent);
}
.p-dot {
  position: relative;
  width: 7px; height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #4ADE80;
}
.p-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: p-dot-ping 2.4s var(--p-ease) infinite;
}
@keyframes p-dot-ping { to { transform: scale(3); opacity: 0; } }

/* cifras: el argumento de venta, no una nota al pie */
.p-stat b {
  font-size: clamp(56px, 7vw, 104px);
  line-height: .9;
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
  color: var(--p-t-bone);
}
.p-stat--live b { color: var(--v-accent); }

/* etiquetas legibles, no micro-mono */
.p-stat span {
  font-family: var(--p-sans);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(243, 238, 228, .8);
  margin-top: 0;
  margin-bottom: 6px;
}

.p-stat__go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--p-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--p-t-bone);
  text-decoration: none;
  min-height: 32px;
  width: fit-content;
  border-bottom: 1px solid rgba(243, 238, 228, .25);
}
.p-stat__go .ic { width: 14px; height: 14px; transition: transform .3s var(--p-ease); }
.p-stat__go:hover { color: var(--v-accent); border-bottom-color: var(--v-accent); }
.p-stat__go:hover .ic { transform: translateX(4px); }

/* entrada escalonada; sin JS queda todo visible por la clase .js */
.js .p-stat b,
.js .p-stat span {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s var(--p-ease), transform .7s var(--p-ease);
  transition-delay: calc(var(--i, 0) * 120ms + 150ms);
}
.js .p-trust.is-in .p-stat b,
.js .p-trust.is-in .p-stat span { opacity: 1; transform: none; }

/* Móvil: el dato en vivo arriba y grande, los otros dos en dos columnas */
@media (max-width: 640px) {
  .p-trust { padding-block: 26px 48px; }
  .p-trust .p-hero__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "live live" "a b";
    column-gap: 20px;
    border-top: 0;
  }
  .p-stat { padding: 20px 0 16px; border: 0 !important; }
  .p-stat + .p-stat::before { left: 0; }
  .p-stat--live { grid-area: live; }
  .p-stat:first-child { grid-area: a; }
  .p-stat:last-child { grid-area: b; }
  .p-stat b { font-size: 56px; }
  .p-stat--live b { font-size: 84px; }
  .p-stat span { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .p-stat::before { transform: none; transition: none; }
  .js .p-stat b, .js .p-stat span { opacity: 1; transform: none; transition: none; }
  .p-dot::after { animation: none; }
}

/* Móvil más compacto: el 620 arriba sin comerse media pantalla */
@media (max-width: 640px) {
  .p-stat { padding: 16px 0 12px; }
  .p-stat--live b { font-size: 76px; }
  .p-stat span { font-size: 12.5px; line-height: 1.4; }
  .p-stat__go { min-height: 30px; font-size: 10.5px; }
  .p-trust { padding-block: 22px 40px; }
}
