/* Sitio público — móvil primero */
:root {
  /* Alias heredados → tokens SwipeHome (tokens.css). Usar los --c-* en código nuevo. */
  --ink: var(--c-ink);
  --muted: var(--c-muted);
  --line: var(--c-line);
  --bg: var(--c-bg);
  --card: var(--c-surface);
  --accent: var(--c-brand-ink);
  --accent-ink: var(--c-on-brand);
  --accent-soft: var(--c-brand-soft);
  --wa: var(--c-wa);
  --warn-bg: var(--c-warning-soft);
  --warn-ink: var(--c-warning-ink);
  --demo: var(--c-demo);
  --radius: var(--r-lg);
  --shadow: var(--sh-md);
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: var(--lh-base);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
fieldset { min-width: 0; }  /* 1.4.10: sin ancho mínimo implícito que desborde a 320 px */
/* 2.4.11: el foco no queda escondido detrás de la barra fija de contacto en celular */
html:has(body.has-sticky) { scroll-padding-bottom: 96px; }
@media (min-width: 960px) { html:has(body.has-sticky) { scroll-padding-bottom: 0; } }
body { margin: 0; background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.center-block { padding: 48px 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--c-white); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.hero-dark :focus-visible, .panel-top :focus-visible, .lightbox :focus-visible { outline-color: var(--c-focus-on-night); }
main:focus { outline: none; }

.demo-banner { background: var(--demo); color: var(--c-white); font-size: .85rem; padding: 6px 16px; text-align: center; }
.preview-banner { background: var(--c-night); color: var(--c-white); padding: 10px 16px; font-size: .9rem; }
.preview-banner a { color: var(--c-warning-soft); margin-left: 8px; }

.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: var(--fw-black); font-size: var(--fs-lg);
  letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.brand-logo { width: 32px; height: 32px; }
.brand-grad, .text-grad { background: var(--g-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* «Home» del logotipo con el degradado del logo (los logotipos están exentos del contraste de texto, WCAG 1.4.3). */
.site-header nav { display: flex; gap: 16px; }
.site-header nav a { color: var(--ink); text-decoration: none; font-weight: 500; padding: 6px 0; }
.site-header nav a:hover { color: var(--accent); }
.nav-panel { color: var(--accent) !important; }
@media (max-width: 600px) {
  .header-row { flex-wrap: wrap; gap: 0 12px; padding-top: 6px; padding-bottom: 2px; }
  .brand { font-size: var(--fs-base); }
  .site-header nav { gap: 14px; width: 100%; overflow-x: auto; }
  .site-header nav a { white-space: nowrap; font-size: .95rem; }
  /* Portada compacta: que la primera casa se vea sin hacer scroll largo */
}
.site-header nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0 96px; color: var(--muted); font-size: .9rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  padding: 10px 18px; border-radius: var(--r-md); border: 1px solid transparent; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--g-brand); color: var(--c-on-brand); }
.btn-primary:hover { background: var(--g-brand-hover); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--accent); border-color: currentColor; }
.btn-light { background: var(--c-white); color: var(--ink); border-color: var(--line); }
.btn-wa { background: var(--wa); color: var(--c-white); }
.btn-wa:hover { background: var(--c-wa-hover); }
.btn-block { width: 100%; }
.pill { background: var(--c-brand-soft); color: var(--c-brand-soft-ink); border-radius: var(--r-pill); padding: 1px 8px; font-size: .8rem; }


/* Catálogo */
.filter-form { padding: 0 16px 16px; display: grid; gap: 12px; }
.field { display: grid; gap: 4px; align-content: start; border: 0; padding: 0; margin: 0; }  /* en filas de varias columnas, los campos no se estiran */
.field label, .field legend { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md); background: var(--c-white); min-height: 44px; width: 100%; color: var(--ink); }
.field textarea { min-height: 72px; resize: vertical; }
.field small { color: var(--muted); font-size: .78rem; }
.budget { grid-template-columns: 1fr auto 1fr; align-items: center; }
.budget legend { grid-column: 1 / -1; margin-bottom: 4px; }
.budget small { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500 !important; }
.check input { width: 24px; height: 24px; min-height: 0; margin: 0; flex: none; }  /* 2.5.8: objetivo ≥ 24 px */
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.results-count { font-size: var(--fs-base); color: var(--muted); font-weight: 600; margin: 0 0 12px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-link { color: inherit; text-decoration: none; display: block; height: 100%; }
.card-link:hover .card-title { color: var(--accent); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--c-sunken); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-closed .card-media img { filter: saturate(.55); }
.no-photo { display: grid; place-items: center; height: 100%; color: var(--muted); }
.badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.badge { display: inline-block; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: 3px 8px; border-radius: var(--r-sm); background: var(--c-white); color: var(--ink); }
.badge-disponible { background: var(--c-success-soft); color: var(--c-success-ink); }
.badge-reservado { background: var(--c-warning-soft); color: var(--c-warning-ink); }
.badge-vendido { background: var(--c-night); color: var(--c-white); }
.badge-borrador, .badge-archivado { background: var(--c-sunken); color: var(--c-ink-2); }
.badge-demo { background: var(--demo); color: var(--c-white); }
.card-body { padding: 14px 16px 16px; }
.card-price { font-size: 1.2rem; font-weight: 700; margin: 0; }
.card-title { font-size: var(--fs-base); margin: 4px 0 2px; }
.card-loc { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .88rem; color: var(--muted); }
.facts b { color: var(--ink); }
.pager { display: flex; gap: 6px; margin-top: 20px; justify-content: center; }
.pager a, .pager span { min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--c-white); text-decoration: none; }
.pager span { background: var(--g-brand); color: var(--c-on-brand); border-color: transparent; }
.empty { background: var(--card); border: 1px dashed var(--c-line-strong); border-radius: var(--radius); padding: 32px 20px; text-align: center; }
.empty .btn { margin: 4px; }


