/* Web publica de un complejo — SISPOS Smart Alojamientos (ADR-118).
   Sobria y formal: marfil, azul marino y laton. Mobile-first: la mayoria la
   abre desde un link de WhatsApp o Instagram. --brand lo pone sitio.js con el
   color que eligio el complejo. */
:root {
  --bg: #f7f5f0;
  --bg2: #efebe3;
  --surface: #ffffff;
  --border: #e4ded2;
  --text: #1b2430;
  --muted: #6a6f78;
  --brand: #1f3a5f;
  --brass: #a8844e;
  --ok: #2f6b4f;
  --busy: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 30, 45, .06), 0 8px 24px rgba(20, 30, 45, .06);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
:root[data-theme="oscuro"] {
  --bg: #0f141b; --bg2: #141b24; --surface: #18202b; --border: #2a3442;
  --text: #ece9e3; --muted: #9aa3ae; --brass: #c9a96e; --ok: #7bc4a0; --busy: #f07167;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 15.5px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
:root[data-theme="oscuro"] a { color: var(--brass); }
img { display: block; max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.ms { font-family: 'Material Symbols Outlined'; font-weight: 400; font-style: normal; font-size: 20px;
  line-height: 1; display: inline-block; vertical-align: middle; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.2px; margin: 0; }
.eyebrow { font: 700 11.5px/1 var(--sans); letter-spacing: 2.2px; text-transform: uppercase; color: var(--brass); }
.muted { color: var(--muted); }

/* --- Barra --- */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav .wrap { display: flex; align-items: center; gap: 14px; height: 64px; }
.nav .logo { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; background: var(--surface); border: 1px solid var(--border); }
.nav .name { font: 600 19px/1.1 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .links { margin-left: auto; display: flex; gap: 22px; }
.nav .links a { color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px; }
.nav .links a:hover { color: var(--brass); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px;
  padding: 11px 18px; font: 600 14.5px var(--sans); cursor: pointer; border: 1px solid transparent; text-decoration: none; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--brass); }
.btn.wa { background: #1f8f4e; color: #fff; }
.btn:disabled { opacity: .55; cursor: default; }
@media (max-width: 860px) { .nav .links { display: none; } .nav .cta { margin-left: auto; } }

/* --- Portada --- */
.hero { position: relative; min-height: min(78vh, 680px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: #1b2430; }
.hero .slides, .hero .slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero .slides img { opacity: 0; transition: opacity 1.2s ease; }
.hero .slides img.on { opacity: 1; }
.hero::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 16, 25, .15) 0%, rgba(10, 16, 25, .25) 40%, rgba(10, 16, 25, .78) 100%); }
.hero .inner { position: relative; z-index: 2; width: 100%; padding: 120px 0 34px; }
.hero .eyebrow { color: #e9d3a8; }
.hero h1 { font-size: clamp(32px, 6vw, 60px); line-height: 1.05; margin: 10px 0 8px; max-width: 820px; }
.hero p.lead { font-size: clamp(15px, 2.2vw, 18px); opacity: .92; margin: 0; max-width: 680px; }
.hero.noimg { background: linear-gradient(135deg, var(--brand), #0f1b2c); min-height: 0; }
.hero.noimg .inner { padding-top: 70px; }

/* --- Buscador --- */
.search { margin-top: 26px; background: var(--surface); color: var(--text); border-radius: 16px; box-shadow: 0 18px 40px rgba(0,0,0,.25);
  display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 0; overflow: hidden; max-width: 860px; }
.search label { display: block; padding: 12px 16px; border-right: 1px solid var(--border); cursor: pointer; }
.search label span { display: block; font: 700 11px/1 var(--sans); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.search input, .search select { border: 0; background: transparent; font: 500 15px var(--sans); color: var(--text); width: 100%; padding: 0; outline: none; }
.search .go { border-radius: 0; padding: 0 26px; }
@media (max-width: 760px) {
  .search { grid-template-columns: 1fr 1fr; }
  .search label:nth-child(2) { border-right: 0; }
  .search label:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--border); border-right: 0; }
  .search .go { grid-column: 1 / -1; padding: 14px; }
}

/* --- Secciones --- */
section { padding: 64px 0 8px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(26px, 4vw, 36px); margin-top: 6px; }
.notice { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brass); border-radius: 10px; padding: 12px 16px; margin-top: 18px; }
.notice b { display: block; }

/* --- Ofertas --- */
.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.offer { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 20px 20px; box-shadow: var(--shadow); overflow: hidden; }
.offer.hl { border-color: var(--brass); background: linear-gradient(160deg, color-mix(in srgb, var(--brass) 12%, var(--surface)), var(--surface) 55%); }
.offer .badge { font: 600 30px/1 var(--serif); color: var(--brass); }
.offer h3 { font-size: 20px; margin: 10px 0 6px; }
.offer p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.offer .when { font-size: 13px; font-weight: 600; }
.ribbon { position: absolute; top: 14px; right: -34px; transform: rotate(45deg); background: var(--brass); color: #fff; font: 700 10.5px var(--sans); letter-spacing: 1.2px; padding: 4px 40px; }

/* --- Unidades --- */
.units { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
@media (max-width: 420px) { .units { grid-template-columns: 1fr; } }
.unit { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
.unit:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20,30,45,.08), 0 18px 36px rgba(20,30,45,.10); }
.gallery { position: relative; aspect-ratio: 4 / 3; background: var(--bg2); overflow: hidden; }
.gallery .track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .track::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; cursor: zoom-in; }
.gallery .ph { display: grid; place-items: center; height: 100%; color: var(--muted); }
.gallery .arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.9); color: #1b2430; cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.gallery:hover .arrow { opacity: 1; }
.gallery .arrow.l { left: 10px; } .gallery .arrow.r { right: 10px; }
.gallery .count { position: absolute; right: 10px; bottom: 10px; background: rgba(15,20,27,.65); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.gallery .tagx { position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 999px; font: 700 12px var(--sans); }
.tagx.free { background: #e7f3ec; color: #1f5a3c; } .tagx.busy { background: #fbe7e5; color: #8d1c12; } .tagx.small { background: #fdf1df; color: #7a4a0c; }
.unit .body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.unit h3 { font-size: 22px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13.5px; }
.facts span { display: inline-flex; align-items: center; gap: 5px; }
.amen { display: flex; flex-wrap: wrap; gap: 6px; }
.amen span { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; }
.amen .ms { font-size: 16px; color: var(--brass); }
.price { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; }
.price .v { font: 600 22px/1.1 var(--serif); }
.price .v small { font: 500 12.5px var(--sans); color: var(--muted); }
.price .old { text-decoration: line-through; color: var(--muted); font-size: 13px; }

/* --- Comodidades del complejo / sobre / ubicacion --- */
.amenities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.amenities-grid div { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; font-weight: 500; }
.amenities-grid .ms { font-size: 26px; color: var(--brass); }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 34px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.about p { font-size: 16.5px; white-space: pre-line; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mosaic img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.mosaic img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.map { width: 100%; aspect-ratio: 16 / 10; border: 0; border-radius: var(--radius); background: var(--bg2); }
.policies { white-space: pre-line; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.contact-list { display: grid; gap: 10px; margin: 16px 0; }
.contact-list a, .contact-list div { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.contact-list .ms { color: var(--brass); }

footer { margin-top: 70px; background: #141b24; color: #c9cdd3; padding: 34px 0 90px; font-size: 13.5px; }
footer a { color: #e9d3a8; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.fab { position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 58px; height: 58px; border-radius: 50%; background: #1f8f4e; color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 26px rgba(0,0,0,.3); text-decoration: none; }
.fab svg { width: 30px; height: 30px; fill: #fff; }

/* --- Ficha de la unidad (modal) --- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(10, 14, 20, .6); display: flex; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 30px 14px; }
.sheet { background: var(--bg); border-radius: 18px; width: 100%; max-width: 1020px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.sheet .top { position: relative; }
.sheet .close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); cursor: pointer; display: grid; place-items: center; }
.sheet .gallery { aspect-ratio: 16 / 8; }
@media (max-width: 700px) { .modal { padding: 0; } .sheet { border-radius: 0; min-height: 100vh; } .sheet .gallery { aspect-ratio: 4 / 3; } }
.sheet .content { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; padding: 24px; }
@media (max-width: 860px) { .sheet .content { grid-template-columns: 1fr; padding: 18px; } }
.sheet h2 { font-size: 30px; }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.box + .box { margin-top: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font: 600 16px var(--serif); text-transform: capitalize; }
.cal-nav { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; color: var(--text); }
.cals { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 520px) { .cals { grid-template-columns: 1fr; } }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; font-size: 13px; }
.cal .wd { color: var(--muted); font-size: 11px; font-weight: 700; padding: 4px 0; }
.cal button { aspect-ratio: 1; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: 500 13px var(--sans); cursor: pointer; }
.cal button:hover:not(:disabled) { background: var(--bg2); }
.cal button:disabled { color: var(--muted); opacity: .45; cursor: default; }
.cal button.busy { color: var(--busy); text-decoration: line-through; opacity: .7; }
.cal button.sel { background: var(--brand); color: #fff; }
.cal button.mid { background: color-mix(in srgb, var(--brand) 16%, transparent); border-radius: 0; }
.cal button.offer::after { content: ''; display: block; width: 4px; height: 4px; border-radius: 50%; background: var(--brass); margin: -6px auto 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.quote .row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14px; }
.quote .row.tot { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; font: 600 20px var(--serif); }
.quote .row.disc { color: var(--ok); font-weight: 600; }
.warn { color: #9a5b0c; font-size: 13px; }
.err { color: var(--busy); font-size: 13.5px; }
.ok { color: var(--ok); font-weight: 600; }
.form { display: grid; gap: 10px; }
.form input, .form textarea, .form select { width: 100%; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 11px 12px; font: 15px var(--sans); }
.form textarea { min-height: 80px; resize: vertical; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp { position: absolute; left: -5000px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-size: 18px; color: var(--text); }

.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(5, 8, 12, .94); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 94vw; max-height: 88vh; border-radius: 8px; }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.lightbox .x { top: 16px; right: 16px; } .lightbox .p { left: 16px; } .lightbox .n { right: 16px; }
.lightbox .cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #ddd; font-size: 14px; }

.state { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 30px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--brass); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
