/* ZihWeb Properties - listado, ficha y formularios de bienes raíces (ext/properties.php), sin Bootstrap ni jQuery.
   Usa el mismo esquema de clases que la plantilla NOBOOTSTRAP (.properties-grid, .property-card, .property-image,
   .property-content, .property-features, .property-footer…), pero todo va dentro de .zwp: en los sitios NOBOOTSTRAP
   la cuadrícula no lleva .zwp ni se carga esta hoja, así que sus estilos propios no se tocan.
   Hereda el color de texto y el fondo del sitio. Medidas en em (Bootstrap 3 fija html{font-size:10px}). */

.zwp {
  --zwp-line: rgba(127, 127, 127, .28);
  --zwp-soft: rgba(127, 127, 127, .07);
  --zwp-accent: var(--g-accent, #0b6fd6);
  --zwp-radius: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17em), 1fr));
  gap: 1.25em;
  margin: 0 0 1.5em;
}

/* ---------- Tarjeta ---------- */
.zwp .property-card {
  position: relative;                 /* el enlace del título cubre toda la tarjeta */
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--zwp-line);
  border-radius: var(--zwp-radius);
  background: var(--zwp-soft);
  transition: box-shadow .15s ease;
}
.zwp .property-card:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, .14); }
@media (prefers-reduced-motion: no-preference) {
  .zwp .property-card { transition: box-shadow .15s ease, transform .15s ease; }
  .zwp .property-card:hover { transform: translateY(-3px); }
}