/* Ficha */
.back { margin: 16px 0 8px; }
.detail-head { display: grid; gap: 8px; margin-bottom: 16px; }
.detail-head h1 { font-size: clamp(1.4rem, 3.6vw, 2rem); margin: 2px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; font-weight: 700; color: var(--muted); margin: 0; }
.loc { margin: 0; color: var(--muted); }
.price { font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 800; margin: 0; color: var(--ink); }
.head-price p { margin: 0 0 4px; }
@media (min-width: 760px) { .detail-head { grid-template-columns: 1fr auto; align-items: end; } .head-price { text-align: right; } }
.notice { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--r-md); padding: 12px 14px; }

.gallery { display: grid; gap: 6px; grid-template-columns: repeat(2, 1fr); position: relative; margin-bottom: 20px; }
.g-item { display: block; position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--c-sunken); }
.g-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.g-main { grid-column: 1 / -1; }
.g-main img { aspect-ratio: 16 / 10; }
.g-extra { display: none; }
.g-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(15, 25, 30, .55);
  color: var(--c-white); font-weight: 700; font-size: 1.1rem; }
.g-all { position: absolute; right: 10px; top: 10px; box-shadow: var(--shadow); }
.sample-note { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); margin: 2px 0 0; }
@media (min-width: 760px) {
  .gallery { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: auto auto; }
  .g-main { grid-column: 1; grid-row: 1 / span 2; }
  .g-main img { height: 100%; aspect-ratio: auto; min-height: 380px; }
  .g-all { top: auto; bottom: 34px; right: 10px; }
}
@media (max-width: 759px) {
  .gallery .g-item:nth-child(n+4) { display: none; }
  .gallery .g-item:nth-child(3) .g-more { display: none; }
}

