/* =========================================================
   Punta del Este · Alquileres de temporada
   Arena, azul atlántico y blanco. Times New Roman + Helvetica.
   ========================================================= */

:root {
  --paper: #f7f4ed;
  --surface: #ffffff;
  --sand: #efe8da;
  --sand-2: #e7dfcd;
  --ink: #132a3e;
  --ink-soft: #46586a;
  --muted: #76828e;
  --line: #e2dccf;
  --line-strong: #cfc6b4;
  --sea: #1c5d78;
  --sea-deep: #123f54;
  --sea-tint: #e8f0f3;
  --ocupado: #d32f2f;
  --wa: #25d366;
  --wa-dark: #1a7f45;
  --ok: #2e7d4f;
  --ok-tint: #e9f4ed;
  --warn: #8a5a12;
  --warn-tint: #fbf4e6;
  --warn-line: #ead3a4;
  --err: #b3261e;

  --serif: "Times New Roman", Times, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --radius: 10px;
  --header-h: 68px;
  --shadow: 0 1px 2px rgba(19, 42, 62, .06), 0 6px 20px rgba(19, 42, 62, .08);
  --shadow-lg: 0 10px 40px rgba(19, 42, 62, .18);
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 12pt;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--sea); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0; }
h2, .title { font-size: 16pt; }
h3 { font-size: 13pt; }
p { margin: 0 0 .8em; }

/* Helvetica en mayúsculas: títulos muy importantes, etiquetas y botones */
.caps {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 2000;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--sea); outline-offset: 2px; }

.container { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 8.5pt; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; text-decoration: none;
  padding: 12px 18px; border-radius: 6px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--sea-deep); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-wa { background: var(--wa-dark); color: #fff; }
.btn-wa:hover { background: #146a39; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 22px; font-size: 9pt; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--sea);
  text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky; top: 0; z-index: 1200;
  background: rgba(247, 244, 237, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.1; }
.brand-name {
  font-family: var(--sans); font-weight: 700; text-transform: uppercase;
  letter-spacing: .22em; font-size: 12pt; white-space: nowrap;
}
.brand-sub { font-style: italic; color: var(--ink-soft); font-size: 11pt; margin-top: 3px; }

/* ---------- Portada ---------- */

.intro { padding: 36px 0 22px; }
.intro h1 {
  font-size: clamp(17pt, 2.6vw, 24pt);
  letter-spacing: .06em;
  text-wrap: balance;
}
.intro p { color: var(--ink-soft); margin: 10px 0 0; max-width: 40em; }

.toolbar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px;
  padding: 14px 0 20px; border-top: 1px solid var(--line);
}
.filter { display: flex; flex-direction: column; gap: 5px; }
.filter label, .f-label {
  font-family: var(--sans); font-size: 7.5pt; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft);
}
.select, .input, .textarea {
  appearance: none; -webkit-appearance: none;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 10px 12px; font-size: 12pt; min-height: 44px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.select {
  padding-right: 36px; 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='%23132a3e' 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 10px center; background-size: 16px;
}
.select:focus, .input:focus, .textarea:focus {
  outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px rgba(28, 93, 120, .15);
}
.toolbar .select { min-width: 170px; }
.result-count { margin-left: auto; color: var(--ink-soft); font-style: italic; padding-bottom: 10px; }

.explore {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 64px;
}
.map-wrap { position: relative; }
#map {
  height: 52vh; min-height: 320px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--sand); z-index: 0;
}
@media (min-width: 1000px) {
  .explore { grid-template-columns: minmax(0, 1fr) minmax(400px, 44%); align-items: start; }
  .map-wrap { position: sticky; top: calc(var(--header-h) + 16px); order: 2; }
  #map { height: calc(100vh - var(--header-h) - 32px); max-height: 820px; }
}

/* Tonos suaves en el mapa para que combine con la paleta */
.leaflet-tile-pane { filter: saturate(.55) brightness(1.03) contrast(.96); }
.leaflet-container { font-family: var(--serif); font-size: 11pt; }
.leaflet-control-attribution { font-family: var(--sans); font-size: 7.5pt; }

/* ---------- Tarjetas ---------- */

