/* =====================================================================
   Núcleo Inmobiliaria — hoja de estilos única
   Paleta:  #0f0e48 (dominante) · #20234c · #2596be · blanco · #ffce3b
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

:root {
  --primary: #0f0e48;
  --primary-700: #20234c;
  --primary-600: #2c2f63;
  --accent: #2596be;
  --accent-ink: #17627e;   /* variante del acento con contraste sobre blanco */
  --gold: #ffce3b;
  --white: #ffffff;
  --bg: #ffffff;
  --bg-alt: #f4f6fb;
  --card: #ffffff;
  --text: #1b1c39;
  --muted: #5c6079;
  --line: #e5e7f2;
  --wa: #25d366;

  --r-sm: 8px; --r: 14px; --r-lg: 22px; --pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15,14,72,.06), 0 4px 14px rgba(15,14,72,.06);
  --shadow: 0 14px 34px -14px rgba(15,14,72,.28);
  --shadow-lg: 0 34px 64px -22px rgba(15,14,72,.38);

  --container: 1180px;
  --pad: clamp(16px, 4vw, 34px);
  --section: clamp(56px, 9vw, 112px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
#main { scroll-margin-top: 84px; }

h1, h2, h3, h4 {
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.02em;
  color: var(--primary);
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { margin: 0 0 1rem; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); }
.eyebrow {
  display: inline-block;
  margin-bottom: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  color: var(--accent-ink);
}
.small { font-size: .85rem; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--section); }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--primary); color: #dcdcf1; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section__head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 52px); }
.section__head.center { margin-inline: auto; text-align: center; }

.split { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: 1.1fr .9fr; align-items: center; }
.split img { border-radius: var(--r-lg); width: 100%; box-shadow: var(--shadow); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  background: var(--white); color: var(--primary);
  padding: 10px 16px; border-radius: var(--r-sm); box-shadow: var(--shadow);
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.tag-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.tag {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--pill);
  padding: .3rem .8rem; font-size: .82rem; color: var(--muted);
}

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--primary); --btn-fg: #fff; --btn-bd: transparent;
  display: inline-flex; align-items: center; gap: .55em; justify-content: center;
  padding: .85em 1.5em; border-radius: var(--pill);
  border: 2px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn--accent { --btn-bg: var(--accent); }