.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(8, 12, 15, .96); color: var(--c-white); }
.lightbox::backdrop { background: rgba(8, 12, 15, .9); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
.lightbox figure { margin: 0; display: grid; place-items: center; grid-template-rows: 1fr auto; min-height: 0; padding: 0 56px 16px; }
.lightbox figure img { max-height: calc(100vh - 120px); width: auto; object-fit: contain; }
.lightbox figcaption { padding-top: 8px; color: var(--c-on-night-muted); text-align: center; }
.lb-close, .lb-prev, .lb-next { background: rgba(255, 255, 255, .12); color: var(--c-white); border: 0; border-radius: 50%;
  width: 48px; height: 48px; font-size: 1.6rem; cursor: pointer; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
@media (max-width: 600px) { .lightbox figure { padding: 0 4px 70px; } .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; } }

.detail-grid { display: grid; gap: 28px; }
@media (min-width: 960px) { .detail-grid { grid-template-columns: 1fr 360px; align-items: start; } }
.detail-main section { margin-bottom: 28px; }
.detail-main h2 { font-size: 1.2rem; margin: 0 0 10px; }
.summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 0; }
.summary div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; }
.summary dt { font-size: .8rem; color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; font-size: 1.05rem; }
.highlights { padding-left: 1.2em; margin: 0; }
.highlights li { margin-bottom: 4px; }
.prose p { margin: 0 0 10px; }
.levels { margin: 0; }
.levels div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.levels dt { font-weight: 700; }
.levels dd { margin: 0; }
@media (max-width: 520px) { .levels div { grid-template-columns: 1fr; gap: 2px; } }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px 12px; font-size: .9rem; }
.plan { margin: 0 0 12px; background: var(--c-white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px; }
.plan figcaption { color: var(--muted); font-size: .85rem; padding-top: 4px; }
.links-row { display: flex; flex-wrap: wrap; gap: 8px; }
.map { width: 100%; height: 300px; border: 1px solid var(--line); border-radius: var(--r-md); }

.advisor, .forms { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.advisor { margin-bottom: 14px; }
.advisor-name { font-size: 1.15rem; font-weight: 700; margin: 2px 0 6px; }
.contact-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.contact-actions .btn { flex: 1 1 120px; }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; background: var(--c-sunken); padding: 4px; border-radius: var(--r-md); }
.tabs button { flex: 1; font: inherit; font-weight: 600; border: 0; background: transparent; padding: 10px; border-radius: var(--r-md);
  cursor: pointer; min-height: 44px; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--c-white); color: var(--ink); box-shadow: var(--shadow); }
.forms form { display: grid; gap: 10px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.err { color: var(--c-danger); font-size: .85rem; margin: 0; }
.err-summary { background: var(--c-danger-soft); color: var(--c-danger-ink); padding: 8px 12px; border-radius: var(--r-md); margin: 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--c-danger); }
.hp { position: absolute; left: -5000px; }
.stack { display: grid; gap: 12px; }
.wa-preview { background: var(--c-success-soft); border-left: 4px solid var(--wa); padding: 12px 16px; margin: 12px 0; border-radius: var(--r-sm); }

.similar { margin-top: 20px; }
.sticky-contact { position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); z-index: 20; }
.sticky-contact .btn { flex: 1; }
@media (min-width: 960px) { .sticky-contact { display: none; } }

/* Portada oscura y modo Explorar (deslizar) */
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 1.05rem; border-radius: var(--r-pill); }
.fav-count { background: var(--g-brand); color: var(--c-on-brand); border-radius: var(--r-pill); font-size: .72rem; padding: 1px 7px; margin-left: 2px; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.center { text-align: center; }
.page-title { margin: 20px 0 12px; }
.fav-grid .card-link { height: auto; }
.fav-actions { display: flex; gap: 8px; padding: 0 16px 14px; flex-wrap: wrap; }
.fav-send { margin-top: 24px; max-width: 560px; }

.explore-page { background: var(--c-sunken); }
.explore-page .site-footer { display: none; }
.explore-bar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; padding-top: 14px; }
.explore-bar h1 { margin: 0; font-size: 1.4rem; }
.explore-bar p { margin: 2px 0 0; max-width: 520px; }
.explore-tools { display: flex; gap: 8px; align-items: center; position: relative; }
.explore-filters summary { list-style: none; cursor: pointer; }
.explore-filters summary::-webkit-details-marker { display: none; }
.explore-filters[open] .filter-form { position: absolute; right: 0; top: 46px; z-index: 30; width: min(320px, calc(100vw - 32px)); max-width: calc(100vw - 32px);
  background: var(--c-white); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px; }