.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; align-content: start; }

.card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .2s, border-color .2s, transform .2s;
}
.card:hover, .card.is-active { box-shadow: var(--shadow); border-color: var(--line-strong); }
.card.is-active { outline: 2px solid var(--sea); outline-offset: -1px; }

.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--sand); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.035); }

.status-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--ocupado); color: #fff;
  font-family: var(--sans); font-size: 7.5pt; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; padding: 5px 8px; border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.status-badge.inline { position: static; display: inline-block; box-shadow: none; vertical-align: middle; }

.photo-count {
  position: absolute; right: 10px; bottom: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(19, 42, 62, .78); color: #fff;
  font-family: var(--sans); font-size: 7.5pt; font-weight: 700; letter-spacing: .06em;
  padding: 4px 8px; border-radius: 999px;
}
.photo-count svg { width: 13px; height: 13px; }

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-title { font-size: 13pt; font-weight: 400; line-height: 1.3; }
.card-title .t-name { font-weight: 700; }
.card-title .t-rest { color: var(--ink-soft); }
.card-meta { color: var(--muted); font-size: 11pt; margin: 0; }
.card-price { margin: auto 0 0; padding-top: 6px; font-size: 12pt; }
.card-price strong { font-size: 13.5pt; }
.card-price span { color: var(--muted); }

.empty {
  grid-column: 1 / -1; padding: 40px 24px; text-align: center; color: var(--ink-soft);
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface);
}

/* ---------- Marcadores del mapa ---------- */

.price-pin {
  position: relative; display: inline-block; transform: translate(-50%, -50%);
  background: var(--surface); color: var(--ink);
  font-family: var(--sans); font-size: 8.5pt; font-weight: 700; letter-spacing: .02em;
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line-strong); box-shadow: 0 2px 6px rgba(19, 42, 62, .22);
  transition: background-color .15s, color .15s, transform .15s;
  cursor: pointer;
}
.price-pin.is-ocupado::after {
  content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--ocupado); border: 2px solid var(--surface);
}
.price-pin.is-active, .price-pin:hover { background: var(--ink); color: #fff; border-color: var(--ink); transform: translate(-50%, -50%) scale(1.08); }

.leaflet-popup-content-wrapper { border-radius: var(--radius); padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; width: 240px !important; }
.leaflet-container a.pop { display: block; text-decoration: none; color: var(--ink); }
.leaflet-popup-content p.pop-title, .leaflet-popup-content p.pop-price { margin: 0 0 4px; }
.pop-media { position: relative; aspect-ratio: 16 / 10; background: var(--sand); }
.pop-media img { width: 100%; height: 100%; object-fit: cover; }
.pop-media .status-badge { top: 8px; left: 8px; font-size: 7pt; }
.pop-body { padding: 10px 12px 12px; }
.pop-title { font-size: 11.5pt; line-height: 1.3; margin: 0 0 4px; }
.pop-title .t-name { font-weight: 700; }
.pop-title .t-rest { color: var(--ink-soft); }
.pop-price { margin: 0; font-size: 11pt; }
.pop-price span { color: var(--muted); }
.leaflet-container a.leaflet-popup-close-button {
  top: 6px; right: 6px; width: 26px; height: 26px; line-height: 24px;
  background: rgba(255, 255, 255, .92); border-radius: 50%; color: var(--ink); font-size: 18px;
}

/* ---------- Contacto flotante ---------- */

.fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 1300;
  display: flex; flex-direction: column; gap: 12px;
}
.fab-btn {
  position: relative; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; text-decoration: none;
  box-shadow: 0 4px 14px rgba(19, 42, 62, .28);
  transition: transform .15s, box-shadow .15s;
}
.fab-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(19, 42, 62, .32); }
.fab-btn svg { width: 27px; height: 27px; }
.fab-wa { background: var(--wa); }
.fab-mail { background: var(--ink); }
.fab-mail svg { width: 25px; height: 25px; }
.fab-tip {
  position: absolute; right: 66px; top: 50%; transform: translateY(-50%);
  background: var(--ink); color: #fff; font-family: var(--sans); font-size: 8pt; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 4px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s;
}
.fab-btn:hover .fab-tip, .fab-btn:focus-visible .fab-tip { opacity: 1; }