.btn--gold { --btn-bg: var(--gold); --btn-fg: var(--primary); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--primary); --btn-bd: var(--line); }
.section--dark .btn--ghost, .cta-band .btn--ghost { --btn-fg: #fff; --btn-bd: rgba(255,255,255,.45); }
.btn--wa { --btn-bg: var(--wa); --btn-fg: #08331f; }
.btn--sm { padding: .6em 1em; font-size: .9rem; }
.btn--block { width: 100%; }
.btn.is-fav { --btn-bg: var(--gold); --btn-fg: var(--primary); --btn-bd: var(--gold); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--primary); color: #fff; }
.site-header.is-scrolled { box-shadow: 0 10px 26px -14px rgba(0,0,0,.55); }
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: 70px; }
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 700; text-decoration: none; color: #fff; font-size: 1.12rem; letter-spacing: -.01em;
}
.brand svg { width: 30px; height: 30px; color: var(--accent); }
.brand span { white-space: nowrap; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: .3rem; }
.site-nav a {
  position: relative; text-decoration: none; color: #c9cae6;
  padding: .55rem .8rem; border-radius: var(--r-sm); font-weight: 600; font-size: .98rem;
}
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] { color: #fff; }
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .25rem;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.nav-fav { display: inline-flex; align-items: center; gap: .35rem; }
.nav-fav svg { width: 19px; height: 19px; }
.fav-count {
  background: var(--gold); color: var(--primary);
  font-size: .72rem; font-weight: 800; min-width: 18px; height: 18px;
  border-radius: var(--pill); display: inline-grid; place-items: center; padding: 0 5px;
}
.fav-count[hidden] { display: none; }
.nav-cta { margin-left: .4rem; }
.nav-toggle {
  display: none; margin-left: auto; background: transparent; border: 0;
  color: #fff; padding: .4rem; cursor: pointer;
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--primary); padding: .5rem var(--pad) 1.25rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .18s ease;
  }
  .site-nav[data-open] { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav a { padding: .9rem .4rem; border-bottom: 1px solid rgba(255,255,255,.09); font-size: 1.05rem; }
  .site-nav a[aria-current="page"]::after { display: none; }
  .nav-cta { margin: .9rem 0 0; text-align: center; }
  .nav-fav { justify-content: flex-start; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff;
  background: linear-gradient(180deg, rgba(15,14,72,.74), rgba(15,14,72,.9)), var(--hero-img, #0f0e48);
  background-size: cover; background-position: center;
}
.hero__inner { padding-block: clamp(60px, 12vw, 132px); max-width: 820px; }
.hero .eyebrow { color: #8fd0e6; }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero p { color: #d7d8ef; font-size: clamp(1.05rem, 1.8vw, 1.3rem); margin-bottom: 2rem; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 1.8rem; margin-top: 2.4rem; }
.hero__stats div { min-width: 120px; }
.hero__stats b { display: block; font-size: 1.7rem; color: #fff; letter-spacing: -.02em; }
.hero__stats span { color: #b9bae0; font-size: .9rem; }

.searchbar {
  background: var(--white); color: var(--text);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 1rem; display: grid; gap: .75rem;
  grid-template-columns: repeat(3, 1fr) auto; align-items: end;
}
.searchbar .field { display: flex; flex-direction: column; gap: .3rem; }
.searchbar label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
}
.searchbar select, .searchbar input {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .7rem .8rem; background: #fff;
}
.searchbar .btn { height: 100%; }
@media (max-width: 860px) {
  .searchbar { grid-template-columns: 1fr 1fr; }
  .searchbar .btn { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .searchbar { grid-template-columns: 1fr; } }

/* ---------- Rejilla de tarjetas ---------- */
.grid-cards { display: grid; gap: clamp(18px, 3vw, 30px); grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); }
.card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__media { position: relative; display: block; aspect-ratio: 16 / 11; background: var(--primary-700); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--primary); color: #fff; font-size: .74rem; font-weight: 700;
  padding: .35em .7em; border-radius: var(--pill); letter-spacing: .02em;
}
.badge--alquiler { background: var(--accent-ink); }
.badge--venta { background: var(--primary); }
.badge--top { top: auto; bottom: 12px; left: 12px; background: var(--gold); color: var(--primary); }
.badge--estado { top: auto; bottom: 12px; left: 12px; background: #b23b3b; color: #fff; }
.detalle__title .badge--estado { position: static; }
.fav {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 40px; height: 40px; border-radius: var(--pill); border: 0;
  background: rgba(255,255,255,.94); display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform .12s ease, background .2s ease;
}
.fav:hover { transform: scale(1.08); }
.fav svg { width: 20px; height: 20px; fill: none; stroke: var(--primary); stroke-width: 2; }
.fav.is-fav { background: var(--gold); }
.fav.is-fav svg { fill: var(--primary); stroke: var(--primary); }
.card__body { padding: 1rem 1.1rem .3rem; }
.card__price { font-size: 1.3rem; font-weight: 800; color: var(--primary); margin: 0 0 .15rem; }
.card__title { font-size: 1.05rem; margin: 0 0 .15rem; }
.card__title a { text-decoration: none; }
.card__title a:hover { color: var(--accent-ink); }
.card__loc { color: var(--muted); font-size: .92rem; margin: 0; }
.specs { list-style: none; display: flex; gap: 1rem; padding: .8rem 1.1rem 0; margin: 0; color: var(--muted); font-size: .9rem; }
.specs li { display: flex; align-items: center; gap: .35rem; }
.specs svg { width: 17px; height: 17px; opacity: .8; }
.card__foot { margin-top: auto; padding: 1rem 1.1rem 1.1rem; display: flex; gap: .5rem; }
.card__foot .btn { flex: 1; }

.empty {
  text-align: center; padding: clamp(40px, 8vw, 80px) 1rem;
  border: 2px dashed var(--line); border-radius: var(--r-lg); color: var(--muted);
}
.empty svg { width: 54px; height: 54px; color: var(--line); margin: 0 auto 1rem; }
.empty h3 { color: var(--primary); }

/* ---------- Bloques de valor ---------- */
.features { display: grid; gap: clamp(18px, 3vw, 28px); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.feature .ico {
  width: 48px; height: 48px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: rgba(37,150,190,.12); color: var(--accent-ink); margin-bottom: 1rem;
}
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: .35rem; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

.ops { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
@media (max-width: 680px) { .ops { grid-template-columns: 1fr; } }
.op {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  padding: 2.4rem; color: #fff; text-decoration: none;
  background: linear-gradient(160deg, var(--primary), var(--primary-700));
  display: flex; flex-direction: column; gap: .4rem; min-height: 220px;
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .16s ease, box-shadow .2s ease;
}
.op:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.op:nth-child(2) { background: linear-gradient(160deg, var(--accent-ink), #0f3b4d); }
.op b { font-size: 1.6rem; }
.op span { color: #cfe6ef; max-width: 34ch; }
.op .go { margin-top: auto; font-weight: 700; display: inline-flex; align-items: center; gap: .4rem; transition: gap .16s ease; }
.op:hover .go { gap: .7rem; }

.stats { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); text-align: center; }
.stats .n { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: #fff; letter-spacing: -.02em; }
.stats .l { color: #b9bae0; }

.team { display: grid; gap: clamp(18px, 3vw, 28px); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.member { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.member img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; background: var(--bg-alt); }
.member .info { padding: 1rem 1.1rem; }
.member b { display: block; color: var(--primary); }
.member span { color: var(--muted); font-size: .9rem; }
.member a { color: var(--accent-ink); font-size: .9rem; text-decoration: none; }

.cta-band {
  background: linear-gradient(160deg, var(--primary), var(--primary-700));
  color: #fff; border-radius: var(--r-lg); padding: clamp(28px, 5vw, 56px); text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfd0ee; max-width: 52ch; margin-inline: auto; }
.cta-band .btns { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }

/* ---------- Cabecera de página ---------- */
.page-head { background: var(--primary); color: #fff; padding-block: clamp(40px, 7vw, 72px); }
.page-head h1 { color: #fff; margin: 0; }
.page-head p { color: #c9cae6; margin: .5rem 0 0; }
.breadcrumb { display: flex; gap: .4rem; color: #9fa0c9; font-size: .85rem; margin-bottom: 1rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--accent-ink); text-decoration: none; }
.breadcrumb span { color: var(--muted); }

/* ---------- Listado ---------- */
.listado { display: grid; gap: clamp(22px, 4vw, 40px); grid-template-columns: 280px 1fr; align-items: start; }
@media (max-width: 900px) { .listado { grid-template-columns: 1fr; } }
.filters {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.25rem; position: sticky; top: 88px; display: grid; gap: 1.15rem;
}
@media (max-width: 900px) { .filters { position: static; } }
.filters h2 { font-size: 1rem; margin: 0; }
.filter-group { display: grid; gap: .5rem; }
.filter-group > label, .filter-group > .lbl {
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.filters input[type="text"], .filters select {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .7rem; background: #fff; width: 100%;
}
.segmented { display: flex; flex-wrap: wrap; gap: .4rem; }
.segmented button {
  border: 1px solid var(--line); background: #fff; border-radius: var(--pill);
  padding: .45rem .8rem; font-size: .88rem; cursor: pointer; font-weight: 600; color: var(--muted);
}
.segmented button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.range output { font-weight: 700; color: var(--primary); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.listado__main { min-width: 0; }
.listado__count { color: var(--muted); margin: 0 0 1.2rem; }
.listado__count b { color: var(--primary); }

/* ---------- Detalle ---------- */
.detalle { display: grid; gap: clamp(24px, 4vw, 44px); grid-template-columns: 1fr 360px; align-items: start; }
@media (max-width: 940px) { .detalle { grid-template-columns: 1fr; } }
.gallery__main {
  aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden;
  background: var(--primary-700); box-shadow: var(--shadow-sm);
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: .6rem; margin-top: .6rem; flex-wrap: wrap; }
.gallery__thumbs button {
  width: 92px; aspect-ratio: 1 / 1; border-radius: var(--r-sm); overflow: hidden;
  border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--bg-alt);
}
.gallery__thumbs button[aria-current="true"] { border-color: var(--accent); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detalle__title { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.4rem; }
.detalle__title h1 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.detalle__title .badge { position: static; }
.detalle__price { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin: .2rem 0 1rem; }
.detalle__loc { color: var(--muted); margin: .2rem 0 1rem; }
.spec-grid {
  display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.spec-grid div { background: var(--card); padding: 1rem; }
.spec-grid dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .2rem; }
.spec-grid dd { margin: 0; font-weight: 700; color: var(--primary); }
.checklist { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.checklist li { display: flex; gap: .5rem; align-items: flex-start; }
.checklist svg { width: 18px; height: 18px; color: var(--accent-ink); flex: none; margin-top: .2rem; }
.aside-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 1.4rem; box-shadow: var(--shadow-sm); position: sticky; top: 88px; display: grid; gap: .7rem;
}
.aside-card .agent { display: flex; gap: .8rem; align-items: center; margin-bottom: .3rem; }
.aside-card .agent img { width: 52px; height: 52px; border-radius: var(--pill); object-fit: cover; background: var(--bg-alt); }
.aside-card .ref { font-size: .82rem; color: var(--muted); margin: 0 0 .3rem; }
.map-box { margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg-alt); }
.map-box .ph {
  aspect-ratio: 16 / 7; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 1rem;
  background: repeating-linear-gradient(45deg, #eef0f7, #eef0f7 12px, #f6f7fb 12px, #f6f7fb 24px);
}
.map-box .bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1rem; flex-wrap: wrap; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.form label { font-weight: 600; display: block; margin-bottom: .35rem; }
.form .req { color: var(--accent-ink); }
.form input, .form select, .form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .8rem .9rem; background: #fff;
}
.form textarea { min-height: 130px; resize: vertical; }
.form input[aria-invalid="true"], .form textarea[aria-invalid="true"] { border-color: #d6455d; background: #fff6f7; }
.form .error { color: #c22a44; font-size: .85rem; min-height: 1.2em; display: block; }
.form .check { display: flex; gap: .6rem; align-items: flex-start; }
.form .check input { width: auto; margin-top: .25rem; }
.form-success {
  background: rgba(37,150,190,.1); border: 1px solid var(--accent);
  border-radius: var(--r); padding: 1.5rem; display: grid; gap: .5rem;
}
.form-success svg { width: 40px; height: 40px; color: var(--accent-ink); }
.consulta-ref {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .8rem 1rem; font-size: .92rem; margin-bottom: 1.2rem;
}
.contact-grid { display: grid; gap: clamp(24px, 4vw, 48px); grid-template-columns: 1.2fr .8fr; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.info-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 1rem; }
.info-list li { display: flex; gap: .75rem; }
.info-list svg { width: 20px; height: 20px; color: var(--accent-ink); flex: none; margin-top: .15rem; }
.info-list a { color: var(--accent-ink); text-decoration: none; }

/* ---------- Pie ---------- */
.site-footer { background: var(--primary); color: #c3c4e4; padding-block: clamp(40px, 6vw, 72px) 1.5rem; margin-top: auto; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 1rem; }
.site-footer a { color: #c3c4e4; text-decoration: none; display: inline-block; padding: .2rem 0; }
.site-footer a:hover { color: #fff; }
.footer-brand .brand { color: #fff; margin-bottom: .8rem; }
.footer-brand p { max-width: 34ch; font-size: .92rem; }
.socials { display: flex; gap: .6rem; margin-top: .6rem; }
.socials a { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.2); border-radius: var(--pill); display: grid; place-items: center; }
.socials svg { width: 18px; height: 18px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.3rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: #9a9bc4;
}
.footer-bottom a { color: #9a9bc4; }
.footer-admin { opacity: .85; }
.footer-admin[hidden] { display: none !important; }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed; right: clamp(14px, 3vw, 28px); bottom: clamp(14px, 3vw, 28px); z-index: 90;
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--wa); color: #06331e; padding: .9rem 1.05rem; border-radius: var(--pill);
  font-weight: 700; text-decoration: none; box-shadow: 0 14px 30px -8px rgba(18,140,126,.6);
}
.wa-float svg { width: 26px; height: 26px; }
.wa-float span { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .25s ease; }
.wa-float:hover span, .wa-float:focus span { max-width: 180px; }
@media (max-width: 600px) { .wa-float span { display: none; } }
.wa-float::after {
  content: ""; position: absolute; inset: -6px; border-radius: var(--pill);
  border: 2px solid var(--wa); animation: wa-pulse 2.4s ease-out infinite;
}
@keyframes wa-pulse {
  0% { opacity: .7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.35); }
}

/* ---------- Aparición al hacer scroll ---------- */
/* Solo se oculta si hay JS (clase .js en <html>); sin JS todo se ve. */
.reveal { transition: opacity .6s ease, transform .6s ease; }
.js .reveal:not(.is-visible) { opacity: 0; transform: translateY(18px); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .reveal, .js .reveal:not(.is-visible) { opacity: 1 !important; transform: none !important; }
  .wa-float::after { display: none; }
}

/* =====================================================================
   Panel de administración (admin.html)
   ===================================================================== */
.admin-gate { display: grid; place-items: center; padding: clamp(20px, 6vw, 60px) 0; }
.admin-card {
  width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(1.5rem, 4vw, 2.4rem); box-shadow: var(--shadow);
}
.admin-card h1 { font-size: 1.5rem; }

.admin-topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.2rem;
}
.admin-topbar strong { font-size: 1.3rem; color: var(--primary); }
.admin-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.admin-banner {
  background: #fff7e6; border: 1px solid var(--gold); color: #6b4b00;
  border-radius: var(--r); padding: .9rem 1.1rem; margin-bottom: 1.2rem; font-size: .92rem;
}
.admin-banner code { background: rgba(0,0,0,.06); padding: .05em .4em; border-radius: 4px; }

.admin-list { display: grid; gap: .7rem; }
.admin-row {
  display: grid; grid-template-columns: 64px 1fr auto auto auto; gap: 1rem; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .7rem .9rem;
}
.admin-row__img { width: 64px; height: 48px; object-fit: cover; border-radius: var(--r-sm); background: var(--bg-alt); }
.admin-row__main { min-width: 0; }
.admin-row__main b { display: block; color: var(--primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row__main span { color: var(--muted); }
.admin-row__price { font-weight: 800; color: var(--primary); white-space: nowrap; }
.admin-row__tags { display: flex; gap: .35rem; flex-wrap: wrap; }
.admin-row__btns { display: flex; gap: .35rem; }
.pill {
  font-size: .72rem; font-weight: 700; padding: .25em .6em; border-radius: var(--pill);
  background: var(--bg-alt); color: var(--muted); text-transform: capitalize;
}
.pill--disponible { background: rgba(37,150,190,.14); color: var(--accent-ink); }
.pill--reservado { background: #fdecc8; color: #7a5200; }
.pill--vendido { background: #f6d5d5; color: #8a2b2b; }
.pill--oculto { background: #e6e6ef; color: #555; }
.pill--star { background: var(--gold); color: var(--primary); }
@media (max-width: 780px) {
  .admin-row { grid-template-columns: 56px 1fr; grid-auto-rows: min-content; }
  .admin-row__price, .admin-row__tags, .admin-row__btns { grid-column: 2; }
}

/* diálogo del formulario */
.admin-dialog {
  border: 0; border-radius: var(--r-lg); padding: 0; width: min(760px, 94vw);
  max-height: 92vh; box-shadow: var(--shadow-lg); color: var(--text); background: var(--card);
}
.admin-dialog::backdrop { background: rgba(15,14,72,.5); }
.admin-form { display: flex; flex-direction: column; max-height: 92vh; }
.admin-form__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card);
}
.admin-form__head h2 { margin: 0; font-size: 1.2rem; }
.admin-form fieldset {
  border: 0; border-top: 1px solid var(--line); margin: 0; padding: 1.1rem 1.4rem;
}
.admin-form legend {
  font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); padding: 0; margin-bottom: .3rem;
}
.af-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.admin-form label { display: block; font-size: .9rem; font-weight: 600; color: var(--primary); }
.admin-form input, .admin-form select, .admin-form textarea {
  width: 100%; margin-top: .3rem; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .55rem .7rem; background: #fff; font-weight: 400; color: var(--text);
}
.admin-form textarea { resize: vertical; }
.af-wide { grid-column: 1 / -1; }
.af-block { display: block; padding: .5rem 0; }
.af-check {
  display: flex; align-items: center; gap: .5rem; font-weight: 600;
  align-self: end; padding-bottom: .4rem;
}
.af-check input { width: auto; margin: 0; }
.admin-form__foot {
  display: flex; justify-content: flex-end; gap: .6rem;
  padding: 1.1rem 1.4rem; border-top: 1px solid var(--line);
  position: sticky; bottom: 0; background: var(--card);
}
.admin-form fieldset:not(:first-of-type) legend { margin-top: 0; }
.admin-form .error { padding: 0 1.4rem; }
.icon-btn {
  border: 0; background: transparent; font-size: 1.6rem; line-height: 1;
  cursor: pointer; color: var(--muted); padding: .2rem .5rem;
}
.icon-btn:hover { color: var(--primary); }

.img-preview { display: flex; flex-wrap: wrap; gap: .5rem; margin: .2rem 0 .6rem; }
.imgthumb {
  position: relative; width: 92px; height: 68px; border-radius: var(--r-sm);
  overflow: hidden; background: var(--bg-alt); border: 1px solid var(--line);
}
.imgthumb img { width: 100%; height: 100%; object-fit: cover; }
.imgthumb button {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px;
  border: 0; border-radius: 50%; background: rgba(15,14,72,.72); color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer; display: grid; place-items: center;
}
.img-preview__cover {
  position: absolute; left: 0; bottom: 0; right: 0; text-align: center;
  font-size: .64rem; font-weight: 700; background: var(--gold); color: var(--primary);
}