.deck-area { max-width: 440px; margin: 10px auto 0; padding: 0 16px 24px; }
.deck { position: relative; height: clamp(340px, calc(100dvh - 330px), 560px); }
@media (max-width: 600px) {
  .explore-filters[open] .filter-form { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; }
  .explore-bar p, .explore-page .demo-banner { display: none; }
  .explore-page .site-header .brand { display: none; }
  .explore-bar { padding-top: 8px; }
  .deck { height: clamp(340px, calc(100dvh - 250px), 620px); }
  .deck-actions { margin-top: 12px; }
  .deck-area > .muted { display: none; }
}
.swipe-card { position: absolute; inset: 0; background: var(--c-white); border-radius: var(--r-xl); box-shadow: 0 10px 30px rgba(15, 26, 34, .18);
  overflow: hidden; display: grid; grid-template-rows: 1fr auto; touch-action: pan-y; user-select: none;
  transition: transform var(--dur-slow) var(--ease), opacity var(--dur-slow) var(--ease); }
.swipe-card.dragging { transition: none; cursor: grabbing; }
.swipe-card.is-top { z-index: 3; cursor: grab; }
.swipe-card.is-next { z-index: 2; transform: scale(.96) translateY(10px); }
.swipe-card.is-third { z-index: 1; transform: scale(.92) translateY(20px); opacity: .7; }
.swipe-card.gone-right { transform: translateX(130%) rotate(18deg) !important; opacity: 0; }
.swipe-card.gone-left { transform: translateX(-130%) rotate(-18deg) !important; opacity: 0; }
.sc-photo { position: relative; min-height: 0; background: var(--c-sunken); }
.sc-photo img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.sc-dots { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 2; }
.sc-dots span { flex: 1; height: 3px; border-radius: var(--r-sm); background: rgba(255, 255, 255, .45); }
.sc-dots span.on { background: var(--c-white); }
.sc-tap { position: absolute; top: 0; bottom: 40%; width: 35%; background: transparent; border: 0; z-index: 2; cursor: pointer; }
.sc-prev { left: 0; }
.sc-next { right: 0; }
.sc-badges { position: absolute; top: 22px; left: 12px; display: flex; gap: 6px; z-index: 2; }
.sc-stamp { position: absolute; top: 46px; z-index: 3; font-weight: 900; font-size: 1.6rem; letter-spacing: .06em; text-transform: uppercase;
  border: 4px solid; border-radius: var(--r-md); padding: 2px 12px; opacity: 0; transition: opacity .1s; }
.sc-like { left: 18px; color: var(--c-like); transform: rotate(-14deg); }
.sc-pass { right: 18px; color: var(--c-pass); transform: rotate(14deg); }
.hint-like .sc-like, .hint-pass .sc-pass { opacity: 1; }
.sc-facts { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.sc-facts div { display: grid; }
.sc-facts b { font-size: 1.05rem; }
.sc-facts span { font-size: .8rem; color: var(--muted); }
.sc-more { margin-left: auto; font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
.deck-end { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 20px;
  background: var(--c-white); border-radius: var(--r-xl); box-shadow: var(--shadow); }
.deck-actions { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 18px; }
.round { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--c-white); box-shadow: 0 6px 18px rgba(15, 26, 34, .15);
  font-size: 1.6rem; cursor: pointer; display: grid; place-items: center; }
.round:disabled { opacity: .4; cursor: default; }
.round-pass { color: var(--c-pass); }
.round-like { color: var(--c-wa); }
.round-advisor { width: 56px; height: 56px; background: var(--g-brand); color: var(--c-on-brand); font-size: 1.3rem; }
.deck-labels { display: flex; justify-content: center; gap: 22px; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.deck-labels span { width: 64px; text-align: center; }
.deck-labels span:nth-child(2) { width: 90px; }
.sheet { border: 0; border-radius: var(--r-xl) 18px 0 0; margin: auto auto 0; width: min(480px, 100vw); max-width: 100vw; padding: 20px 20px 28px; }
.sheet::backdrop { background: rgba(10, 16, 20, .55); }
.sheet h2 { margin: 2px 40px 6px 0; font-size: 1.15rem; }
.sheet-close { position: absolute; top: 12px; right: 12px; }
.sheet-close .lb-close { background: var(--c-sunken); color: var(--ink); width: 40px; height: 40px; font-size: 1.1rem; }
.sheet-actions { display: grid; gap: 8px; margin-top: 12px; }
@media (min-width: 700px) { .sheet { border-radius: var(--r-xl); margin: auto; } }
@media (prefers-reduced-motion: reduce) { .swipe-card { transition: none; } }


/* =====================================================================
   v2 (21-oct-2026) — dirección revisada por ChatGPT: casa protagonista, menos cajas y sombras,
   fondo claro con acentos de marca, entrada compacta y selector Explorar / Lista.
   ===================================================================== */
.demo-banner { padding: 0; text-align: left; }
.demo-banner details { max-width: 1180px; margin: 0 auto; padding: 4px 16px; }
.demo-banner summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; gap: 6px; }
.demo-banner details[open] { padding-bottom: 8px; }

.brand-ink { color: var(--c-brand-ink); }
.intro { padding: var(--sp-6) 0 var(--sp-4); }
.intro-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); }
.intro h1 { font-size: var(--fs-2xl); letter-spacing: -.02em; margin: 0 0 var(--sp-1); }
.intro-sub { margin: 0; color: var(--c-muted); max-width: 640px; }