/* ---------- Pie ---------- */

.site-footer { border-top: 1px solid var(--line); background: var(--sand); padding: 32px 0 96px; color: var(--ink-soft); font-size: 11pt; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 20px 48px; justify-content: space-between; }
.site-footer h2 { font-size: 8pt; margin-bottom: 8px; color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 3px 0; }
.site-footer a { color: var(--ink); text-underline-offset: 3px; }
.footer-note { max-width: 32em; }
.footer-admin { flex-basis: 100%; }
.admin-link {
  background: none; border: 0; padding: 2px 0; cursor: pointer; color: var(--muted); opacity: .55;
  font-family: var(--sans); font-size: 7pt; letter-spacing: .1em; text-transform: uppercase;
}
.admin-link:hover, .admin-link:focus-visible { opacity: 1; text-decoration: underline; }

/* ---------- Panel de administración ---------- */

.admin-overlay {
  position: fixed; inset: 0; z-index: 2100; background: rgba(8, 18, 28, .55);
  display: grid; place-items: center; padding: 16px;
}
.admin-overlay[hidden] { display: none; }
.admin-box {
  background: var(--surface); border-radius: 12px; width: min(760px, 100%);
  max-height: calc(100vh - 32px); overflow: auto; padding: 22px 24px; box-shadow: var(--shadow-lg);
}
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.admin-head h2 { font-size: 11pt; }
.admin-close {
  width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: none;
  cursor: pointer; display: grid; place-items: center; color: var(--ink);
}
.admin-close svg { width: 18px; height: 18px; }
.admin-login { display: grid; gap: 8px; max-width: 340px; }
.admin-msg { color: var(--err); font-size: 10.5pt; min-height: 1.4em; margin: 0; }
.admin-msg.neutral { color: var(--muted); font-style: italic; }
.admin-intro { color: var(--ink-soft); font-size: 10.5pt; margin: 0 0 6px; }
.adm-item {
  display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.adm-item img, .adm-sinfoto { width: 88px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--sand); display: block; }
.adm-titulo { margin: 0 0 3px; font-size: 11.5pt; line-height: 1.3; }
.adm-titulo a { color: var(--ink); text-decoration: none; }
.adm-titulo a:hover { text-decoration: underline; }
.adm-titulo .t-name { font-weight: 700; }
.adm-titulo .t-rest { color: var(--ink-soft); }
.adm-meta, .adm-owner { margin: 0; font-size: 10pt; color: var(--ink-soft); line-height: 1.45; }
.adm-accion { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.adm-accion .btn { padding: 9px 12px; font-size: 7.5pt; }
.adm-borrar:hover { border-color: var(--err); background: var(--err); }
.adm-ok { font-family: var(--sans); font-size: 7.5pt; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ok); }
.adm-item.is-borrada img, .adm-item.is-borrada .adm-info { opacity: .45; }
@media (max-width: 560px) {
  .adm-item { grid-template-columns: 64px minmax(0, 1fr); }
  .adm-item img, .adm-sinfoto { width: 64px; }
  .adm-accion { grid-column: 1 / -1; align-items: stretch; }
}

.loading { padding: 60px 0; text-align: center; color: var(--muted); font-style: italic; }
.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Ficha de la propiedad ---------- */

.back-link {
  display: inline-flex; align-items: center; gap: 6px; margin: 22px 0 14px;
  font-family: var(--sans); font-size: 8pt; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft); text-decoration: none;
}
.back-link svg { width: 16px; height: 16px; }
.back-link:hover { color: var(--ink); }

.status-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fdecec; border: 1px solid #f3c1c1; color: #7d1d1d;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-size: 11pt;
}

.detail-head { margin-bottom: 18px; }
.detail-title { font-size: clamp(16pt, 2.2vw, 20pt); font-weight: 400; line-height: 1.25; }
.detail-title .t-name { font-weight: 700; }
.detail-title .t-rest { color: var(--ink-soft); }
.detail-sub { color: var(--ink-soft); margin: 6px 0 0; }

