:root {
  /* Paleta: 4 colores, del más claro al más oscuro. Se cambian desde el panel (Apariencia),
     que los entrega en /tema.css. Los demás tonos de marca se calculan a partir de estos.
     El 1 y el 3 son los de las hojas del logo. */
  --ola-1: #9ad836;   /* acento (lima de la hoja): siempre con texto oscuro encima */
  --ola-2: #1a7f35;   /* botones principales: texto blanco encima */
  --ola-3: #006622;   /* títulos y precios */
  --ola-4: #0f2e1b;   /* fondos oscuros: franja «Vende», pie */
  --ola-suave: color-mix(in srgb, var(--ola-2) 10%, white);   /* fondos claros de íconos */
  --ola-clara: color-mix(in srgb, var(--ola-1) 70%, white);   /* acentos sobre fondos oscuros */
  --ola-profunda: color-mix(in srgb, var(--ola-4) 78%, black); /* pie y fondo de la galería */
  --tinta-acento: #142008;  /* texto sobre el color 1 */
  --tierra: #8a5a22;        /* etiqueta «Terreno» */
  --bg: #f5f3ec;
  --bg-2: #ebe7da;
  --card: #fff;
  --text: #17201a;
  --muted: #5b655c;
  --line: #e2ded1;
  --wa: #1fae55;
  --radius: 16px;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 6px 24px color-mix(in srgb, var(--ola-4) 9%, transparent);
  --shadow-lg: 0 20px 56px color-mix(in srgb, var(--ola-4) 20%, transparent);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }
[hidden] { display: none !important; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0 0 .4em; color: var(--ola-4); letter-spacing: -.005em; }
h2 { font-size: clamp(34px, 4.4vw, 52px); }
h2 em, h1 em { font-style: italic; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ola-2); margin: 0 0 10px; }
.lead { color: var(--muted); font-size: 17.5px; max-width: 620px; margin: 0; }
.muted { color: var(--muted); }
.section { padding: 88px 0; position: relative; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 30px; }
.section-botones { display: flex; gap: 10px; flex-wrap: wrap; }

.i { width: 18px; height: 18px; flex: none; }
.i-sm { width: 15px; height: 15px; }
.i-lg { width: 36px; height: 36px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px;
  font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: background .2s, border-color .2s, transform .1s, filter .2s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ola-2); color: #fff; }
.btn-primary:hover { background: var(--ola-3); }
.btn-dark { background: var(--ola-4); color: #fff; }
.btn-dark:hover { background: var(--ola-3); }
.btn-acento { background: var(--ola-1); color: var(--tinta-acento); }
.btn-acento:hover { filter: brightness(.94); }
.btn-ghost { background: #fff; color: var(--ola-4); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ola-4); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(.94); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* Curvas de nivel: motivo gráfico del sitio (el campo visto en un plano) */
.curvas { position: absolute; left: 0; right: 0; width: 100%; pointer-events: none; display: block; }
.curvas path { fill: none; stroke: var(--ola-1); stroke-width: 1.3; vector-effect: non-scaling-stroke; }

/* ---------- Encabezado ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: background .3s, border-color .3s, color .3s; }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
/* Logo original vectorizado (public/assets/img/logo.svg): marco y hojas con la paleta; el texto en sus
   verdes, o en blanco sobre fondos oscuros (variables logo-texto-1 y logo-texto-2). */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ola-4); }
.logo-img { display: block; height: 64px; width: auto; aspect-ratio: 748 / 333; flex: none; }
.nav { display: flex; gap: 2px; align-items: center; }
.nav a:not(.btn) { padding: 8px 12px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px; color: inherit; }
.nav a:not(.btn):hover, .nav a.activo { background: color-mix(in srgb, var(--ola-2) 10%, transparent); }
.nav .btn { margin-left: 10px; padding: 10px 18px; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: inherit; }
.menu-toggle .i { width: 26px; height: 26px; }

/* Sobre la portada: encabezado transparente con texto blanco hasta que se baja */
.con-hero .header { position: fixed; left: 0; right: 0; color: var(--ola-4); }
.con-hero .header:not(.solido):not(.menu-abierto) { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; }
.con-hero .header:not(.solido):not(.menu-abierto) .logo { color: #fff; --logo-texto-1: #fff; --logo-texto-2: #fff; }
.con-hero .header:not(.solido):not(.menu-abierto) .nav a:not(.btn):hover,
.con-hero .header:not(.solido):not(.menu-abierto) .nav a.activo { background: rgba(255, 255, 255, .14); }

@media (max-width: 1080px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: 76px; left: 0; right: 0; display: none;
    flex-direction: column; align-items: stretch; padding: 10px 16px 18px;
    background: #fff; color: var(--ola-4); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { border-radius: 10px; }
  .nav .btn { margin: 8px 0 0; }
}
@media (max-width: 420px) { .header .logo-img { height: 54px; } }

/* ---------- Portada ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px 0 36px; background: var(--ola-4);
}
.hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-slides img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.08); transition: opacity 1.6s ease, transform 9s linear;
}
.hero-slides img.on { opacity: 1; transform: scale(1); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ola-4) 55%, transparent) 0%, transparent 28%),
    linear-gradient(0deg, color-mix(in srgb, var(--ola-4) 92%, transparent) 0%, color-mix(in srgb, var(--ola-4) 45%, transparent) 45%, transparent 75%),
    linear-gradient(90deg, color-mix(in srgb, var(--ola-4) 55%, transparent) 0%, transparent 60%);
}
.curvas-hero { bottom: 0; height: 46%; z-index: -1; opacity: .35; }
.hero-texto { margin-bottom: 30px; }
.hero .eyebrow { color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(6px); }
.hero .eyebrow .i { color: var(--ola-1); }
.hero h1 { color: #fff; font-size: clamp(46px, 7.4vw, 100px); line-height: .98; max-width: 900px; margin: 6px 0 18px; text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
.hero h1 em { color: var(--ola-1); }
.hero .lead { color: rgba(255, 255, 255, .88); font-size: 18.5px; max-width: 560px; }
.hero-cifras { display: flex; gap: 12px 34px; flex-wrap: wrap; margin-top: 26px; }
.hero-cifras div { display: grid; }
.hero-cifras strong { font: 400 34px/1 var(--serif); color: #fff; }
.hero-cifras span { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .72); margin-top: 4px; }
@media (max-width: 700px) {
  .hero { padding-top: 104px; }
  .hero-cifras strong { font-size: 28px; }
}

/* Buscador de vidrio */
.search {
  position: relative; z-index: 2;
  background: color-mix(in srgb, var(--ola-4) 52%, transparent);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 22px; padding: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}
.search-tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.search-tabs button {
  border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; font-weight: 600;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s;
}
.search-tabs button:hover { background: rgba(255, 255, 255, .12); }
.search-tabs button.on { background: var(--ola-1); border-color: var(--ola-1); color: var(--tinta-acento); }
.search-tabs .n { display: inline-block; min-width: 22px; padding: 1px 6px; margin-left: 4px; border-radius: 999px; font-size: 12px; background: rgba(255, 255, 255, .16); text-align: center; }
.search-tabs button.on .n { background: rgba(0, 0, 0, .12); }
.search-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) repeat(5, minmax(0, 1fr)) auto; gap: 12px; }
.search .field label { color: rgba(255, 255, 255, .82); }
.search .field input, .search .field select { border-color: transparent; }
.search .field-btn .btn { padding-inline: 26px; }
/* Buscador por palabra con lupa (sin la «x» que agrega el navegador a los campos de búsqueda) */
.search .field-buscar input {
  padding-left: 42px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b655c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center / 18px;
}
.search .field-buscar input::-webkit-search-cancel-button { -webkit-appearance: none; }
@media (max-width: 1050px) { .search-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .search-grid .field-buscar { grid-column: 1 / -1; } }
/* En celular: el buscador en su fila y el botón «Buscar» al lado de «Hasta» */
@media (max-width: 560px) {
  .search { padding: 14px; border-radius: 18px; }
  .search-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .search-tabs button { padding: 7px 12px; font-size: 14px; }
}