.view-switch { display: inline-flex; padding: 4px; gap: 4px; background: var(--c-sunken); border: 1px solid var(--c-line);
  border-radius: var(--r-pill); }
.view-switch a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  text-decoration: none; color: var(--c-ink-2); font-weight: var(--fw-semibold); }
.view-switch a[aria-current="page"] { background: var(--c-white); color: var(--c-brand-ink); box-shadow: var(--sh-sm); }
.view-switch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.filter-bar { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; padding: var(--sp-4); background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--r-lg); align-items: end; }
.filter-bar .field label { font-size: var(--fs-sm); }
.filter-bar > .btn { width: 100%; }
.more-filters { grid-column: 1 / -1; }
.more-filters summary { cursor: pointer; font-weight: var(--fw-semibold); color: var(--c-brand-ink); min-height: 32px;
  display: inline-flex; align-items: center; }
.more-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  align-items: end; padding-top: var(--sp-2); }
.filter-note { grid-column: 1 / -1; color: var(--c-muted); font-size: var(--fs-xs); }
@media (min-width: 720px) {
  .filter-bar { grid-template-columns: 1fr 1.4fr 1fr auto; }
  .filter-bar > .btn { width: auto; }
}
.chips-active { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: var(--sp-3) 0 0; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill);
  background: var(--c-brand-soft); color: var(--c-brand-soft-ink); text-decoration: none; font-size: var(--fs-sm);
  font-weight: var(--fw-semibold); }
.results { margin-top: var(--sp-5); }

/* Tarjetas: borde fino en vez de sombra fuerte; precio y datos antes que el título */
.card { box-shadow: none; border: 1px solid var(--c-line); transition: box-shadow var(--dur-base) var(--ease); }
.card:hover { box-shadow: var(--sh-md); }
.card-body { display: grid; gap: 4px; }
.card-price { font-size: var(--fs-lg); letter-spacing: -.01em; }
.card-title { margin: 2px 0 0; font-size: var(--fs-base); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.card-loc { margin: 0; }
.facts { gap: 2px 12px; }

/* Ficha: cabecera más corta para llegar antes a la foto */
.back { margin: var(--sp-3) 0 var(--sp-2); font-size: var(--fs-sm); }
.detail-head { gap: 4px; margin-bottom: var(--sp-3); }
.detail-head h1 { font-size: clamp(1.25rem, 3.2vw, 1.75rem); line-height: 1.25; }
.head-price .price { font-size: clamp(1.4rem, 4vw, 2rem); }
@media (max-width: 759px) { .head-price { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; } .head-price p { margin: 0; } }
.summary div, .advisor, .forms { box-shadow: none; border: 1px solid var(--c-line); }

/* Explorar: datos en una franja estable (legibles con cualquier foto) e iconos SVG */
.swipe-card { grid-template-rows: 1fr auto auto; }
.sc-info { padding: var(--sp-3) var(--sp-4) 0; }
.sc-info .sc-price { margin: 0; font-size: var(--fs-xl); font-weight: var(--fw-black); color: var(--c-ink); letter-spacing: -.01em; }
.sc-info h2 { margin: 2px 0 0; font-size: var(--fs-base); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }
.sc-info .sc-loc { margin: 2px 0 0; color: var(--c-muted); font-size: var(--fs-sm); }
.sc-facts { padding-top: var(--sp-2); }
.round svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.round svg .fill { fill: currentColor; stroke: none; }
.round-advisor svg { width: 26px; height: 26px; }
.explore-tools { flex-wrap: wrap; }

/* Favoritas: estado vacío compacto */
.fav-empty { padding: var(--sp-6) var(--sp-4); }
.fav-empty h2 { font-size: var(--fs-lg); margin: 0 0 var(--sp-2); }
.fav-empty p { margin: 0 0 var(--sp-3); }

/* Filtros: en celular plegados («Filtrar») para que la primera casa aparezca pronto; en escritorio, barra abierta */
.filter-toggle > summary { list-style: none; width: 100%; }
.filter-toggle > summary::-webkit-details-marker { display: none; }
.filter-toggle[open] > summary { margin-bottom: var(--sp-3); }
@media (min-width: 720px) {
  .filter-toggle > summary { display: none; }
  .filter-toggle::details-content { content-visibility: visible; display: block; }
}
@media (max-width: 600px) {
  .intro { padding: var(--sp-4) 0 var(--sp-3); }
  .intro-more { display: none; }
  .intro-row { gap: var(--sp-3); }
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--c-brand); }