/* Galería estilo producto: miniaturas + imagen principal */
.gallery { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; margin-bottom: 36px; }
.gallery-stage { position: relative; min-width: 0; }
.gallery-stage .status-badge { top: 14px; left: 14px; font-size: 8pt; }
.gallery-main {
  display: block; aspect-ratio: 3 / 2; max-height: 600px; width: 100%;
  background: var(--sand); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; border: 0; padding: 0;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .photo-count { right: 14px; bottom: 14px; font-size: 8pt; padding: 6px 10px; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: var(--ink); display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.gallery-nav svg { width: 20px; height: 20px; }
.gallery-nav.prev { left: 12px; } .gallery-nav.next { right: 12px; }
.thumbs { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 600px; padding: 2px; }
.thumb {
  flex: none; width: 76px; aspect-ratio: 4 / 3; padding: 0; border-radius: 6px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; background: var(--sand); opacity: .75;
  transition: opacity .15s, border-color .15s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; }
.thumb.is-active { border-color: var(--ink); opacity: 1; }

.thumbs { scrollbar-width: thin; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .thumbs { flex-direction: row; order: 2; max-height: none; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .thumbs::-webkit-scrollbar { display: none; }
  .thumb { width: 72px; }
}

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: 72px; }
@media (max-width: 979px) { .consult { order: -1; } }
@media (min-width: 980px) {
  .detail-layout { grid-template-columns: minmax(0, 1fr) 370px; gap: 56px; align-items: start; }
  .consult { position: sticky; top: calc(var(--header-h) + 20px); }
}

.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; padding: 0; list-style: none; }
.facts li {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: 11pt;
}
.facts svg { width: 18px; height: 18px; color: var(--sea); }

.d-section { padding: 28px 0; border-top: 1px solid var(--line); }
.d-section:first-of-type { border-top: 0; }
.d-section h2 { margin-bottom: 14px; }
.d-section h3 { font-size: 8pt; margin: 18px 0 8px; color: var(--ink-soft); }
.d-section h2 + h3 { margin-top: 0; }
.d-desc { white-space: pre-line; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 42%), 1fr)); gap: 6px 20px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--ok); }

.restrict {
  background: var(--warn-tint); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 18px 20px;
}
.restrict ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.restrict li { display: flex; gap: 10px; align-items: flex-start; }
.restrict svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--err); }
.restrict p { margin: 12px 0 0; color: var(--warn); }

.kv { display: grid; grid-template-columns: minmax(150px, 40%) 1fr; gap: 0; margin: 0; }
.kv dt, .kv dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--ink-soft); padding-right: 16px; }
.kv dd { font-weight: 700; }
.kv dd .note { font-weight: 400; color: var(--ink-soft); display: block; }