.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .05em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px;
  font: 15px var(--sans); background: #fff; color: var(--text);
}
.field textarea { resize: vertical; min-height: 110px; }
/* Chevron propio: el nativo de Chrome/Edge queda pegado al borde derecho */
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b655c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
/* En celulares, 16 px evita que el iPhone haga zoom al tocar un campo (y deje la página corrida) */
@media (max-width: 760px) { .field input, .field select, .field textarea { font-size: 16px; } }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ola-2); outline-offset: -1px; border-color: transparent; }
.field-btn { display: flex; align-items: end; }
.field-btn .btn { height: 45px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ola-2); }

/* ---------- Listado ---------- */
.sort { min-width: 200px; }
.list-acciones { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.btn-mapa { height: 45px; }
@media (max-width: 560px) { .list-acciones { width: 100%; } .list-acciones .sort { flex: 1; min-width: 0; } }

/* ---------- Mapa de búsqueda (popup) ---------- */
dialog.mapa-dlg {
  border: 0; padding: 0; border-radius: 20px; overflow: hidden;
  width: min(1320px, 100% - 24px); height: calc(100dvh - 24px); max-width: none; max-height: none;
  background: var(--bg); color: var(--text); box-shadow: var(--shadow-lg);
}
dialog.mapa-dlg[open] { display: flex; flex-direction: column; }
dialog.mapa-dlg::backdrop { background: color-mix(in srgb, var(--ola-profunda) 78%, transparent); backdrop-filter: blur(3px); }
.mapa-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.mapa-head-info { display: flex; align-items: center; gap: 18px; min-width: 0; flex-wrap: wrap; }
.mapa-head h2 { font-size: 26px; margin: 0; }
.mapa-tipos { display: flex; gap: 6px; flex-wrap: wrap; }
.mapa-tipos button {
  border: 1px solid var(--line); background: #fff; color: var(--ola-4); font: 600 14px var(--sans);
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.mapa-tipos button.on { background: var(--ola-4); border-color: var(--ola-4); color: #fff; }
.mapa-tipos .n { font-size: 12px; opacity: .7; margin-left: 2px; }
.mapa-cuerpo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 390px; }
.mapa-lienzo { position: relative; min-height: 0; background: var(--bg-2); font-family: var(--sans); }
.mapa-cargando { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); }
.mapa-lista { min-height: 0; overflow-y: auto; padding: 14px; border-left: 1px solid var(--line); }
.mapa-cuenta { margin: 0 2px 12px; font-weight: 600; color: var(--ola-4); }
.mapa-tarjetas { display: grid; gap: 10px; }
.mapa-nota { margin: 14px 2px 0; font-size: 13px; color: var(--muted); }
.card-mapa {
  display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 12px; padding: 8px; text-decoration: none; color: var(--text);
  background: #fff; border: 2px solid transparent; border-radius: 14px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.card-mapa:hover, .card-mapa.activa { border-color: var(--ola-2); }
.card-mapa img { width: 116px; height: 96px; object-fit: cover; border-radius: 10px; background: var(--bg-2); }
.card-mapa-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card-mapa-precio { font-weight: 700; color: var(--ola-3); font-size: 16px; }
.card-mapa-precio small { font-size: 12px; font-weight: 500; color: var(--muted); }
.card-mapa strong { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-mapa-lugar { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-mapa-aprox { font-size: 12px; color: var(--muted); font-style: italic; }
/* Píldoras con el precio (como en Airbnb) y grupos con el número de propiedades */
.pin-precio, .pin-grupo { width: 0 !important; height: 0 !important; background: none; border: 0; }
.pin-precio span {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap; cursor: pointer;
  padding: 5px 10px; border-radius: 999px; background: #fff; color: var(--ola-4);
  font: 700 13px/1.2 var(--sans); box-shadow: 0 2px 8px rgba(0, 0, 0, .28); border: 1px solid rgba(0, 0, 0, .08);
  transition: transform .12s, background .12s, color .12s;
}
.pin-precio span:hover, .pin-precio span.encima { transform: translate(-50%, -50%) scale(1.1); }
.pin-precio span.activa, .pin-precio span.encima { background: var(--ola-4); color: #fff; }
.pin-grupo span {
  position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--ola-1); color: var(--tinta-acento);
  font: 700 14px var(--sans); border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); cursor: pointer;
}
.mapa-lienzo .leaflet-control-layers { border-radius: 12px; font: 14px var(--sans); }
/* Celular: el mapa ocupa todo y las tarjetas de la zona pasan a un carrusel abajo */
@media (max-width: 760px) {
  dialog.mapa-dlg { width: 100%; height: 100dvh; border-radius: 0; }
  .mapa-head { padding: 8px 10px; }
  .mapa-head h2 { display: none; }
  .mapa-head-info { flex-wrap: nowrap; overflow-x: auto; }
  .mapa-tipos { flex-wrap: nowrap; }
  .mapa-tipos button { white-space: nowrap; }
  .mapa-cuerpo { display: block; position: relative; }
  .mapa-lienzo { position: absolute; inset: 0; }
  .mapa-lista { position: absolute; left: 0; right: 0; bottom: 0; z-index: 500; border: 0; padding: 0 0 12px; overflow: visible; pointer-events: none; }
  .mapa-cuenta { display: inline-block; margin: 0 0 8px 12px; padding: 4px 10px; border-radius: 999px; background: #fff; font-size: 13px; box-shadow: var(--shadow); pointer-events: auto; }
  .mapa-tarjetas { display: flex; gap: 10px; overflow-x: auto; padding: 0 12px 4px; scroll-snap-type: x mandatory; pointer-events: auto; }
  .card-mapa { flex: 0 0 min(86%, 340px); scroll-snap-align: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
  .mapa-nota { display: none; }
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px; }
.card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { position: relative; aspect-ratio: 4 / 3; background: var(--bg-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; transition: transform .6s; }
.card:hover .card-img img { transform: scale(1.05); }
.card-img::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.tag { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 1; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: #fff; color: var(--ola-4); line-height: 1.2; }
.pill-tipo { background: var(--ola-2); color: #fff; }
.pill-tipo[data-tipo="Parcela sin casa"] { background: var(--ola-1); color: var(--tinta-acento); }
.pill-tipo[data-tipo="Terreno"] { background: var(--tierra); color: #fff; }
.pill-tipo[data-tipo="Casa"], .pill-tipo[data-tipo="Departamento"] { background: var(--ola-4); color: #fff; }
.pill-arriendo { background: var(--ola-4); color: #fff; }
.pill-dest { background: #fff; color: var(--ola-4); }
/* Vendidas (o arrendadas) por Parcelas en Valdivia: sello sobre la foto */
.sello {
  position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-6deg);
  padding: 8px 22px 6px; border: 3px solid #fff; border-radius: 10px; pointer-events: none;
  background: color-mix(in srgb, var(--ola-4) 80%, transparent); color: #fff;
  font: 400 26px/1 var(--serif); letter-spacing: .12em; text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.gallery .sello { font-size: clamp(28px, 4.4vw, 42px); padding: 12px 32px 9px; }
.card.vendida .card-img img { filter: saturate(.55); }
.card.vendida .price { color: var(--muted); }
.ver-vendidas { grid-column: 1 / -1; display: grid; justify-items: center; gap: 22px; margin-top: 8px; }
.ver-vendidas h3 { margin: 10px 0 0; justify-self: start; font-size: 30px; }
.card-meta {
  position: absolute; bottom: 10px; left: 12px; right: 12px; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; font-weight: 600; color: #fff;
}
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.price { font-size: 23px; font-weight: 700; color: var(--ola-3); letter-spacing: -.01em; }
.price small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.card h3 { font: 600 16px/1.35 var(--sans); margin: 0; color: var(--text); }
.loc { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin: 0; }
.feats {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin: auto 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line);
  font-size: 14px; color: var(--muted);
}
.card .feats { margin-top: 10px; }
.feats li { display: flex; align-items: center; gap: 6px; }
.feats .i { color: var(--ola-2); }
.empty { grid-column: 1 / -1; text-align: center; padding: 56px 20px; background: #fff; border-radius: var(--radius); color: var(--muted); }
.empty p { margin: 0 0 16px; }

/* ---------- Nosotros ---------- */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.split > * { min-width: 0; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .benefits { grid-template-columns: 1fr; } }
.benefit { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.benefit .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--ola-suave); color: var(--ola-2); display: grid; place-items: center; margin-bottom: 12px; }
.benefit .ico .i { width: 22px; height: 22px; }
.benefit h3 { font: 600 16px var(--sans); margin: 0 0 4px; color: var(--ola-4); }
.benefit p { margin: 0; color: var(--muted); font-size: 14px; }
.nosotros-oficina { display: flex; gap: 8px; align-items: center; margin: 22px 0 0; color: var(--muted); }
.nosotros-oficina .i { color: var(--ola-2); }
.nosotros-oficina strong { color: var(--ola-4); }

/* ---------- Vende con nosotros ---------- */
.sell { background: var(--ola-4); color: #cfdccf; overflow: hidden; }
.sell > .container { position: relative; z-index: 1; }
.curvas-sell { top: 0; height: 60%; opacity: .22; }
.sell h2 { color: #fff; }
.sell .eyebrow { color: var(--ola-1); }
.sell .lead { color: #c2d1c3; }
.steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; counter-reset: paso; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.steps li::before {
  counter-increment: paso; content: counter(paso);
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ola-1); color: var(--tinta-acento); font-weight: 700;
}
.steps strong { color: #fff; display: block; }
.form-card { background: #fff; color: var(--text); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-lg); border: 0; margin: 0; min-width: 0; }
.form-card h3 { font-size: 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } .form-card { padding: 22px 18px; } }
.form-hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; text-align: center; }
.form-estado { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.form-estado.ok { background: #e1f3e3; color: #17652f; }
.form-estado.error { background: #fdecea; color: #b3261e; }
.form-estado .btn { margin-top: 8px; }
#c-turnstile:not(:empty) { margin-top: 14px; }
.oculto-visual { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Contacto ---------- */
#contacto { padding-top: 0; }
.contact-list { display: grid; gap: 14px; margin-top: 24px; }
.contact-item { display: flex; gap: 14px; align-items: center; text-decoration: none; background: #fff; padding: 16px 18px; border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s; }
a.contact-item:hover { transform: translateX(3px); }
.contact-item .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--ola-suave); color: var(--ola-2); flex: none; }
.contact-item > div { min-width: 0; }
.contact-item strong { overflow-wrap: anywhere; color: var(--ola-4); }
.contact-item span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.contact-item strong span { display: inline; font-size: inherit; text-transform: none; letter-spacing: 0; color: inherit; }

/* ---------- Pie ---------- */
.footer { position: relative; overflow: hidden; background: var(--ola-profunda); color: #a9bba9; padding: 64px 0 28px; font-size: 14px; }
.footer > .container { position: relative; }
.curvas-pie { top: 0; height: 140px; opacity: .18; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer .logo { color: #fff; --logo-texto-1: #fff; --logo-texto-2: #fff; }
.footer .logo-img { height: 76px; }
.footer h4 { color: #fff; margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer a { text-decoration: none; overflow-wrap: anywhere; }
.footer a:hover { color: #fff; }
.footer li:has(> a[hidden]) { display: none; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float .i { width: 28px; height: 28px; }

/* ---------- Ficha (popup) ---------- */
dialog.det {
  border: 0; padding: 0; border-radius: 20px; overflow-y: auto;
  width: min(1120px, 100% - 24px); max-width: none; max-height: calc(100dvh - 24px);
  background: var(--bg); color: var(--text); box-shadow: var(--shadow-lg);
}
dialog.det::backdrop { background: color-mix(in srgb, var(--ola-profunda) 78%, transparent); backdrop-filter: blur(3px); }
.det-head {
  position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line);
}
.det-head-info { min-width: 0; }
.det-code { font-size: 14px; color: var(--muted); margin-left: 8px; }
.det-actions { display: flex; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ola-4); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { border-color: var(--ola-4); }
.gallery { position: relative; background: var(--ola-profunda); }
/* contain: las fotos verticales se ven completas, sin recortes */
.gallery-main { width: 100%; aspect-ratio: 16 / 9; max-height: 68vh; object-fit: contain; }
.gallery:fullscreen { display: grid; place-items: center; }
.gallery:fullscreen .gallery-main { max-height: 100vh; height: 100vh; aspect-ratio: auto; }
@media (max-width: 700px) { .gallery-main { aspect-ratio: 1 / 1; } }
.gal-nav, .gal-full {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: var(--ola-4); display: grid; place-items: center;
}
.gal-nav.prev { left: 14px; }
.gal-nav.next { right: 14px; }
.gal-full { top: 14px; right: 14px; transform: none; width: 40px; height: 40px; }
.gal-count { position: absolute; right: 14px; bottom: 14px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.thumbs { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; background: var(--ola-profunda); scrollbar-width: thin; }
.thumbs button { flex: none; width: 84px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; opacity: .55; cursor: pointer; background: none; }
.thumbs button.on { border-color: var(--ola-1); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.det-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; padding: 28px; }
@media (max-width: 900px) { .det-body { grid-template-columns: 1fr; padding: 22px 16px; } }
.det-body h2 { margin-bottom: 8px; font-size: clamp(30px, 3.6vw, 42px); }
.det-body h3 { font-size: 26px; margin-top: 32px; }
.det-body .price { font-size: 28px; margin-top: 12px; }
.desc { white-space: pre-line; margin: 0; }
.spec { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 20px; }
.spec div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.spec span { display: block; font-size: 12px; color: var(--muted); }
.spec strong { font-size: 16px; color: var(--ola-4); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 16px 0 0; }
.chips li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--ola-suave); color: var(--ola-3); font-size: 14px; font-weight: 600; }
.video-wrap { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.video-wrap.short { aspect-ratio: 9 / 16; max-width: 340px; }
.video-wrap iframe, .map iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-ph { aspect-ratio: 16 / 9; border-radius: 12px; border: 2px dashed #c9c5b6; background: #fff; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; color: var(--muted); padding: 20px; }
.video-ph p { margin: 0; max-width: 420px; }
.map { aspect-ratio: 16 / 8; border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.aside-card { position: sticky; top: 80px; display: grid; gap: 10px; background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.aside-card .price { margin: 0; font-size: 24px; }
.aside-card p { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.similares { padding: 8px 28px 32px; }
.similares > h3 { font-size: 26px; }
.grid-sim { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
@media (max-width: 900px) { .similares { padding: 0 16px 24px; } }

/* Toast */
/* top/right/margin/border: anulan los estilos que el navegador le da a un [popover] */
.toast {
  position: fixed; left: 50%; bottom: 28px; top: auto; right: auto; margin: 0; border: 0; overflow: visible;
  width: max-content; max-width: calc(100% - 32px); z-index: 100; transform: translate(-50%, 20px);
  background: var(--ola-4); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-slides img { transition: opacity .6s; transform: none; }
  .card, .card-img img { transition: none; }
}

/* ---------- Panel de administración ---------- */
.login {
  position: relative; overflow: hidden;
  min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background: linear-gradient(135deg, var(--ola-4), var(--ola-3));
}
.login-card { position: relative; width: min(420px, 100%); background: #fff; border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg); display: grid; gap: 16px; }
.login-card h1 { font-size: 32px; margin: 8px 0 0; }
.login-card > * { min-width: 0; }
#turnstile { max-width: 100%; overflow: hidden; }
#turnstile:empty { display: none; }
@media (max-width: 480px) {
  .login { padding: 16px 12px; place-items: start center; padding-top: max(40px, env(safe-area-inset-top)); }
  .login-card { padding: 26px 20px; gap: 14px; }
  .login-card h1 { font-size: 28px; }
}
.note { background: #fff7e6; border: 1px solid #f1d9a6; color: #6b4a0c; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin: 0; }
.admin-bar { background: var(--ola-4); color: #fff; position: sticky; top: 0; z-index: 20; }
.admin-bar .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.logo-panel { --logo-texto-1: #fff; --logo-texto-2: #fff; color: #fff; gap: 10px; }
.logo-panel .logo-img { height: 44px; }
.logo-panel small { font: 700 10px var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--ola-1); padding: 3px 0 3px 10px; border-left: 1px solid rgba(255, 255, 255, .25); }
.login-card .logo-img { height: 72px; }
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.admin-acciones { display: flex; gap: 6px; }
.admin-nav a, .admin-nav button, .admin-acciones button, .admin-acciones a { display: inline-flex; align-items: center; gap: 6px; color: #d3e0d3; background: none; border: 0; padding: 8px 12px; border-radius: 8px; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: 500; }
.admin-nav a:hover, .admin-nav button:hover, .admin-acciones button:hover, .admin-acciones a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
/* Número de consultas nuevas en el menú */
.admin-nav button { position: relative; }
.nav-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--ola-1); color: var(--tinta-acento); font: 700 11px/18px var(--sans); text-align: center; }
@media (max-width: 760px) { .nav-badge { position: absolute; top: 2px; left: calc(50% + 6px); } }
.admin-nav .activo { background: rgba(255, 255, 255, .12); color: #fff; }
.admin-nav .activo .i { color: var(--ola-1); }
/* En escritorio el menú es solo texto; los íconos se usan en celular */
.admin-nav .i, .admin-acciones .i { display: none; }
/* Buscador y filtros del listado */
.filtros-lista { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 18px; }
.filtros-lista input[type="search"] { padding-left: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b655c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center / 18px; }
.cargando .btn { margin-left: 8px; }
.panel { padding: 28px 0 64px; display: grid; gap: 24px; }
.panel h2 { font-size: clamp(30px, 3.6vw, 40px); }
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #faf9f5; }
tr:last-child td { border-bottom: 0; }
.t-title { white-space: normal; min-width: 220px; }
.thumb { width: 64px; height: 46px; border-radius: 6px; object-fit: cover; background: var(--bg-2); }
.status { border: 0; border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; background: #eceae2; color: var(--muted); }
.status.on { background: #e1f3e3; color: #17652f; }
/* Estado en el listado: la píldora se ve y encima va un select invisible (a 16px, para que el
   iPhone no haga zoom) que abre la lista nativa de estados */
.estado-sel { position: relative; display: inline-block; }
.estado-sel .status { display: inline-flex; align-items: center; gap: 4px; padding-right: 8px; white-space: nowrap; }
.estado-sel .status .i { width: 13px; height: 13px; }
.estado-sel select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; appearance: none; -webkit-appearance: none; border: 0; }
.estado-sel:has(select:focus-visible) .status { outline: 2px solid var(--ola-2); outline-offset: 2px; }
.st-publicada { background: #e1f3e3; color: #17652f; }
.st-vendida { background: color-mix(in srgb, var(--ola-1) 22%, white); color: var(--ola-4); }
.st-archivada { background: #f3e9d6; color: #7a5310; }
.t-estado { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); font-weight: 400; }
dialog.dlg-archivar { width: min(440px, calc(100% - 32px)); border: 0; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-lg); }
dialog.dlg-archivar::backdrop { background: rgba(10, 25, 15, .5); }
.dlg-archivar h2 { font-size: 28px; margin: 0 0 6px; }
.dlg-archivar p { margin: 0 0 16px; font-size: 14px; }
.arch-motivos { border: 0; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.arch-motivos legend { font-weight: 600; font-size: 14px; margin-bottom: 10px; padding: 0; }
.arch-motivos > div { display: grid; gap: 10px; }
.dlg-archivar .form-actions { justify-content: flex-end; }

/* ---------- Instagram: editor de historias y posts (panel) ---------- */
dialog.dlg-insta {
  border: 0; padding: 0; border-radius: 18px; width: min(1080px, 100% - 24px); max-width: none; max-height: calc(100dvh - 24px);
  overflow-y: auto; background: #fff; color: var(--text); box-shadow: var(--shadow-lg);
}
dialog.dlg-insta::backdrop { background: color-mix(in srgb, var(--ola-profunda) 70%, transparent); }
.dlg-insta .det-head h2 { font-size: 28px; margin: 0; }
.dlg-insta .det-head h2 em { color: var(--ola-2); }
.ig-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.ig-vista { position: relative; display: grid; place-items: center; padding: 22px; background: #1f2621; min-height: 420px; }
#ig-canvas { display: block; height: min(70vh, 720px); width: auto; max-width: 100%; border-radius: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, .45); }
#ig-canvas.cuadrado { height: auto; width: min(100%, 560px); }
.ig-vista .cargando { position: absolute; top: 12px; right: 16px; margin: 0; padding: 0; color: #ddd; font-size: 13px; }
.ig-controles { padding: 18px 22px 22px; display: grid; gap: 12px; align-content: start; }
.ig-controles [hidden] { display: none !important; }
.ig-controles .form-grid { gap: 12px; }
.ig-controles .field label .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.ig-formato { display: flex; gap: 8px; }
.ig-formato label { flex: 1; position: relative; }
.ig-formato input { position: absolute; opacity: 0; pointer-events: none; }
.ig-formato span { display: block; padding: 10px; border: 1px solid var(--line); border-radius: 12px; text-align: center; font-size: 14px; font-weight: 600; cursor: pointer; }
.ig-formato small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.ig-formato input:checked + span { border-color: var(--ola-2); background: var(--ola-suave); }
.ig-formato input:focus-visible + span { outline: 2px solid var(--ola-2); outline-offset: 2px; }
.ig-fotos { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; }
.ig-fotos button { width: 60px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; }
.ig-fotos button.on { border-color: var(--ola-2); }
.ig-fotos button.extra { border-color: var(--ola-2); border-style: dashed; }
.ig-fotos img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ig-acciones { margin-top: 4px; }
.ig-acciones .btn { flex: 1; }
.ig-ayuda { margin: 0; font-size: 12.5px; }
@media (max-width: 900px) {
  .ig-grid { grid-template-columns: 1fr; }
  .ig-vista { padding: 14px; min-height: 0; }
  #ig-canvas { height: 56vh; }
  .ig-controles .form-grid { grid-template-columns: 1fr 1fr; }
}
/* Acciones con ícono en la tabla (con tooltip [data-tip]). El flex va en un div dentro de la
   celda: puesto en el <td>, la celda dejaba de ser celda de tabla y se descuadraba la fila. */
th.c-acc { width: 1%; }
.acciones { display: flex; gap: 6px; align-items: center; }
.accion {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ola-4);
  display: inline-grid; place-items: center; cursor: pointer; flex: none; padding: 0; text-decoration: none; font: inherit;
  transition: background-color .15s, border-color .15s, color .15s;
}
.accion .i { width: 17px; height: 17px; }
.accion:hover, .accion:focus-visible { border-color: var(--ola-4); background: var(--ola-4); color: #fff; }
/* Sin ubicación en el mapa del sitio: el botón del pin se marca en tono tierra */
.accion.falta { border-color: color-mix(in srgb, var(--tierra) 45%, white); color: var(--tierra); background: #fbf4ea; }

/* ---------- Consultas (panel) ---------- */
.consultas { display: grid; gap: 12px; }
.consulta { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; border-left: 4px solid transparent; }
.consulta.nueva { border-left-color: var(--ola-1); }
.consulta header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.consulta header strong { font-size: 16px; color: var(--ola-4); }
.consulta time { margin-left: auto; font-size: 13px; color: var(--muted); }
.pill-nueva { background: var(--ola-1); color: var(--tinta-acento); font-size: 11px; padding: 3px 8px; }
.consulta-sobre { margin: 4px 0 8px; font-size: 14px; color: var(--muted); }
.consulta-sobre a { color: var(--ola-2); font-weight: 600; }
.consulta-msg { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.consulta-datos { margin: 0 0 12px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.consulta-aviso { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: #fbf4ea; color: #6b4a16; font-size: 13px; }
.consulta-acc { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.consulta-acc .btn .i { width: 16px; height: 16px; }
.consulta-acc .accion { margin-left: auto; }

/* ---------- Estadísticas (panel) ---------- */
.est-cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (max-width: 900px) { .est-cifras { grid-template-columns: 1fr 1fr; } }
.est-cifra { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: grid; gap: 2px; }
.est-cifra strong { font: 400 40px/1 var(--serif); color: var(--ola-4); }
.est-cifra span { font-weight: 600; color: var(--ola-3); }
.est-cifra small { font-size: 12.5px; color: var(--muted); }
.est-grafico-card { margin-bottom: 14px; }
.est-grafico-card h3 { margin: 0 0 12px; font-size: 22px; }
.est-grafico { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 160px; padding-bottom: 20px; }
.est-grafico::before, .est-grafico::after { position: absolute; bottom: 0; font-size: 11.5px; color: var(--muted); }
.est-grafico::before { content: attr(data-desde); left: 0; }
.est-grafico::after { content: attr(data-hasta); right: 0; }
.est-dia { flex: 1; min-width: 0; height: 100%; position: relative; display: flex; align-items: flex-end; }
.est-dia:hover { background: var(--ola-suave); border-radius: 4px; }
.est-v, .est-c { position: absolute; bottom: 0; border-radius: 3px 3px 0 0; }
.est-v { left: 8%; right: 8%; background: color-mix(in srgb, var(--ola-2) 35%, white); }
.est-c { left: 25%; right: 25%; background: var(--ola-3); }
.est-leyenda { margin: 8px 0 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.est-leyenda span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.ley-visitas { background: color-mix(in srgb, var(--ola-2) 35%, white); }
.ley-contactos { background: var(--ola-3); margin-left: 12px; }
.tabla-est .num { text-align: right; white-space: nowrap; }
.tabla-est th.num { text-align: right; }

/* ---------- Ubicación en el mapa (panel) ---------- */
.aviso-mapa {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 14px;
  border-radius: 12px; background: #fbf4ea; border: 1px solid #efdcc0; color: #6b4a16; font-size: 14px;
}
.aviso-mapa > .i { color: var(--tierra); }
.aviso-mapa > span { flex: 1 1 260px; }
dialog.dlg-ubicacion {
  border: 0; padding: 0; border-radius: 18px; width: min(860px, 100% - 24px); max-width: none; max-height: calc(100dvh - 24px);
  overflow-y: auto; background: #fff; color: var(--text); box-shadow: var(--shadow-lg);
}
dialog.dlg-ubicacion::backdrop { background: color-mix(in srgb, var(--ola-profunda) 70%, transparent); }
.dlg-ubicacion .det-head h2 { font-size: 26px; margin: 0; }
.ub-cuerpo { padding: 16px 20px 20px; display: grid; gap: 12px; }
.ub-buscar { display: flex; gap: 8px; flex-wrap: wrap; }
.ub-buscar input { flex: 1 1 240px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; font: 15px var(--sans); }
.ub-resultados { list-style: none; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: 12px; max-height: 180px; overflow-y: auto; }
.ub-resultados li { padding: 0; }
.ub-resultados li.muted { padding: 8px 10px; font-size: 14px; }
.ub-resultados button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: none; font: 14px var(--sans); color: var(--text); cursor: pointer; }
.ub-resultados button:hover { background: var(--ola-suave); }
.ub-mapa { position: relative; height: min(52vh, 440px); border-radius: 14px; overflow: hidden; background: var(--bg-2); font-family: var(--sans); }
.ub-ayuda { margin: 0; font-size: 13px; }
.ub-form { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.accion:focus-visible { outline: 2px solid var(--ola-2); outline-offset: 2px; }
.accion span { display: none; }
.tip {
  position: fixed; z-index: 1000; left: 0; top: 0; transform: translate(-50%, -100%); pointer-events: none;
  background: var(--ola-4); color: #fff; font: 500 12px/1.2 var(--sans); padding: 6px 10px; border-radius: 7px;
  white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); opacity: 0; visibility: hidden; transition: opacity .12s;
}
.tip.on { opacity: 1; visibility: visible; }
.admin-form { display: grid; gap: 20px; }
.admin-form legend { font-family: var(--serif); font-size: 28px; color: var(--ola-4); padding: 0; float: left; width: 100%; margin-bottom: 16px; }
.admin-form .form-card { box-shadow: var(--shadow); border-radius: var(--radius); }
.admin-form .form-grid { clear: both; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-form .form-grid .half { grid-column: span 2; }
@media (max-width: 800px) { .admin-form .form-grid { grid-template-columns: 1fr 1fr; } }
.checks { display: flex; gap: 12px 24px; flex-wrap: wrap; }
.checks-caract { clear: both; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; }
.uploader { clear: both; display: grid; justify-items: center; gap: 6px; border: 2px dashed #c9c5b6; border-radius: 12px; padding: 28px; text-align: center; cursor: pointer; color: var(--muted); transition: .2s; }
.uploader:hover, .uploader.drag { border-color: var(--ola-2); background: var(--ola-suave); color: var(--ola-2); }
.uploader .i { width: 30px; height: 30px; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 14px; }
.preview { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--bg-2); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
.preview .rm { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; cursor: pointer; }
.preview .cover { position: absolute; left: 6px; bottom: 6px; }
.preview .mk { position: absolute; left: 6px; bottom: 6px; border: 0; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 600; background: rgba(255, 255, 255, .9); color: var(--ola-4); cursor: pointer; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.btn-peligro { color: #b3261e; margin-right: auto; }
.btn-peligro:hover { border-color: #b3261e; }
.btn[disabled] { opacity: .6; cursor: wait; }
.field .err { margin: 6px 0 0; font-size: 13px; }
.field.con-error input, .field.con-error select, .field.con-error textarea { border-color: #b3261e; }
.preview .orden { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; }
.preview .orden button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; cursor: pointer; }
.preview .orden button[disabled] { opacity: .3; cursor: default; }
.preview.subiendo img { opacity: .4; }
.preview .estado { position: absolute; inset: auto 6px 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 6px; text-align: center; }
.preview.fallo .estado { background: #b3261e; }
.cargando { padding: 48px 16px; text-align: center; color: var(--muted); }

/* Apariencia */
.apariencia { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 900px) { .apariencia { grid-template-columns: 1fr; } }
.apariencia h3 { font-size: 24px; }
.paletas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.paleta { display: grid; gap: 6px; padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; font-size: 13px; font-weight: 600; color: var(--text); }
.paleta:hover, .paleta.on { border-color: var(--text); }
.muestras { display: flex; height: 26px; border-radius: 6px; overflow: hidden; }
.muestras span { flex: 1; }
.colores { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.color { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; cursor: pointer; }
.color input { width: 42px; height: 34px; border: 0; padding: 0; background: none; cursor: pointer; flex: none; }
.color code { display: block; color: var(--muted); font-size: 12px; }
#tema-avisos .note { margin-top: 12px; }
/* Los derivados se recalculan aquí para que sigan los colores que se están probando */
.vista-previa {
  --ola-suave: color-mix(in srgb, var(--ola-2) 10%, white);
  --ola-clara: color-mix(in srgb, var(--ola-1) 70%, white);
  --ola-profunda: color-mix(in srgb, var(--ola-4) 78%, black);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--bg);
}
.vp-hero { padding: 22px; color: #fff; background: linear-gradient(160deg, var(--ola-3) 0%, var(--ola-4) 100%); }
.vp-hero .logo { color: #fff; --logo-texto-1: #fff; --logo-texto-2: #fff; }
.vp-hero .eyebrow { color: var(--ola-1); margin-top: 18px; }
.vp-titulo { font: 400 32px/1.05 var(--serif); margin: 0; }
.vp-titulo em { color: var(--ola-1); }
.vp-cuerpo { padding: 22px; background: #fff; }
.vp-botones { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 0; }
.vp-pie { padding: 14px 22px; background: var(--ola-profunda); color: #c2d1c3; font-size: 13px; }
.err { color: #b3261e; font-size: 14px; margin: 8px 0 0; }
#video-prev { margin-top: 14px; max-width: 560px; }

/* ---------- Páginas legales y 404 ---------- */
.pagina { padding: 48px 0 80px; }
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(38px, 5vw, 56px); }
.legal h2 { font-size: 28px; margin-top: 34px; }
.legal p, .legal li { line-height: 1.7; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--ola-2); overflow-wrap: anywhere; }
.pagina-404 { min-height: 50vh; }
.footer-links { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.footer-mini { padding: 0 0 24px; }
.footer-mini .footer-bottom { margin-top: 0; }

/* ---------- Panel en celulares ---------- */
@media (max-width: 760px) {
  /* Arriba una sola fila: logo, y «Instalar app» y «Salir» como íconos */
  .admin-bar .container { height: 56px; }
  .logo-panel .logo-img { height: 40px; }
  .admin-acciones { gap: 2px; }
  .admin-acciones button, .admin-acciones a { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .admin-acciones span { display: none; }
  .admin-acciones .i { display: block; width: 22px; height: 22px; }
  /* Las secciones van en una barra inferior fija, al alcance del pulgar (como una app) */
  .admin-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--ola-4); box-shadow: 0 -4px 16px rgba(0, 0, 0, .18);
  }
  .admin-nav a, .admin-nav button { flex-direction: column; gap: 3px; padding: 7px 2px; font-size: 11px; border-radius: 10px; }
  .admin-nav .i { display: block; width: 22px; height: 22px; }
  .panel { padding-top: 20px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  #app ~ .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .filtros-lista { grid-template-columns: 1fr 1fr; gap: 10px; }
  .filtros-lista .buscar { grid-column: 1 / -1; }
  .section-head .btn, .section-botones { width: 100%; }
  /* La tabla pasa a tarjetas */
  .table-wrap { background: none; box-shadow: none; overflow: visible; }
  .table-wrap table, .table-wrap tbody { display: block; }
  .table-wrap thead { display: none; }
  .table-wrap tbody tr {
    display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
    grid-template-areas: "foto cod estado" "foto tit tit" "foto precio precio" "acc acc acc";
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; margin-bottom: 12px;
  }
  .table-wrap td { border: 0; padding: 0; white-space: normal; }
  .table-wrap td.cargando { grid-column: 1 / -1; padding: 24px 0; }
  .c-foto { grid-area: foto; align-self: start; }
  .c-foto .thumb { width: 72px; height: 54px; }
  .c-cod { grid-area: cod; }
  .c-tit { grid-area: tit; min-width: 0; font-weight: 500; }
  .c-precio { grid-area: precio; color: var(--muted); }
  .c-estado { grid-area: estado; }
  .c-op, .c-comuna { display: none; }
  .c-acc { grid-area: acc; margin-top: 8px; }
  /* En celular no hay tooltip: los botones muestran ícono y texto */
  .c-acc .acciones .accion { flex: 1; min-width: 0; width: auto; height: 38px; padding: 0 4px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 500; }
  .c-acc .acciones .accion .i { width: 15px; height: 15px; }
  .c-acc .accion span { display: inline; }
  /* Estadísticas: código y título arriba, las cifras en una fila con su nombre */
  .tabla-est tbody tr { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-areas: none; }
  .tabla-est .c-cod { grid-area: auto; grid-column: 1 / 2; }
  .tabla-est .t-title { grid-column: 2 / -1; font-weight: 500; }
  .tabla-est td.num { text-align: center; font-size: 16px; margin-top: 6px; }
  .tabla-est td.num::before { content: attr(data-et); display: block; font-size: 11px; color: var(--muted); }
  .tabla-est .c-acc { grid-area: auto; grid-column: 1 / -1; }
  /* Formulario */
  .admin-form .form-card { padding: 18px; }
  .form-actions .btn { flex: 1 1 100%; }
  .btn-peligro { margin-right: 0; order: 3; }
}
@media (max-width: 520px) {
  .admin-form .form-grid { grid-template-columns: 1fr; }
  .admin-form .form-grid .half { grid-column: auto; }
  .uploader { padding: 20px 12px; }
}

/* Copyright y sello de Qodes en la misma línea (se separan en pantallas chicas).
   baseline y no center: tienen distinto tamaño de letra y alto de línea, y así los textos
   quedan sobre la misma línea sin ajustar márgenes a mano. */
.footer-firma { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }

/* Sello «Developed by Qodes» (fuente: repo qodesstudio, badge/qodes-badge.css).
   Hereda la fuente y el color del pie del cliente, así combina con cualquier diseño;
   solo el isotipo mantiene el naranjo de la marca. */
.qodes-badge {
  --qodes-badge-acento: #F35815;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 13px;
  line-height: 1;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.85;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.qodes-badge strong { font-weight: 700; letter-spacing: -0.01em; }
.qodes-badge-icon {
  width: 1.5em;
  height: auto;
  color: var(--qodes-badge-acento);
  transition: transform 0.2s ease;
}
a.qodes-badge:hover,
a.qodes-badge:focus-visible { color: var(--qodes-badge-acento); opacity: 1; } /* a.: gana a los «footer a:hover» del sitio */
.qodes-badge:hover .qodes-badge-icon { transform: translateX(2px); }
@media (prefers-reduced-motion: reduce) {
  .qodes-badge, .qodes-badge-icon { transition: none; }
}

/* =====================================================================
   /lobby: página de enlaces para redes sociales (estilo de la portada:
   foto de una parcela, velo de la paleta y botones de vidrio como el buscador)
   ===================================================================== */
.lobby { min-height: 100dvh; overflow-x: hidden; background: var(--ola-4); color: #fff; }
.lobby-fondo { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.lobby::before { content: ""; position: fixed; inset: 0; z-index: 1; background:
  linear-gradient(180deg, color-mix(in srgb, var(--ola-4) 50%, transparent) 0%, color-mix(in srgb, var(--ola-4) 76%, transparent) 45%, color-mix(in srgb, var(--ola-4) 95%, transparent) 100%); }
.lobby-main {
  position: relative; z-index: 2; min-height: 100dvh;
  width: min(440px, 100% - 40px); margin-inline: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: max(40px, env(safe-area-inset-top)) 0 max(32px, env(safe-area-inset-bottom));
}
.lobby-logo { display: grid; justify-items: center; gap: 14px; text-decoration: none; color: #fff; text-align: center; --logo-texto-1: #fff; --logo-texto-2: #fff; }
.lobby-logo .logo-img { height: 102px; width: auto; aspect-ratio: 748 / 333; filter: drop-shadow(0 8px 22px rgb(0 0 0 / 30%)); }
.lobby-titulo { font: 400 30px/1.08 var(--serif); letter-spacing: -.005em; }
.lobby-titulo em { display: block; color: var(--ola-1); }
.lobby-enlaces { width: 100%; display: grid; gap: 12px; margin-top: 4px; }
.lobby-btn {
  position: relative; display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 64px;
  border: 1px solid rgb(255 255 255 / 28%); border-radius: 16px;
  background: rgb(255 255 255 / 10%); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  color: #fff; text-decoration: none; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; font-weight: 600;
  transition: transform .15s, background .15s, color .15s;
}
.lobby-btn[hidden] { display: none; }
.lobby-btn:hover { background: #fff; color: var(--ola-4); transform: translateY(-1px); }
.lobby-btn.lobby-wa { background: var(--wa); border-color: var(--wa); }
.lobby-btn.lobby-wa:hover { background: #17924a; color: #fff; }
.lobby-btn .i { position: absolute; left: 22px; width: 24px; height: 24px; }
.lobby-btn span { text-align: center; }
.lobby-pie { display: grid; justify-items: center; gap: 2px; margin-top: 4px; text-decoration: none; color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.lobby-pie .i { width: 20px; height: 20px; }
.lobby .qodes-badge { color: #fff; font-size: 12px; }
@media (max-height: 700px) { .lobby-logo .logo-img { height: 80px; } .lobby-titulo { font-size: 25px; } .lobby-main { gap: 16px; } .lobby-btn { min-height: 50px; } }

/* =====================================================================
   /informe/PV-…/…: cifras de una publicación para el propietario
   ===================================================================== */
.informe { background: var(--bg); }
.inf-cabecera { background: var(--ola-4); --logo-texto-1: #fff; --logo-texto-2: #fff; }
.inf-cabecera .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 76px; max-width: 900px; }
.inf-cabecera .logo-img { height: 54px; width: auto; aspect-ratio: 748 / 333; }
.inf-fecha { color: #d3e0d3; font-size: 14px; }
.inf-main { padding-top: 32px; padding-bottom: 48px; max-width: 900px; }
.inf-main h2 { font-size: 30px; margin: 32px 0 14px; }
.inf-prop { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: center; padding: 12px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.inf-prop img { width: 180px; height: 130px; object-fit: cover; border-radius: 12px; }
.inf-prop > span { display: grid; gap: 4px; }
.inf-prop strong { font: 400 26px/1.15 var(--serif); color: var(--ola-4); }
.inf-ver { color: var(--ola-2); font-weight: 600; }
.inf-cifras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.inf-cifra { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: grid; gap: 2px; }
.inf-cifra strong { font: 400 46px/1 var(--serif); color: var(--ola-4); }
.inf-cifra span { font-weight: 600; color: var(--ola-3); }
.inf-cifra small { font-size: 13px; color: var(--muted); }
.inf-grafico { display: flex; align-items: stretch; gap: 10px; height: 230px; padding: 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.inf-barra { flex: 1; min-width: 0; max-width: 120px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.inf-col { width: 70%; min-height: 2px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--ola-1), var(--ola-2)); }
.inf-n { font-weight: 700; color: var(--ola-4); font-size: 14px; }
.inf-c { font-size: 11.5px; color: var(--ola-3); font-weight: 600; text-align: center; white-space: nowrap; }
.inf-sem { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.inf-nota { margin-top: 28px; font-size: 13px; color: var(--muted); line-height: 1.6; }
@media (max-width: 640px) {
  .inf-prop { grid-template-columns: 1fr; }
  .inf-prop img { width: 100%; height: 180px; }
  .inf-cifras { grid-template-columns: 1fr; }
  .inf-grafico { gap: 4px; padding: 12px 8px; }
  .inf-c { display: none; }
  .inf-sem { font-size: 10px; }
}

/* En el iPhone, Safari agranda la página al tocar un campo con letra menor a 16px y la deja más ancha
   que la pantalla (aparece un scroll lateral). En pantallas táctiles los campos van a 16px (igual que en
   Ribera Sur y Mundo Sur). Va al final y con !important para ganarle a las reglas más específicas. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}
