/* ─────────────────────────────────────────────
   Paleta: azul marino + dorado (logo INIZIA)
   ───────────────────────────────────────────── */
:root {
  --navy-900: #0a1224;
  --navy-800: #101b33;
  --navy-700: #172647;
  --navy-600: #22355e;
  --gold: #c9a46a;
  --gold-600: #b08a4f;
  --gold-100: #f3e9d8;
  --cream: #faf7f2;
  --paper: #ffffff;
  --ink: #1b2233;
  --muted: #5d6578;
  --line: #e6e1d8;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(10, 18, 36, .10);
  --display: 'Josefin Sans', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: .01em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

.eyebrow {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold-600);
  margin-bottom: .6em;
}

/* ── Botones ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.6em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn--gold { background: var(--gold); color: var(--navy-900); }
.btn--gold:hover { background: #d6b47e; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(201, 164, 106, .35); }
.btn--line { background: transparent; border-color: var(--navy-700); color: var(--navy-700); }
.btn--sm { padding: .55em 1.2em; font-size: .88rem; }
.btn--block { width: 100%; }
.link { background: none; border: 0; color: var(--gold-600); font-weight: 700; cursor: pointer; padding: 0; }

/* ── Encabezado ── */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 18, 36, .96);
  backdrop-filter: blur(8px);
  color: #fff;
  border-bottom: 1px solid rgba(201, 164, 106, .25);
}
.top__in { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 52px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; font-size: .93rem; opacity: .88; }
.nav a:not(.btn):hover { color: var(--gold); opacity: 1; }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.menu-btn span { display: block; height: 2px; background: #fff; margin: 5px 0; transition: transform .2s, opacity .2s; }

/* ── Portada ── */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 60%;
  transform: scale(1.03);
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(10, 18, 36, .94) 0%, rgba(10, 18, 36, .78) 45%, rgba(10, 18, 36, .35) 100%);
}
.hero__in { position: relative; z-index: 2; padding: clamp(64px, 11vw, 130px) 0 clamp(56px, 8vw, 96px); }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); max-width: 15ch; font-weight: 600; }
.hero h1 span { display: block; color: var(--gold); font-weight: 300; font-size: .62em; margin-top: .35em; max-width: 26ch; }
.hero__sub { max-width: 52ch; margin: 1.2em 0 2.2em; color: rgba(255, 255, 255, .85); font-size: 1.05rem; }