.periods { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.periods li { display: flex; align-items: center; gap: 10px; }
.periods svg { width: 20px; height: 20px; color: var(--sea); }

#detail-map { height: 320px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.map-note { color: var(--muted); font-size: 10.5pt; margin: 8px 0 0; font-style: italic; }

/* Caja de consulta */
.consult {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 22px;
}
.consult-price { font-size: 12pt; margin: 0 0 16px; }
.consult-price strong { font-size: 18pt; }
.consult-price span { color: var(--muted); }
.consult-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.consult-grid .full { grid-column: 1 / -1; }
.consult .field { display: flex; flex-direction: column; gap: 5px; }
.consult .input, .consult .select { font-size: 11.5pt; }
.estimate { margin: 14px 0; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: 11.5pt; }
.estimate .row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.estimate .total { font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.estimate .msg { color: var(--warn); font-style: italic; }
.consult .btn + .btn { margin-top: 10px; }
.consult-note {
  display: flex; gap: 10px; margin: 16px 0 0; padding: 12px; border-radius: 8px;
  background: var(--sea-tint); color: var(--sea-deep); font-size: 10.5pt; line-height: 1.4;
}
.consult-note svg { width: 20px; height: 20px; flex: none; }

/* Visor de fotos a pantalla completa */
.lightbox {
  position: fixed; inset: 0; z-index: 2000; background: rgba(8, 18, 28, .94);
  display: grid; grid-template-rows: auto 1fr auto; color: #fff;
}
.lightbox[hidden] { display: none; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; }
.lb-count { font-family: var(--sans); font-size: 9pt; letter-spacing: .1em; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 64px; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 4px; user-select: none; }
.lb-btn {
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center;
}
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-strip { display: flex; gap: 8px; justify-content: center; padding: 14px; overflow-x: auto; }
.lb-strip button { flex: none; width: 64px; aspect-ratio: 4/3; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; opacity: .55; cursor: pointer; background: #000; }
.lb-strip button.is-active { border-color: #fff; opacity: 1; }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) {
  .lb-stage { padding: 0 8px; }
  .lb-prev, .lb-next { background: rgba(0, 0, 0, .45); }
}

.notfound { padding: 80px 0; text-align: center; }
.notfound h1 { font-size: 18pt; margin-bottom: 12px; }

/* ---------- Publicar propiedad ---------- */

.pub-hero { padding: 36px 0 28px; }
.pub-hero h1 { font-size: clamp(17pt, 2.6vw, 24pt); letter-spacing: .06em; }
.pub-hero p { color: var(--ink-soft); max-width: 44em; margin: 10px 0 0; }

.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 12px; }
.steps b { font-family: var(--sans); font-size: 16pt; color: var(--sea); line-height: 1; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: 80px; }
@media (min-width: 1000px) {
  .form-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 48px; align-items: start; }
  .form-index { position: sticky; top: calc(var(--header-h) + 20px); }
}
@media (max-width: 999px) { .form-index { display: none; } }

.form-index ol { list-style: none; margin: 0; padding: 0; counter-reset: idx; }
.form-index a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px;
  text-decoration: none; color: var(--ink-soft); font-size: 11.5pt;
}
.form-index a:hover { background: var(--sand); color: var(--ink); }
.form-index a.is-current { background: var(--surface); color: var(--ink); box-shadow: inset 2px 0 0 var(--ink); }
.idx-dot {
  width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); font-family: var(--sans); font-size: 7.5pt; font-weight: 700; color: var(--muted);
}
.form-index a.is-done .idx-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.form-index a.is-error .idx-dot { border-color: var(--err); color: var(--err); }
.form-index .draft-note .link-btn { font-style: normal; font-size: 10pt; }
.counters > .f-error { grid-column: 1 / -1; padding-top: 10px; }
.idx-dot svg { width: 12px; height: 12px; }
.form-index .draft-note { font-size: 10pt; color: var(--muted); font-style: italic; margin: 14px 10px 0; }

.f-section {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: clamp(20px, 3vw, 32px); margin-bottom: 20px;
}
.f-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.f-num { font-family: var(--sans); font-weight: 700; font-size: 9pt; letter-spacing: .1em; color: var(--sea); }
.f-intro { color: var(--ink-soft); margin: 0 0 20px; }
.f-private {
  display: inline-flex; align-items: center; gap: 6px; margin-left: auto;
  font-family: var(--sans); font-size: 7pt; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--sea-deep); background: var(--sea-tint); padding: 4px 8px; border-radius: 999px;
}
.f-private svg { width: 13px; height: 13px; }