/* Imagen con la operación (venta, renta…) encima */
.zwp .property-image {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: rgba(127, 127, 127, .12);
}
.zwp .property-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
@media (prefers-reduced-motion: no-preference) {
  .zwp .property-image img { transition: transform .3s ease; }
  .zwp .property-card:hover .property-image img { transform: scale(1.04); }
}
.zwp .zwp-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(127,127,127,.1), rgba(127,127,127,.22)); }
.zwp .property-badge {
  position: absolute;
  top: .75em;
  left: .75em;
  padding: .3em .7em;
  border-radius: 999px;
  background: rgba(17, 24, 39, .82);   /* blanco encima: contraste > 12:1 */
  color: #fff;
  font-size: .72em;
  font-weight: 700;
  letter-spacing: .06em;
}
.zwp .property-card[data-trat="renta"] .property-badge,
.zwp .property-card[data-trat="varen"] .property-badge { background: #0b6a8f; }
.zwp .property-card[data-trat="preve"] .property-badge { background: #b45309; }
.zwp .property-card[data-trat="vendi"] .property-badge { background: #b91c1c; }

/* ---------- Contenido ---------- */
.zwp .property-content { display: flex; flex: 1; flex-direction: column; gap: .45em; padding: 1em 1.1em 1.1em; }
.zwp .property-content p { margin: 0; }
.zwp .property-type { font-size: .75em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .65; }
.zwp .property-title { margin: 0; font-size: 1.15em; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.zwp .property-title a { color: inherit; text-decoration: none; }
.zwp .property-title a::after {        /* tarjeta completa clicable */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--zwp-radius);
}
.zwp .property-card:hover .property-title a { text-decoration: underline; text-underline-offset: 3px; }
.zwp .property-title a:focus { outline: none; }
.zwp .property-title a:focus-visible::after { outline: 3px solid var(--zwp-accent); outline-offset: 2px; }

.zwp .property-location { display: flex; align-items: flex-start; gap: .35em; font-size: .88em; opacity: .8; }
.zwp .property-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: .9em;
  line-height: 1.45;
  opacity: .85;
}
.zwp-i {
  flex: none;
  width: 1.05em;
  height: 1.05em;
  margin-top: .1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.zwp .property-features { display: flex; flex-wrap: wrap; gap: .4em .9em; margin-top: auto; padding-top: .35em; font-size: .9em; }
.zwp .property-features:empty { display: none; }
.zwp .feature { display: inline-flex; align-items: center; gap: .35em; font-variant-numeric: tabular-nums; }
.zwp .feature .zwp-i { margin-top: 0; opacity: .7; }

.zwp .property-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .35em .75em;
  margin-top: .5em;
  padding-top: .75em;
  border-top: 1px solid var(--zwp-line);
}
.zwp .property-price { font-size: 1.3em; font-weight: 700; font-variant-numeric: tabular-nums; }
.zwp .property-term { font-size: .62em; font-weight: 600; letter-spacing: .03em; opacity: .7; }
.zwp .property-was { display: block; font-size: .6em; font-weight: 400; opacity: .6; }
.zwp .property-link { font-size: .9em; font-weight: 600; white-space: nowrap; }

/* Lo interactivo va por encima del enlace que cubre la tarjeta */
.zwp .zwp-admin, .zwp .property-location a { position: relative; z-index: 1; }
.zwp .zwp-admin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3em .9em;
  margin-top: .5em;
  padding-top: .5em;
  border-top: 1px dashed var(--zwp-line);
  font-size: .8em;
}
.zwp .zwp-del { color: #b91c1c; }

.zwp .zwp-empty {
  grid-column: 1 / -1;
  padding: 2.5em 1em;
  border: 1px dashed var(--zwp-line);
  border-radius: var(--zwp-radius);
  text-align: center;
}
.zwp .zwp-empty p { margin: 0; font-size: 1.05em; }

/* ---------- Barra del listado (finderBar(); antes chips .zwp-nav): buscador, operación y tipo ----------
   Sin JS el buscador es un formulario GET normal; lib/propfinder.js añade las sugerencias (.zwp-sug). */
.zwp-bar {
  --zwp-line: rgba(127, 127, 127, .3);
  --zwp-soft: rgba(127, 127, 127, .08);
  --zwp-accent: var(--g-accent, #0b6fd6);
  display: grid;
  grid-template-columns: minmax(0, 1fr);   /* la columna no crece con las filas que se deslizan en móvil */
  gap: .85em;
  margin: 0 0 1.5em;
  text-align: center;
}
/* Centradas con margin auto y no con justify-content: al deslizarse en móvil el margen cae a 0 y no se corta el inicio */
.zwp-bar nav ul { width: max-content; max-width: 100%; margin-inline: auto; }
/* Buscador y tipos centrados; con .zwp-bar delante para ganarle a los estilos de form/ul de la plantilla */
.zwp-bar .zwp-finder { justify-self: center; margin-inline: auto; }
.zwp-bar .zwp-types { justify-self: stretch; text-align: center; }
.zwp-bar .zwp-types ul { justify-content: center; margin-inline: auto; }
.zwp-bar > * { min-width: 0; }
.zwp-bar ul { display: flex; flex-wrap: wrap; gap: .5em; margin: 0; padding: 0; list-style: none; }
.zwp-bar li { margin: 0; }
.zwp-bar a { color: inherit; text-decoration: none; }
.zwp-bar a:focus-visible, .zwp-finder button:focus-visible { outline: 3px solid var(--zwp-accent); outline-offset: 2px; }

/* Buscador */
.zwp-finder { position: relative; display: flex; gap: .5em; width: 100%; max-width: 46em; margin: 0 auto; text-align: left; }   /* ancla de .zwp-sug */
.zwp-q { position: relative; flex: 1; min-width: 0; }
.zwp-q > svg {
  position: absolute; left: .95em; top: 50%; translate: 0 -50%;
  width: 1.15em; height: 1.15em; opacity: .55; pointer-events: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
}
.zwp-q input {
  box-sizing: border-box; width: 100%; height: 3em; margin: 0; padding: 0 1.1em 0 2.7em;
  font: inherit; font-size: 1.05em; color: inherit; background: var(--zwp-soft);
  border: 1px solid var(--zwp-line); border-radius: 999px;
  -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.zwp-q input::placeholder { color: inherit; opacity: .55; }
.zwp-q input:focus { outline: none; border-color: var(--zwp-accent); background: transparent; box-shadow: 0 0 0 3px color-mix(in srgb, var(--zwp-accent) 25%, transparent); }
.zwp-q.is-busy::after {
  content: ""; position: absolute; right: 1em; top: 50%; width: 1em; height: 1em; margin-top: -.5em;
  border: 2px solid var(--zwp-line); border-top-color: var(--zwp-accent); border-radius: 50%;
  animation: zwpSpin .7s linear infinite;
}
@keyframes zwpSpin { to { transform: rotate(360deg); } }
.zwp-finder button {
  flex: none; height: 3.15em; padding: 0 1.4em; border: 0; border-radius: 999px;
  background: var(--zwp-accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.zwp-finder button:hover { filter: brightness(1.08); }

/* Sugerencias: bajo todo el formulario (campo y botón) */
.zwp-sug {
  position: absolute; z-index: 1000; top: calc(100% + .4em); left: 0; right: 0;
  display: block; max-height: min(28em, 65vh); overflow: auto; padding: .35em;
  background: Canvas; color: CanvasText;
  border: 1px solid var(--zwp-line); border-radius: .9em; box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
}
.zwp-sug[hidden] { display: none; }
.zwp-sug li {
  display: grid; grid-template-columns: 4.2em minmax(0, 1fr) auto; align-items: center; gap: .75em;
  padding: .45em .6em; border-radius: .6em; cursor: pointer;
}
.zwp-sug li[aria-selected="true"], .zwp-sug li:hover { background: color-mix(in srgb, var(--zwp-accent) 11%, transparent); }
.zwp-sug li img, .zwp-sug .zwp-q-noimg { width: 4.2em; height: 3.15em; border-radius: .45em; object-fit: cover; background: var(--zwp-soft); }
.zwp-sug .zwp-q-noimg { display: grid; place-items: center; }
.zwp-sug .zwp-q-noimg svg { width: 1.4em; height: 1.4em; opacity: .4; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.zwp-q-t { display: block; overflow: hidden; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.zwp-q-m { display: block; overflow: hidden; font-size: .85em; opacity: .7; white-space: nowrap; text-overflow: ellipsis; }
.zwp-q-p { font-size: .9em; font-weight: 600; white-space: nowrap; }
.zwp-sug mark { padding: 0; background: none; color: inherit; text-decoration: underline; text-decoration-color: var(--zwp-accent); text-decoration-thickness: 2px; text-underline-offset: 2px; }
.zwp-sug li.zwp-q-more { display: block; margin-top: .2em; border-top: 1px solid var(--zwp-line); border-radius: 0 0 .6em .6em; color: var(--zwp-accent); font-weight: 600; text-align: center; }
.zwp-sug li.zwp-q-empty { display: block; cursor: default; opacity: .75; background: none; }

/* Operación: control segmentado */
.zwp-deals ul { display: inline-flex; gap: .2em; padding: .25em; border: 1px solid var(--zwp-line); border-radius: 999px; background: var(--zwp-soft); }
.zwp-deals a {
  display: inline-flex; align-items: center; min-height: 2.5em; padding: .3em 1.05em;
  border-radius: 999px; font-weight: 600; white-space: nowrap;
}
.zwp-deals a:hover { background: var(--zwp-soft); }
.zwp-deals a[aria-current] { background: var(--zwp-accent); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }

/* Tipo: chips compactos con icono; filtro secundario, más discreto que la operación (~32px, sobre el mínimo de 24px de WCAG 2.2) */
.zwp-types ul { gap: .4em; }
.zwp-types a {
  display: inline-flex; align-items: center; gap: .35em; min-height: 2.3em; padding: .15em .8em;
  border: 1px solid var(--zwp-line); border-radius: 999px; font-size: .875em; font-weight: 500; white-space: nowrap;
  transition: border-color .15s, background-color .15s;
}
.zwp-types a:hover { border-color: currentColor; background: var(--zwp-soft); }
.zwp-types a[aria-current] {
  border-color: var(--zwp-accent); color: var(--zwp-accent);
  background: color-mix(in srgb, var(--zwp-accent) 10%, transparent);
}
.zwp-types .zwp-n { margin-left: .1em; padding: .05em .45em; border-radius: 999px; background: var(--zwp-soft); font-size: .85em; opacity: .8; }
.zwp-types a[aria-current] .zwp-n { background: color-mix(in srgb, var(--zwp-accent) 15%, transparent); opacity: 1; }
.zwp-bar .zwp-i { margin: 0; }

/* Cantidades */
.zwp-n { margin-left: .45em; font-size: .8em; font-weight: 500; opacity: .65; font-variant-numeric: tabular-nums; }
.zwp-bar a[aria-current] .zwp-n { opacity: .9; }

/* Fila de operación + vista (lista/mapa) */
.zwp-bar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .6em 1em; }
.zwp-bar-row > nav { min-width: 0; max-width: 100%; }   /* sin esto las pestañas ensanchaban la barra en móvil en vez de deslizarse */
/* Escritorio: operación al centro y vista a la derecha, sin que la vista descentre la operación */
@media (min-width: 900px) {
  .zwp-bar-row { display: grid; /*grid-template-columns: 1fr auto 1fr;*/ }
  .zwp-deals { grid-column: 2; }
  .zwp-views { grid-column: 3; justify-self: end; }
  .zwp-views ul { margin-inline: 0; }
}
.zwp-views ul { gap: .25em; }
.zwp-views a {
  display: inline-flex; align-items: center; gap: .4em; min-height: 2.75em; padding: .3em .9em;
  border: 1px solid var(--zwp-line); border-radius: 999px; font-weight: 500;
}
.zwp-views a:hover { border-color: currentColor; }
.zwp-views a[aria-current] { border-color: var(--zwp-accent); color: var(--zwp-accent); background: color-mix(in srgb, var(--zwp-accent) 10%, transparent); }

/* Vista de mapa (mapView(), lib/propfinder.js). z-index 0 + isolation: los z-index de Leaflet quedan dentro del
   mapa y los menús del sitio pasan por encima (igual que .zwpm-wrap del mapa del portal). */
.zwp-map { margin: 0 0 1.5em; }
.zwp-map-canvas {
  position: relative; z-index: 0; isolation: isolate;
  height: 70vh; min-height: 22em; max-height: 46em;
  border: 1px solid rgba(127, 127, 127, .3); border-radius: 14px; overflow: hidden; background: #e8eef2;
}
.zwp-map-legend { display: flex; flex-wrap: wrap; gap: .4em 1.2em; margin: .75em 0 0; padding: 0; list-style: none; font-size: .9em; }
.zwp-map-legend li { display: inline-flex; align-items: center; gap: .45em; margin: 0; }
.zwp-map-legend .zwp-pin { display: inline-block; width: 12px; height: 12px; }
.zwp-map-note { margin: .5em 0 0; font-size: .9em; opacity: .75; }
.zwp-pin { border: 2px solid #fff; border-radius: 50%; background: #64748b; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.zwp-pin--venta { background: #0b6fd6; }
.zwp-pin--preve { background: #7c3aed; }
.zwp-pin--renta { background: #15803d; }
.zwp-pin--varen { background: #d97706; }
.leaflet-marker-icon.zwp-pin:focus-visible { outline: 3px solid #111; outline-offset: 2px; }
/* Grupos de Leaflet.markercluster (propfinder.js): círculo con el número; más grande cuantas más propiedades */
.zwp-cluster { display: grid; place-items: center; }
.zwp-cluster span {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--g-accent, #0b6fd6); color: #fff; font: 700 13px/1 system-ui, sans-serif;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--g-accent, #0b6fd6) 30%, transparent), 0 2px 6px rgba(0, 0, 0, .3);
}
.zwp-cluster--md span { width: 38px; height: 38px; }
.zwp-cluster--lg span { width: 42px; height: 42px; font-size: 14px; }
.leaflet-marker-icon.zwp-cluster:focus-visible { outline: none; }
.leaflet-marker-icon.zwp-cluster:focus-visible span { outline: 3px solid #111; outline-offset: 2px; }
.zwp-map-card { display: grid; gap: .2em; color: inherit !important; text-decoration: none !important; }
.zwp-map-card strong { font-size: 1.05em; line-height: 1.3; }
.zwp-map-card strong:hover { text-decoration: underline; }
.zwp-map-meta { opacity: .75; }
.zwp-map-price { font-weight: 700; }

/* Resumen y administración */
.zwp-results { margin: 0; opacity: .85; }
.zwp-results a, .zwp-bar-admin a { color: var(--zwp-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.zwp-results a { margin-left: .5em; }
.zwp-bar-admin { display: flex; flex-wrap: wrap; justify-content: center; gap: 1em; margin: 0; font-size: .9em; }
.zwp-bar-admin a { display: inline-flex; align-items: center; gap: .3em; }

@media (max-width: 599px) {
  /* Operación y tipo en una fila que se desliza */
  .zwp-bar nav { overflow-x: auto; margin: 0 -1em; padding: 0 1em .2em; scrollbar-width: none; }
  .zwp-bar nav ul, .zwp-bar .zwp-types ul { flex-wrap: nowrap; justify-content: flex-start; }   /* centrado con margin auto: si desborda, no se corta el inicio */
  .zwp-finder button { padding: 0 1.1em; }
  .zwp-sug li { grid-template-columns: 3.4em minmax(0, 1fr); }
  .zwp-sug li img, .zwp-sug .zwp-q-noimg { width: 3.4em; height: 2.6em; }
  .zwp-q-p { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .zwp-q.is-busy::after { animation-duration: 2s; }
}

/* ============================================================
   Ficha de la propiedad  (article.zwp-detail, getListing())
   Se usa igual en sitios con Bootstrap y NOBOOTSTRAP: todo va dentro de .zwp-detail.
   ============================================================ */
.zwp-detail {
  --zwp-line: rgba(127, 127, 127, .28);
  --zwp-soft: rgba(127, 127, 127, .07);
  --zwp-accent: var(--g-accent, #0b6fd6);
  --zwp-radius: 14px;
  margin: 0 0 2em;
}
.zwp-detail p { margin: 0; }
.zwp-detail .zwp-h2 { margin: 0 0 .75em; font-size: 1.25em; font-weight: 600; }

/* Encabezado: operación, tipo, título, ubicación y precio */
.zwp-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75em 1.5em; margin: 0 0 1.25em; }
.zwp-head-main { flex: 1 1 22em; min-width: 0; }
.zwp-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; margin: 0 0 .5em !important; font-size: .8em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.zwp-kicker > span:last-child { opacity: .65; }
.zwp-badge { padding: .3em .75em; border-radius: 999px; background: #1f2937; color: #fff; }
.zwp-badge[data-trat="renta"], .zwp-badge[data-trat="varen"] { background: #0b6a8f; }
.zwp-badge[data-trat="preve"] { background: #b45309; }
.zwp-badge[data-trat="vendi"] { background: #b91c1c; }
.zwp-detail .zwp-title { margin: 0 0 .35em; font-size: clamp(1.6em, 4vw, 2.4em); font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.zwp-tools { display: inline-flex; gap: .5em; margin-left: .5em; font-size: .45em; vertical-align: middle; }
.zwp-tools .zwp-del { color: #b91c1c; }
.zwp-loc { display: flex; align-items: flex-start; gap: .35em; opacity: .8; }
.zwp-head-price { flex: none; font-size: 1.75em; font-weight: 700; line-height: 1.2; text-align: right; font-variant-numeric: tabular-nums; }
.zwp-head-price .property-term { font-size: .5em; font-weight: 600; letter-spacing: .03em; opacity: .7; }
.zwp-head-price .property-was { display: block; font-size: .5em; font-weight: 400; opacity: .6; }
.zwp-detail .zwp-i { flex: none; width: 1.05em; height: 1.05em; margin-top: .15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Fotos: mosaico (1 grande + hasta 4) */
.zwp-photos {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: .5em;
  aspect-ratio: 16 / 7;
  margin: 0 0 1.5em;
  overflow: hidden;
  border-radius: var(--zwp-radius);
}
.zwp-ph { position: relative; display: block; overflow: hidden; background: var(--zwp-soft); }
.zwp-ph img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .zwp-ph img { transition: transform .3s ease; }
  .zwp-ph:hover img { transform: scale(1.04); }
}
.zwp-ph--main { grid-row: 1 / -1; }
.zwp-ph--hidden { display: none; }
.zwp-ph:focus-visible { outline: 3px solid var(--zwp-accent); outline-offset: -3px; }
.zwp-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 1.5em;
  font-weight: 700;
}
.zwp-photos--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.zwp-photos--2 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr; }
.zwp-photos--2 .zwp-ph--main { grid-row: auto; }
.zwp-photos--3 { grid-template-columns: 2fr 1fr; }
.zwp-photos--4 { grid-template-columns: 2fr 1fr 1fr; }
.zwp-photos--4 .zwp-ph:nth-child(4) { grid-column: 2 / -1; }
@media (max-width: 599px) {
  .zwp-photos, .zwp-photos--3, .zwp-photos--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; aspect-ratio: auto; }
  .zwp-photos .zwp-ph--main { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 3 / 2; }
  .zwp-photos .zwp-ph:not(.zwp-ph--main) { aspect-ratio: 3 / 2; }
  .zwp-photos--4 .zwp-ph:nth-child(4) { grid-column: 1 / -1; }
  .zwp-photos--2 .zwp-ph:nth-child(2) { grid-column: 1 / -1; }
  .zwp-photos .zwp-ph:nth-child(n+4):not(.zwp-ph--hidden) { display: none; }   /* teléfono: 1 grande + 2; el resto en el visor */
  .zwp-photos .zwp-ph:nth-child(3) .zwp-more { display: none; }
}

/* Datos principales */
.zwp-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9em), 1fr));
  gap: .75em;
  margin: 0 0 1.75em;
  padding: 0;
  list-style: none;
}
.zwp-facts li {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: .6em;
  align-items: center;
  padding: .75em 1em;
  border: 1px solid var(--zwp-line);
  border-radius: 12px;
  background: var(--zwp-soft);
}
.zwp-fact-i { grid-row: 1 / -1; display: flex; font-size: 1.4em; opacity: .65; }
.zwp-fact-i .zwp-i { margin: 0; }
.zwp-fact-v { font-size: 1.15em; font-weight: 700; font-variant-numeric: tabular-nums; }
.zwp-fact-l { font-size: .8em; opacity: .7; }

/* Descripción + QR */
.zwp-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5em; margin: 0 0 1.75em; }
@media (min-width: 768px) {
  .zwp-body { grid-template-columns: minmax(0, 1fr) 14em; align-items: start; }
}
.zwp-desc { line-height: 1.65; overflow-wrap: anywhere; }
.zwp-desc p { margin: 0 0 .9em; }
.zwp-desc img { max-width: 100%; height: auto; }
.zwp-side { padding: 1em; border: 1px solid var(--zwp-line); border-radius: var(--zwp-radius); background: var(--zwp-soft); text-align: center; }
.zwp-side p { margin: .5em 0 0; opacity: .85; }
.zwp-qr { display: flex; justify-content: center; min-height: 150px; }
.zwp-qr img, .zwp-qr canvas { max-width: 100%; height: auto; }
.zwp-by { margin-top: 1em; padding-top: 1em; border-top: 1px solid var(--zwp-line); }

/* Características y servicios */
.zwp-amen { margin: 0 0 1.75em; }
.zwp-amen-h { margin: 1em 0 .5em; font-size: 1em; font-weight: 600; opacity: .8; }
.zwp-chips { display: flex; flex-wrap: wrap; gap: .45em; margin: 0; padding: 0; list-style: none; }
.zwp-chips li { padding: .35em .85em; border: 1px solid var(--zwp-line); border-radius: 999px; font-size: .9em; }

/* Contacto + mapa */
.zwp-contact { margin: 0 0 1.5em; padding: 1.25em; border: 1px solid var(--zwp-line); border-radius: var(--zwp-radius); }
.zwp-contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5em; }
@media (min-width: 768px) {
  .zwp-contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
.zwp-contact .zwf { max-width: none; margin: 0; }
.zwp-map { display: block; overflow: hidden; border-radius: 12px; }
.zwp-map img { display: block; width: 100%; height: auto; }
.zwp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75em; font-size: .85em; opacity: .85; }
.zwp-foot .zwp-i { margin: 0; vertical-align: -.15em; }
.zwp-small { font-size: .85em; }

/* Aviso tras enviar el formulario de contacto */
.zwp-sent { padding: 1.5em 1em; text-align: center; }
.zwp-sent:focus { outline: none; }
.zwp-sent .zwp-i { display: block; width: 3em; height: 3em; margin: 0 auto .5em; color: #15803d; }
.zwp-sent h2 { margin: 0 0 .35em; font-size: 1.35em; }

/* ============================================================
   Primitivas del módulo (sustituyen .btn, .form-control, .input-lg, .alert, .sr-only y Glyphicons de
   Bootstrap 3 en ext/properties.php). Autosuficientes; conviven con Bootstrap (prefijo propio, em).
   ============================================================ */
.zwp-btn {
  --zwp-btn-bg: transparent;
  --zwp-btn-fg: inherit;
  --zwp-btn-line: rgba(127, 127, 127, .4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45em;
  min-height: 2.75em;               /* objetivo táctil >= 44px */
  margin: 0;
  padding: .5em 1.1em;
  border: 1px solid var(--zwp-btn-line);
  border-radius: 10px;
  background: var(--zwp-btn-bg);
  color: var(--zwp-btn-fg);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.zwp-btn:hover, .zwp-btn:focus { color: var(--zwp-btn-fg); text-decoration: none; border-color: currentColor; }
.zwp-btn:focus-visible { outline: 3px solid var(--g-accent, #0b6fd6); outline-offset: 2px; }
.zwp-btn:disabled, .zwp-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.zwp-btn--primary { --zwp-btn-bg: var(--g-accent, #0b6fd6); --zwp-btn-fg: #fff; --zwp-btn-line: transparent; }
.zwp-btn--danger  { --zwp-btn-bg: #b91c1c; --zwp-btn-fg: #fff; --zwp-btn-line: transparent; }
.zwp-btn--primary:hover, .zwp-btn--danger:hover,
.zwp-btn--primary:focus, .zwp-btn--danger:focus { filter: brightness(1.1); border-color: transparent; }
.zwp-btn .zwp-i { margin: 0; }

.zwp-input {
  display: block;
  width: 100%;
  min-height: 2.75em;
  margin: 0;
  padding: .55em .8em;
  border: 1px solid rgba(127, 127, 127, .45);
  border-radius: 10px;
  background: transparent;
  background-color: var(--zwp-input-bg, rgba(255, 255, 255, .04));
  color: inherit;
  font: inherit;
  line-height: 1.35;
  box-shadow: none;
}
select.zwp-input { padding-right: 2em; }
select.zwp-input option { color: #222; background: #fff; }   /* la lista desplegable la pinta el sistema */
textarea.zwp-input { min-height: 8em; resize: vertical; }
.zwp-input:focus { border-color: var(--g-accent, #0b6fd6); outline: 0; box-shadow: 0 0 0 3px rgba(11, 111, 214, .2); }
.zwp-input:user-invalid { border-color: #b91c1c; }
.zwp-input:disabled { opacity: .6; cursor: not-allowed; }
.zwp-input--lg { font-size: 1.15em; }
.zwf-pair > .zwp-input { flex: 1 1 0; min-width: 0; }
.zwf-pair > select.zwp-input { flex: 0 1 auto; width: auto; min-width: 5em; }
.zwf-inline > .zwp-btn { min-height: 2.75em; }
@media (max-width: 599px) { .zwf-inline > .zwp-btn { flex: 1 1 100%; } }
.zwf-actions .zwp-btn { min-width: 9em; padding: .55em 1.5em; font-size: 1.05em; }

/* Aviso de error (antes .alert .alert-danger) */
.zwp-alert {
  margin: 0 0 1em;
  padding: .8em 1em;
  border: 1px solid rgba(185, 28, 28, .35);
  border-left: 4px solid #b91c1c;
  border-radius: 10px;
  background: rgba(185, 28, 28, .07);
}

/* Gestor de fotos del formulario (#currFiles recibe la rejilla .zwg de dyn.zw?thumbs) */
#currFiles a.tmb.selected { outline: 3px solid var(--g-accent, #0b6fd6); outline-offset: 2px; }
.zwp-filest { min-height: 1.4em; margin: .5em 0 0; font-size: .9em; }
.zwp-filest--err { color: #b91c1c; }

/* Texto solo para lectores de pantalla (no depende de .sr-only de Bootstrap) */
.zwp-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }


/* ============================================================
   Paginador  (nav.zwd-pager) — mismo estilo que el directorio
   ============================================================ */
.zwd-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5em 1em;
  margin: 1.5em 0;
}
.zwd-pager .zwd-pager-info { margin: 0; font-size: .85em; opacity: .8; }
.zwd-pager ul { display: flex; flex-wrap: wrap; gap: .35em; margin: 0; padding: 0; list-style: none; }
.zwd-pager li { margin: 0; padding: 0; }
.zwd-pager a, .zwd-pager [aria-current] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5em;
  height: 2.5em;
  padding: 0 .65em;
  border: 1px solid var(--zwd-line, rgba(127, 127, 127, .3));
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.zwd-pager a:hover { border-color: currentColor; background: var(--zwd-soft, rgba(127, 127, 127, .07)); }
.zwd-pager a:focus-visible { outline: 3px solid var(--g-accent, #0b6fd6); outline-offset: 2px; }
.zwd-pager [aria-current="page"] {
  border-color: var(--g-accent, #0b6fd6);
  background: var(--g-accent, #0b6fd6);
  color: #fff;
  font-weight: 700;
}
.zwd-pager .zwd-gap { display: flex; align-items: center; padding: 0 .25em; opacity: .6; }