/* ---------- Página del asesor (/a/<slug>) ---------- */
.agent-head { align-items: center; }
.agent-id { display: flex; gap: var(--sp-4); align-items: center; }
.agent-id h1 { margin: 2px 0; }
.agent-avatar { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--g-brand); color: var(--c-on-brand); font-size: 1.6rem; font-weight: var(--fw-black); }

/* ---------- Servicio aliado: Consulta RPP (ficha) ---------- */
.rpp-box { border: 1px solid var(--c-line); border-left: 4px solid var(--c-brand-orange); border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5); background: var(--c-surface); }
.rpp-box h2 { margin-top: 0; }

/* ---------- Reporte semanal para el propietario ---------- */
.rep { max-width: 880px; padding-block: 24px 48px; display: grid; gap: 20px; }
.rep h1 { margin: 4px 0 0; }
.rep h2 { margin: 0 0 10px; font-size: 1.15rem; }
.rep-head { display: grid; gap: 16px; align-items: center; }
@media (min-width: 700px) { .rep-head { grid-template-columns: 1.2fr 1fr; } }
.rep-cover { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-lg); }
.rep-big { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 20px; text-align: center; }
.rep-big p { margin: 0; }
.rep-num { font-size: 3.4rem; font-weight: 800; line-height: 1.05; background: var(--g-brand); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
@media (forced-colors: active) { .rep-num { color: CanvasText; background: none; } }
.rep-trend { font-weight: 600; color: var(--muted); }
.rep-trend.up { color: var(--c-success); }
.rep-trend.down { color: var(--c-danger); }
.rep-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.rep-grid li { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 14px; display: grid; gap: 4px; }
.rep-n { font-size: 1.8rem; font-weight: 800; }
.rep-box { background: var(--c-surface); border: 1px solid var(--c-line); border-left: 4px solid var(--c-brand-orange);
  border-radius: var(--r-md); padding: 16px 18px; }
.rep-tips { margin: 0; padding-left: 1.2rem; display: grid; gap: 8px; }

/* ---------- Explorar: gustos aprendidos ---------- */
.taste { margin-bottom: 8px; }
.taste-hint { margin: 0; font-size: .88rem; color: var(--muted); }
.taste-box { background: var(--c-surface); border: 1px solid var(--c-line); border-left: 4px solid var(--c-brand-pink, var(--c-brand));
  border-radius: var(--r-md); padding: 10px 14px; display: grid; gap: 4px; }
.taste-box p { margin: 0; }
.taste-box .btn { justify-self: start; }
.sc-why { margin: 4px 0 0; font-size: .82rem; font-weight: 600; color: var(--c-success-ink, #14532d); }

/* ---------- Insignia de asesor certificado (Academia) ---------- */
.cert-badge { display: inline-block; margin: 4px 0; padding: 4px 12px; border-radius: 999px; background: var(--c-success-soft, #dcfce7);
  color: var(--c-success-ink, #14532d); font-weight: 700; font-size: .85rem; }

.collab-note { display: inline-block; margin: 4px 0; padding: 4px 12px; border-radius: 8px; background: #fef3c7; color: #78350f;
  font-weight: 700; font-size: .85rem; }

/* ---------- Selección para ti ---------- */
.sel-note { margin: 6px 0 0; padding: 8px 12px; border-left: 4px solid var(--c-brand-pink, #f472b6); background: var(--c-surface);
  border-radius: 8px; font-style: italic; }
@media (max-width: 600px) {
  .explore-bar p.sel-from, .explore-bar p.sel-note { display: block; font-size: .88rem; }
  .explore-bar p.sel-note { padding: 6px 10px; }
  .explore-bar p.cert-badge { display: inline-block; font-size: .8rem; }
}

/* ---------- Inversionistas y remates bancarios ---------- */
.inv { display: grid; gap: 22px; padding-block: 24px 48px; max-width: 980px; }
.inv-hero h1 { margin: 4px 0 8px; }
.inv-lead { font-size: 1.1rem; max-width: 720px; }
.inv-box { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 18px 20px; }
.inv-box h2 { margin-top: 0; }
.inv-types { display: grid; gap: 12px; margin: 0; }
.inv-types dt { font-weight: 800; }
.inv-types dd { margin: 2px 0 0; }
.inv-steps { padding-left: 1.3rem; display: grid; gap: 8px; margin: 0; }
.inv-risk { border-left: 4px solid #d97706; }
.inv-risk ul { padding-left: 1.2rem; display: grid; gap: 6px; }
.badge-remate { background: #0f172a; color: #fff; }
.remate-box { background: #fffbeb; border: 1px solid #fcd34d; border-radius: var(--r-md); padding: 14px 16px; }
.remate-box h2 { margin-top: 0; }
.remate-facts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 0 0 10px; }
.remate-facts dt { font-size: .82rem; color: #78350f; }
.remate-facts dd { margin: 0; font-weight: 700; }
@media (max-width: 560px) { .inv .row-2 { grid-template-columns: 1fr; } }

/* ---------- Vende tu casa ---------- */
.sell { display: grid; gap: 22px; padding-block: 24px 48px; max-width: 980px; }
.sell-hero h1 { margin: 4px 0 8px; }
.sell-benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.sell-benefits li { background: var(--c-surface); border: 1px solid var(--c-line); border-top: 4px solid var(--c-brand-pink, #f472b6);
  border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 4px; }
@media (max-width: 560px) { .sell .row-2 { grid-template-columns: 1fr; } }

/* ---------- Campos de fecha en iPhone (Safari) ----------
   Safari les da un ancho mínimo propio y más altura: se salían de su columna y se encimaban con el de al lado. */
.row-2 > *, .row-3 > *, .row-4 > * { min-width: 0; }
.field input[type="date"], .field input[type="time"] { -webkit-appearance: none; appearance: none; display: block;
  min-width: 0; max-width: 100%; height: 46px; line-height: 24px; background-color: var(--c-white); }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; min-height: 24px; }
.field select { height: 46px; }

/* Alertas de compradores («Avísame cuando haya casas así») */
.alert-cta { margin: 20px 0; background: var(--card); border: 1px solid var(--c-line-strong); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.alert-cta h2, .alert-cta h3 { margin: 0; font-size: 1.05rem; flex: 1 1 100%; }
.alert-cta p { margin: 0; flex: 1 1 260px; }
.alert-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .alert-form .row-2 { grid-template-columns: 1fr; } }

/* Ruta de navegación (también ayuda a los buscadores a entender las zonas) */
.crumbs ol { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .9rem; }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--muted, #64748b); }
.crumbs a { color: inherit; }

/* Páginas por zona y enlaces entre zonas */
.zone-links { margin: 32px 0 8px; }
.zone-links h2 { font-size: 1.1rem; }
.zone-links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.zone-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--c-line-strong); border-radius: 999px; color: inherit; text-decoration: none; }
.zone-links a:hover, .zone-links a:focus-visible { border-color: currentColor; }
.zone-intro { max-width: 70ch; }

/* Foto de perfil del asesor (ficha y página del asesor) */
.advisor-id { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.advisor-id .advisor-name { margin-bottom: 0; }
.advisor-photo, .agent-photo { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--c-surface, #fff); box-shadow: 0 0 0 2px var(--c-brand-pink, #ec4899); }