.search { max-width: 860px; }
.search__tabs { display: flex; gap: 4px; }
.search__tabs button {
  border: 0; cursor: pointer;
  padding: .7em 1.6em;
  border-radius: 10px 10px 0 0;
  background: rgba(255, 255, 255, .14);
  color: #fff; font-weight: 700;
}
.search__tabs button.is-on { background: #fff; color: var(--navy-800); }
.search__row {
  display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 12px; align-items: end;
  background: #fff; color: var(--ink);
  padding: 18px; border-radius: 0 var(--radius) var(--radius) var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}
.search label span, .filters legend, .form label span, .range label span, .sort span {
  display: block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px;
}
select, input, textarea {
  width: 100%;
  padding: .72em .9em;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color .2s;
}
select:focus, input:focus, textarea:focus { border-color: var(--gold); }
.search .btn { height: 48px; padding-inline: 2.2em; }

/* ── Categorías ── */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -1px; padding: 48px 0 16px; }
.cat {
  position: relative; border: 0; padding: 0; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3;
  text-align: left; color: #fff; background: var(--navy-800);
  box-shadow: var(--shadow);
}
.cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; opacity: .85; }
.cat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 18, 36, .92), rgba(10, 18, 36, .05) 65%); }
.cat span { position: absolute; z-index: 1; left: 18px; bottom: 16px; font-size: .9rem; color: var(--gold-100); }
.cat strong { display: block; font-family: var(--display); font-size: 1.35rem; color: #fff; }
.cat:hover img { transform: scale(1.06); }

/* ── Catálogo ── */
.catalog { padding: 64px 0 96px; }
.sec-head { margin-bottom: 36px; max-width: 640px; }
.sec-head p:not(.eyebrow) { color: var(--muted); margin-top: .8em; }
.catalog__grid { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }

.filters {
  position: sticky; top: 92px;
  background: var(--paper); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}
.filters__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.filters fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.filters fieldset:last-child { margin-bottom: 0; }
.filters legend { padding: 0; }
.filters legend small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.filters fieldset.is-off { opacity: .4; pointer-events: none; }

.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--cream); border-radius: 10px; padding: 4px; }
.seg button { border: 0; background: none; padding: .6em; border-radius: 8px; font-weight: 700; cursor: pointer; color: var(--muted); }
.seg button.is-on { background: var(--navy-800); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: .4em .95em; font-size: .88rem; font-weight: 600; cursor: pointer; color: var(--ink);
}
.chips button:hover { border-color: var(--gold); }
.chips button.is-on { background: var(--gold-100); border-color: var(--gold); color: var(--navy-800); }
.chips--sm { margin-top: 10px; }
.chips--sm button { font-size: .78rem; padding: .32em .75em; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.range label span { font-size: .68rem; }

.results__bar { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.results__bar p { margin: 0; color: var(--muted); font-weight: 600; flex: 1; }
.sort { display: flex; align-items: center; gap: 10px; }
.sort span { margin: 0; white-space: nowrap; }
.sort select { width: auto; padding-block: .5em; }
.filters-toggle { display: none; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
  border: 0; padding: 0; text-align: left;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(10, 18, 36, .16); }
.card__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--navy-800); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__img img { transform: scale(1.05); }
.badge {
  position: absolute; top: 12px; left: 12px;
  padding: .3em .85em; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  background: var(--navy-800); color: #fff;
}
.badge--renta { background: var(--gold); color: var(--navy-900); }
.badge--star { left: auto; right: 12px; background: rgba(255, 255, 255, .92); color: var(--gold-600); }
.card__count { position: absolute; right: 12px; bottom: 12px; background: rgba(10, 18, 36, .75); color: #fff; font-size: .75rem; padding: .25em .7em; border-radius: 999px; }
.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.price { font-family: var(--display); font-size: 1.6rem; font-weight: 700; color: var(--navy-800); }
.price small { font-family: var(--body); font-size: .85rem; font-weight: 600; color: var(--muted); }
.card h3 { font-family: var(--body); font-weight: 700; font-size: 1rem; margin: 4px 0 2px; }
.loc { color: var(--muted); font-size: .88rem; display: flex; gap: 4px; align-items: center; }
.loc svg { width: 14px; height: 14px; flex: none; }
.specs { display: flex; flex-wrap: wrap; gap: 14px; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: .86rem; font-weight: 600; }
.specs li { display: flex; align-items: center; gap: 6px; }
.specs svg { width: 18px; height: 18px; stroke: var(--gold-600); }
.credit-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 14px; }
.credit-tags span { font-size: .7rem; font-weight: 700; padding: .25em .65em; border-radius: 6px; background: var(--cream); color: var(--navy-600); }

.empty {
  grid-column: 1 / -1; text-align: center;
  background: var(--paper); border-radius: var(--radius); padding: 48px 24px;
  box-shadow: var(--shadow);
}
.empty h3 { font-size: 1.4rem; margin-bottom: .4em; }
.empty p { color: var(--muted); max-width: 46ch; margin: 0 auto 1.4em; }

/* ── Financiamiento ── */
.finance { background: var(--navy-800); color: #fff; padding: 96px 0; position: relative; overflow: hidden; }
.finance::before {
  content: ''; position: absolute; width: 600px; height: 600px; right: -200px; top: -260px;
  border-radius: 50%; border: 1px solid rgba(201, 164, 106, .25);
}
.sec-head--light p:not(.eyebrow) { color: rgba(255, 255, 255, .75); }
.sec-head--light .eyebrow { color: var(--gold); }
.fin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.fin {
  background: var(--navy-700); border: 1px solid rgba(201, 164, 106, .18);
  border-radius: var(--radius); padding: 28px 24px;
  transition: border-color .2s, transform .2s;
}
.fin:hover { border-color: var(--gold); transform: translateY(-3px); }
.fin__ico { width: 56px; height: 56px; border-radius: 14px; background: rgba(201, 164, 106, .14); display: grid; place-items: center; margin-bottom: 18px; }
.fin__ico svg, .pill svg { width: 30px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fin h3 { font-size: 1.3rem; margin-bottom: .5em; }
.fin p { color: rgba(255, 255, 255, .75); font-size: .93rem; margin: 0; }

/* ── Garantías ── */
.trust { padding: 96px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pill { display: flex; gap: 18px; background: var(--paper); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); border-top: 3px solid var(--gold); }
.pill svg { flex: none; width: 40px; height: 40px; stroke: var(--gold-600); }
.pill h3 { margin-bottom: .4em; }
.pill p { margin: 0; color: var(--muted); font-size: .94rem; }

.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; counter-reset: paso; position: relative; }
.steps::before { content: ''; position: absolute; top: 22px; left: 8%; right: 8%; height: 2px; background: linear-gradient(90deg, var(--gold), var(--navy-600)); }
.steps li { counter-increment: paso; text-align: center; padding: 0 8px; position: relative; }
.steps li::before {
  content: counter(paso); display: grid; place-items: center;
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--navy-800); color: var(--gold); font-family: var(--display); font-weight: 700; font-size: 1.1rem;
  border: 3px solid var(--cream); position: relative;
}
.steps strong { display: block; font-family: var(--display); font-size: 1.05rem; }
.steps span { display: block; color: var(--muted); font-size: .85rem; line-height: 1.45; margin-top: 4px; }

/* ── Asesora ── */
.agent { background: var(--paper); padding: 96px 0; }
.agent__in { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.agent__photo { position: relative; }
.agent__photo::before { content: ''; position: absolute; inset: 24px -24px -24px 24px; border: 2px solid var(--gold); border-radius: var(--radius); }
.agent__photo img { position: relative; border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 1; object-fit: cover; width: 100%; }
.agent__role { color: var(--gold-600); font-weight: 700; margin: .4em 0 1.4em; }
.agent__txt > p:not(.eyebrow):not(.agent__role) { color: var(--muted); }
.backing { margin: 28px 0 32px; padding: 20px; background: var(--cream); border-radius: var(--radius); }
.backing__label { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 12px; }
.backing__logos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: center; }
.backing__logos img { width: 100%; height: auto; border-radius: 10px; }

/* ── Contacto ── */
.contact { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; padding: 96px 0; }
.contact__in { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.contact .eyebrow { color: var(--gold); }
.contact h2 + p { color: rgba(255, 255, 255, .78); margin-top: 1em; }
.contact__list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; }
.contact__list span { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-weight: 700; }
.contact__list a { font-family: var(--display); font-size: 1.5rem; text-decoration: none; }
.form { background: #fff; color: var(--ink); padding: 28px; border-radius: var(--radius); display: grid; gap: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.form label { display: block; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form__note { font-size: .8rem; color: var(--muted); text-align: center; margin: -4px 0 0; }

/* ── Pie ── */
.foot { background: var(--navy-900); color: rgba(255, 255, 255, .7); padding: 48px 0 32px; font-size: .85rem; }
.foot__in { display: grid; gap: 24px; }
.foot__brand { display: flex; gap: 18px; align-items: center; }
.foot__brand img { height: 72px; width: auto; }
.foot__brand p { margin: 0; }
.foot__brand strong { color: #fff; font-family: var(--display); font-size: 1.05rem; }
.foot__legal { font-size: .76rem; max-width: 110ch; margin: 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); }
.foot__copy { margin: 0; font-size: .78rem; }

/* ── WhatsApp flotante ── */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .25); cursor: pointer;
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ── Ficha (modal) ── */
.modal {
  width: min(1040px, 100% - 24px); max-height: calc(100vh - 32px);
  padding: 0; border: 0; border-radius: 18px; overflow: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}
.modal::backdrop { background: rgba(10, 18, 36, .75); backdrop-filter: blur(3px); }
.modal__close {
  position: sticky; top: 12px; float: right; margin: 12px 12px -56px 0; z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .95); font-size: 1.8rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
}
.gallery { background: var(--navy-900); }
.gallery__main { position: relative; aspect-ratio: 16 / 9; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__nav {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .9); font-size: 1.4rem; color: var(--navy-800);
}
.gallery__nav--prev { left: 12px; }
.gallery__nav--next { right: 12px; }
.gallery__thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
.gallery__thumbs button { flex: none; width: 92px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; opacity: .55; background: none; }
.gallery__thumbs button.is-on { border-color: var(--gold); opacity: 1; }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail { display: grid; grid-template-columns: 1.5fr 1fr; gap: 36px; padding: 32px; }
.detail h2 { font-size: 1.8rem; margin: 6px 0 4px; }
.detail .price { font-size: 2rem; }
.detail__note { color: var(--muted); font-size: .85rem; }
.detail ul.feats { columns: 2; padding-left: 1.1em; margin: 0 0 1.4em; }
.detail ul.feats li { margin-bottom: .3em; }
.detail ul.feats li::marker { color: var(--gold); }
.detail__side { background: var(--cream); border-radius: var(--radius); padding: 22px; align-self: start; }
.detail__side .specs { border-top: 0; padding-top: 0; margin: 0 0 18px; display: grid; grid-template-columns: 1fr 1fr; }
.detail__side h4 { margin: 0 0 8px; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.detail__side .credit-tags { padding-top: 0; margin-bottom: 20px; }
.detail__side .credit-tags span { background: #fff; }
.detail__agent { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.detail__agent img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 40% 20%; }
.detail__agent strong { display: block; }
.detail__agent small { color: var(--muted); }
.aviso { font-size: .78rem; color: var(--muted); font-style: italic; }

/* ── Responsivo ── */
@media (max-width: 1024px) {
  .fin-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 32px; }
  .steps::before { display: none; }
}

@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-900); padding: 8px 16px 20px;
    border-bottom: 1px solid rgba(201, 164, 106, .25);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav .btn { margin-top: 14px; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .search__row { grid-template-columns: 1fr 1fr; }
  .search .btn { grid-column: 1 / -1; }
  .cats { grid-template-columns: repeat(2, 1fr); }

  .catalog__grid { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.is-open { display: block; }
  .filters-toggle { display: inline-flex; }

  .trust-grid, .agent__in, .contact__in { grid-template-columns: 1fr; }
  .agent__in { gap: 48px; }
  .agent__photo { max-width: 440px; }
  .detail { grid-template-columns: 1fr; padding: 22px; }
}

@media (max-width: 560px) {
  .brand img { height: 42px; }
  .search__row { grid-template-columns: 1fr; }
  .cats { gap: 10px; padding-top: 28px; }
  .cat span { left: 12px; bottom: 10px; font-size: .78rem; }
  .cat strong { font-size: 1.1rem; }
  .fin-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .results__bar { flex-wrap: wrap; }
  .results__bar p { order: 3; flex-basis: 100%; }
  .sort { margin-left: auto; }
  .form__row, .backing__logos { grid-template-columns: 1fr; }
  .detail ul.feats { columns: 1; }
  .agent__photo::before { inset: 14px -10px -14px 14px; }
}