.f-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 20px; }
.f-grid + .f-grid, .f-grid + .f-block, .f-block + .f-grid, .f-block + .f-block { margin-top: 22px; }
.f-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f-field.full { grid-column: 1 / -1; }
.f-hint { color: var(--muted); font-size: 10.5pt; line-height: 1.4; margin: 0; }
.req { color: var(--err); margin-left: 2px; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
.input-affix { position: relative; }
.input-affix .input { padding-left: 52px; }
.input-affix .affix {
  position: absolute; left: 1px; top: 1px; bottom: 1px; width: 44px; display: grid; place-items: center;
  font-family: var(--sans); font-size: 8pt; font-weight: 700; color: var(--ink-soft);
  border-right: 1px solid var(--line); background: var(--paper); border-radius: 7px 0 0 7px;
}
.input-affix.suffix .input { padding-left: 12px; padding-right: 80px; }
.input-affix.suffix .affix {
  left: auto; right: 1px; width: auto; min-width: 44px; padding: 0 12px;
  border-right: 0; border-left: 1px solid var(--line); border-radius: 0 7px 7px 0;
}
#servicios-grupos + .f-grid, #restricciones-opciones + .f-grid { margin-top: 24px; }

.f-field.has-error .input, .f-field.has-error .select, .f-field.has-error .textarea,
.f-field.has-error .options, .f-field.has-error .dropzone { border-color: var(--err); }
.f-error { color: var(--err); font-size: 10.5pt; margin: 0; }

/* Opciones tipo tarjeta y chips */
.options { display: flex; flex-wrap: wrap; gap: 8px; border: 1px solid transparent; border-radius: 10px; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt > span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px;
  padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface);
  font-size: 11.5pt; transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.opt:hover > span { border-color: var(--ink-soft); }
.opt input:checked + span { border-color: var(--ink); background: var(--sea-tint); box-shadow: inset 0 0 0 1px var(--ink); }
.opt input:focus-visible + span { outline: 2px solid var(--sea); outline-offset: 2px; }
.opt.chip > span::before {
  content: ""; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--line-strong); flex: none;
  background: var(--surface) center / 12px no-repeat;
}
.opt.chip input:checked + span::before {
  background-color: var(--ink); border-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.opt.chip.no > span::before { border-radius: 50%; }
.opt.chip.no input:checked + span { background: #fdecec; border-color: var(--err); box-shadow: inset 0 0 0 1px var(--err); }
.opt.chip.no input:checked + span::before {
  background-color: var(--err); border-color: var(--err);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E");
}

.opt.card-opt { flex: 1 1 200px; }
.opt.card-opt > span { flex-direction: column; align-items: flex-start; gap: 2px; height: 100%; padding: 12px 14px; }
.opt.card-opt small { color: var(--ink-soft); font-size: 10.5pt; line-height: 1.35; }

.amen-group + .amen-group { margin-top: 18px; }
.amen-group h3 { font-size: 8pt; margin-bottom: 10px; color: var(--ink-soft); }

/* Contadores (+/-) */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); width: max-content; }
.stepper button {
  width: 42px; height: 42px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--ink);
}
.stepper button:hover { background: var(--paper); }
.stepper button:disabled { color: var(--line-strong); cursor: not-allowed; background: none; }
.stepper button svg { width: 16px; height: 16px; }
.stepper input {
  width: 48px; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  height: 42px; font-size: 12pt; font-weight: 700; background: none; -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; background: var(--sea-tint); }

.counters { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 28px; }
.counter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.counter-row .f-label { font-size: 8pt; }
.counter-row small { display: block; color: var(--muted); font-size: 10pt; font-family: var(--serif); text-transform: none; letter-spacing: 0; font-weight: 400; }

/* Mapa para ubicar la propiedad */
#pick-map { height: 320px; border-radius: var(--radius); border: 1px solid var(--line-strong); z-index: 0; cursor: crosshair; }
.pick-pin {
  width: 26px; height: 26px; border-radius: 50%; background: var(--ink); border: 4px solid #fff;
  box-shadow: 0 0 0 2px var(--ink), 0 4px 10px rgba(0, 0, 0, .3); cursor: grab;
}
.pick-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; color: var(--muted); font-size: 10.5pt; }
.pick-status.is-set { color: var(--ok); }
.pick-status svg { width: 16px; height: 16px; }

/* Períodos de disponibilidad */
.period-row {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px;
  padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
}
.period-row + .period-row { margin-top: 10px; }
.period-row .f-field { flex: 1 1 250px; }
.period-pair { display: flex; gap: 8px; }
.period-pair .select:first-child { width: 90px; flex: none; }
.period-remove {
  width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface);
  cursor: pointer; display: grid; place-items: center; color: var(--ink-soft);
}
.period-remove:hover { color: var(--err); border-color: var(--err); }
.period-remove svg { width: 18px; height: 18px; }
.add-row { margin-top: 12px; }

/* Fotos */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  padding: 32px 20px; border: 2px dashed var(--line-strong); border-radius: 12px; background: var(--paper);
  cursor: pointer; transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--sea); background: var(--sea-tint); }
.dropzone svg { width: 34px; height: 34px; color: var(--sea); }
.dropzone strong { font-family: var(--sans); font-size: 9pt; letter-spacing: .08em; text-transform: uppercase; }
.dropzone small { color: var(--muted); font-size: 10.5pt; }

.photo-usage { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0 6px; font-size: 11pt; color: var(--ink-soft); }
.usage-bar { height: 6px; border-radius: 999px; background: var(--sand-2); overflow: hidden; }
.usage-bar span { display: block; height: 100%; width: 0; background: var(--sea); transition: width .2s; }
.usage-bar.is-full span { background: var(--warn); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 16px; }
.photo-grid:empty { display: none; }
.ph { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--sand); border: 1px solid var(--line); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .cover-tag {
  position: absolute; left: 6px; top: 6px; background: var(--ink); color: #fff;
  font-family: var(--sans); font-size: 6.5pt; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 6px; border-radius: 3px;
}
.ph-actions { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; }
.ph-actions button {
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .94); color: var(--ink); display: grid; place-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.ph-actions button:hover { background: #fff; color: var(--sea); }
.ph-actions button.del:hover { color: var(--err); }
.ph-actions svg { width: 15px; height: 15px; }
.ph-size { position: absolute; left: 6px; bottom: 6px; background: rgba(19, 42, 62, .75); color: #fff; font-family: var(--sans); font-size: 7pt; padding: 2px 6px; border-radius: 3px; }

.char-count { text-align: right; color: var(--muted); font-size: 10pt; margin: 0; }
.contact-warning {
  display: flex; gap: 10px; background: var(--warn-tint); border: 1px solid var(--warn-line); color: var(--warn);
  border-radius: 8px; padding: 10px 12px; font-size: 10.5pt;
}
.contact-warning svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* Envío */
.f-submit { background: var(--ink); color: #fff; border-radius: 12px; padding: clamp(20px, 3vw, 32px); }
.f-submit h2 { color: #fff; margin-bottom: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; margin-bottom: 12px; font-size: 11.5pt; line-height: 1.45; }
.check input { width: 20px; height: 20px; flex: none; margin: 2px 0 0; accent-color: var(--sea); cursor: pointer; }
.f-submit .f-error { color: #ffb4ab; }
.f-submit .btn-primary { background: #fff; color: var(--ink); margin-top: 8px; }
.f-submit .btn-primary:hover { background: var(--sand); }
.submit-status { margin: 14px 0 0; font-size: 11pt; color: #d9e4ea; min-height: 1.5em; }
.submit-status.is-error { color: #ffb4ab; }
.f-submit #wa-fallback { margin-top: 4px; }
.progress { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; margin-top: 10px; }
.progress span { display: block; height: 100%; width: 0; background: #fff; transition: width .2s; }

.success {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: clamp(28px, 5vw, 56px); text-align: center; margin-bottom: 80px;
}
.success .ok-icon { width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; background: var(--ok-tint); color: var(--ok); display: grid; place-items: center; }
.success .ok-icon svg { width: 28px; height: 28px; }
.success h2 { margin-bottom: 10px; }
.success p { color: var(--ink-soft); max-width: 34em; margin: 0 auto 10px; }
.success .ref { font-family: var(--sans); font-weight: 700; letter-spacing: .12em; color: var(--ink); }

/* ---------- Móvil ---------- */

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .brand-name { font-size: 10.5pt; letter-spacing: .16em; }
  .brand-sub { font-size: 10pt; }
  .site-header .btn { padding: 10px 12px; font-size: 7.5pt; letter-spacing: .08em; }
  .toolbar .filter { flex: 1 1 140px; }
  .toolbar .select { min-width: 0; }
  .result-count { margin-left: 0; width: 100%; padding-bottom: 0; }
  .fab { right: 14px; bottom: 14px; gap: 10px; }
  .fab-btn { width: 52px; height: 52px; }
  .kv { grid-template-columns: minmax(0, 42%) minmax(0, 1fr); }
  .kv dt { padding-right: 12px; }
}

@media (max-width: 480px) {
  .brand-name { font-size: 9.5pt; letter-spacing: .12em; }
  .brand-sub { font-size: 9.5pt; }
  .site-header .btn { padding: 9px 10px; font-size: 7pt; letter-spacing: .06em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
