/* =========================================================================
   EnMéxico.Casa — Design System
   Tokens clonados de Zillow (fondo) + Redfin (identidad cálida) — valores exactos.
   Mapeo a Tailwind (porto Next.js):
     primary      #FF9902  ->  colors.primary / accent
     primary-hover#EC7210  ->  colors.primary.hover
     surface      #FFFFFF  ->  bg-surface
     on-surface   #000000  ->  text-on-surface
     bg           #FAFBFC  ->  bg-app
     muted        #6B6B6B  ->  text-muted
     border       #E3E6EA  ->  border-default
   Escala 8px: 8 / 11 / 29 / 31 / 53  ->  spacing.1/.2/.3/.4/.5
   ========================================================================= */

:root {
  /* Color */
  --primary: #FF9902;
  --primary-hover: #EC7210;
  --surface: #FFFFFF;
  --on-surface: #000000;
  --bg: #FAFBFC;
  --fg: #000000;
  --muted: #6B6B6B;
  --muted-strong: #3D3D3D;
  --border: #E3E6EA;
  --border-strong: #C6CBD1;
  --accent-soft: #FFF3E0;
  --accent-soft-border: #FFD9A6;

  /* Ilustración line-art (beige/dorado) */
  --ill-bg: #FBF6EE;
  --ill-fill: #F6EFE2;
  --ill-line: #8B6F47;
  --ill-gold: #C8A23A;

  /* Semánticos */
  --success: #1E8E3E;
  --success-soft: #E7F4EC;
  --danger: #D93025;
  --warn: #E37400;

  /* Radio (Redfin: sm botones, md inputs/cards) */
  --r-sm: 2px;
  --r-md: 4px;

  /* Tipo */
  --font-base: "Amazon Ember", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-display: 32px;
  --t-h1: 40px;
  --t-h2: 24px;
  --t-h3: 20px;
  --t-base: 16px;
  --t-sm: 14px;
  --t-xs: 12px;

  /* Espaciado (escala 8px + valores Zillow) */
  --sp-0: 4px;
  --sp-1: 8px;
  --sp-2: 11px;
  --sp-15: 16px;
  --sp-25: 24px;
  --sp-3: 29px;
  --sp-4: 31px;
  --sp-35: 40px;
  --sp-5: 53px;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 6px rgba(0, 0, 0, 0.04);
  --shadow-raised: 0 6px 20px rgba(0, 0, 0, 0.10);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  letter-spacing: 0;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary-hover); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
::placeholder { color: var(--muted); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--sp-25);
  padding-right: var(--sp-25);
}

.eyebrow {
  display: inline-block;
  font-size: var(--t-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-hover);
}
.h-display { font-size: var(--t-display); font-weight: 400; line-height: 1.12; letter-spacing: -0.01em; }
.h-xl { font-size: var(--t-h1); font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; }
.h-lg { font-size: var(--t-h2); font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }
.h-md { font-size: var(--t-h3); font-weight: 500; line-height: 1.25; }
.lead { font-size: var(--t-base); color: var(--muted-strong); line-height: 1.6; }
.muted { color: var(--muted); font-size: var(--t-sm); }
.small { font-size: var(--t-sm); }
.xsmall { font-size: var(--t-xs); }

.section { padding: var(--sp-5) 0; }
.section--tight { padding: var(--sp-3) 0; }
.section-head { margin-bottom: var(--sp-25); display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-15); flex-wrap: wrap; }
.section-head h2 { font-size: var(--t-h2); font-weight: 500; letter-spacing: -0.01em; }
.section-head .link { font-size: var(--t-sm); font-weight: 600; color: var(--primary-hover); }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  height: 60px;
  display: flex;
  align-items: center;
  gap: var(--sp-25);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--on-surface);
  white-space: nowrap;
}
.brand:hover { color: var(--on-surface); }
.brand .dot { color: var(--primary); }
.brand svg { color: var(--primary); }
.nav { display: flex; gap: var(--sp-25); align-items: center; margin-left: var(--sp-1); }
.nav a { font-size: var(--t-base); color: var(--muted-strong); font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--on-surface); }
.nav a.active { box-shadow: inset 0 -2px 0 var(--primary); padding-bottom: 2px; }
.topbar-actions { margin-left: auto; display: flex; gap: var(--sp-1); align-items: center; }
.nav-toggle { display: none; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  font-size: var(--t-base);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 5px 30px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  min-height: 44px;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #000000; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #000; }
.btn-outline { background: var(--surface); color: var(--on-surface); border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--on-surface); background: var(--surface); color: var(--on-surface); }
.btn-ghost { background: transparent; color: var(--on-surface); border-color: transparent; padding-left: 16px; padding-right: 16px; }
.btn-ghost:hover { color: var(--primary-hover); background: var(--accent-soft); }
.btn-sm { min-height: 36px; padding: 4px 16px; font-size: var(--t-sm); }
.btn-lg { min-height: 50px; padding: 8px 34px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Badge "Ejemplo ilustrado" ---------- */
.badge-ejemplo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--accent-soft-border);
  color: var(--ill-line);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.badge-ejemplo svg { color: var(--ill-gold); flex: none; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--r-md);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-venta { background: var(--accent-soft); color: var(--primary-hover); }
.badge-renta { background: #EEF1F4; color: var(--muted-strong); }
.badge-outline { background: var(--surface); border: 1px solid var(--border); color: var(--muted-strong); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  display: grid;
  align-items: end;
  min-height: 520px;
  overflow: hidden;
  background: #16120b;
}
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,16,8,0.34) 0%, rgba(20,16,8,0.05) 46%, rgba(20,16,8,0.68) 100%); }
.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--sp-5) 0 var(--sp-35);
}
.hero-title { font-size: clamp(30px, 4vw, 44px); font-weight: 400; line-height: 1.08; letter-spacing: -0.02em; max-width: 16ch; margin-bottom: var(--sp-15); color: #fff; text-shadow: 0 1px 16px rgba(0,0,0,0.4); }
.hero-sub { font-size: var(--t-base); color: rgba(255,255,255,0.94); max-width: 52ch; text-shadow: 0 1px 10px rgba(0,0,0,0.3); }

/* Barra de búsqueda */
.searchbar {
  margin-top: var(--sp-25);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-raised);
  padding: var(--sp-1);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-1);
  max-width: 760px;
}
.searchbar-row { display: flex; gap: var(--sp-1); }
.search-seg {
  display: inline-flex;
  background: #F1F3F5;
  border-radius: var(--r-sm);
  padding: 3px;
  gap: 2px;
}
.search-seg button {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--muted-strong);
  letter-spacing: 0.02em;
}
.search-seg button[aria-pressed="true"] { background: var(--surface); color: var(--on-surface); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.search-input-wrap { flex: 1; display: flex; align-items: center; gap: var(--sp-1); border: 1px solid var(--border); border-radius: var(--r-md); padding: 0 var(--sp-15); }
.search-input-wrap svg { color: var(--muted); flex: none; }
.search-input {
  border: 0;
  outline: none;
  flex: 1;
  font-size: var(--t-base);
  padding: 11px 0;
  min-width: 0;
  background: transparent;
}

/* ---------- Grid de tarjetas ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-2);
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: box-shadow .15s ease, transform .12s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.card:hover { box-shadow: var(--shadow-raised); transform: translateY(-1px); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: var(--ill-bg); overflow: hidden; }
.card-media svg { width: 100%; height: 100%; }
.card-media img.card-ill { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media .badge-ejemplo { position: absolute; top: var(--sp-1); left: var(--sp-1); z-index: 2; }
.card-media .badge-op { position: absolute; top: var(--sp-1); right: var(--sp-1); z-index: 2; }
.card-body { padding: var(--sp-15); display: flex; flex-direction: column; gap: 6px; }
.card-precio { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.card-precio .periodo { font-size: var(--t-sm); font-weight: 500; color: var(--muted); }
.card-specs { font-size: var(--t-sm); color: var(--muted-strong); }
.card-loc { font-size: var(--t-sm); color: var(--muted); display: flex; align-items: center; gap: 4px; }

/* ---------- Filtros ---------- */
.filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-15);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
}
.filter {
  position: relative;
}
.filter > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 7px 12px;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--on-surface);
  letter-spacing: 0.01em;
}
.filter > button[aria-expanded="true"] { border-color: var(--primary); }
.filter .pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-raised);
  padding: var(--sp-15);
  min-width: 220px;
  display: none;
}
.filter.open .pop { display: block; }
.pop label { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: var(--t-sm); cursor: pointer; }
.pop .range-row { display: flex; gap: 8px; align-items: center; }
.pop input[type="number"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 7px 8px;
  font-size: var(--t-sm);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  color: var(--primary-hover);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: var(--t-sm);
  font-weight: 600;
}
.chip button { border: 0; background: none; color: inherit; display: inline-flex; padding: 0; }
.clear-filters { font-size: var(--t-sm); font-weight: 600; color: var(--primary-hover); background: none; border: 0; padding: 6px 4px; }

/* ---------- Split lista + mapa ---------- */
.split {
  display: grid;
  grid-template-columns: 460px 1fr;
  min-height: calc(100vh - 60px);
}
.split-list {
  border-right: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
  max-height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
}
.split-list-head {
  padding: var(--sp-15);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 5;
}
.result-count { font-size: var(--t-sm); color: var(--muted-strong); font-weight: 600; }
.split-list .grid { grid-template-columns: 1fr; padding: var(--sp-15); gap: var(--sp-15); }
.split-map { position: sticky; top: 60px; height: calc(100vh - 60px); }
.map-box { width: 100%; height: 100%; background: #E9EDF1; }

.view-toggle { display: none; }

/* ---------- Popup mapa (Leaflet) ---------- */
.map-pop { background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-raised); width: 220px; overflow: hidden; }
.map-pop img, .map-pop svg { width: 100%; height: 120px; background: var(--ill-bg); }
.map-pop .map-pop-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.map-pop .map-pop-precio { font-weight: 700; font-size: var(--t-base); }
.map-pop .map-pop-loc { font-size: var(--t-xs); color: var(--muted); }
.map-pop a { color: var(--primary-hover); font-size: var(--t-sm); font-weight: 600; }
.pin { position: relative; }
.pin svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.25)); }
.leaflet-popup-content-wrapper { border-radius: var(--r-md) !important; padding: 0 !important; }
.leaflet-popup-content { margin: 0 !important; width: auto !important; }
.leaflet-popup-close-button { top: 4px !important; right: 4px !important; color: var(--muted) !important; z-index: 5; }
.marker-cluster { background: rgba(255, 153, 2, 0.85); color: #000; font-weight: 700; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }

/* ---------- Ficha de propiedad ---------- */
.detail-hero { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--sp-25); padding: var(--sp-3) 0 var(--sp-25); }
.detail-gallery {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--ill-bg);
  aspect-ratio: 16 / 10;
}
.detail-gallery svg { width: 100%; height: 100%; }
.detail-gallery .badge-ejemplo { position: absolute; top: var(--sp-15); left: var(--sp-15); z-index: 2; }
.detail-thumbs { display: flex; gap: var(--sp-1); margin-top: var(--sp-1); }
.detail-thumbs .thumb { width: 72px; height: 54px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); background: var(--ill-bg); cursor: pointer; }
.detail-thumbs .thumb.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.detail-summary { display: flex; flex-direction: column; gap: var(--sp-15); }
.detail-precio { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.detail-precio .periodo { font-size: var(--t-base); font-weight: 500; color: var(--muted); }
.detail-addr { font-size: var(--t-base); color: var(--muted-strong); }
.detail-facts { display: flex; gap: var(--sp-25); flex-wrap: wrap; padding: var(--sp-15) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.fact { display: flex; flex-direction: column; }
.fact b { font-size: 20px; font-weight: 700; }
.fact span { font-size: var(--t-sm); color: var(--muted); }
.detail-actions { display: flex; gap: var(--sp-1); flex-wrap: wrap; }

.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--sp-25); padding-bottom: var(--sp-5); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-25); }
.panel + .panel { margin-top: var(--sp-15); }
.panel h3 { font-size: var(--t-h3); font-weight: 500; margin-bottom: var(--sp-15); }
.amenities { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.amenity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-size: var(--t-sm);
  color: var(--muted-strong);
}
.amenity svg { color: var(--primary-hover); flex: none; }

.source-panel { background: var(--accent-soft); border-color: var(--accent-soft-border); }
.source-panel .source-line { display: flex; gap: 10px; align-items: flex-start; }
.source-panel svg { color: var(--ill-gold); flex: none; margin-top: 2px; }

/* ---------- Publicar / conectores ---------- */
.connector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-15); }
.connector {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-25);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  text-align: left;
  align-items: flex-start;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.connector:hover { border-color: var(--primary); box-shadow: var(--shadow-card); }
.connector .icon { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--primary-hover); display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-1); }
.connector h3 { font-size: var(--t-h3); font-weight: 500; }
.connector .tag { font-size: var(--t-xs); font-weight: 600; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

.wizard { display: flex; flex-direction: column; gap: var(--sp-15); }
.steps { display: flex; gap: var(--sp-1); align-items: center; flex-wrap: wrap; margin-bottom: var(--sp-1); }
.step {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--t-sm); font-weight: 600; color: var(--muted);
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
}
.step.active { color: var(--primary-hover); border-color: var(--primary); background: var(--accent-soft); }
.step.done { color: var(--success); border-color: var(--success); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-15); }
.field label { font-size: var(--t-sm); font-weight: 600; color: var(--muted-strong); }
.field input, .field select, .field textarea {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: var(--t-base);
  font-family: inherit;
  background: var(--surface);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); outline: none; }
.field .hint { font-size: var(--t-xs); color: var(--muted); }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.field .error { font-size: var(--t-xs); color: var(--danger); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-15); }
.wizard-nav { display: flex; justify-content: space-between; gap: var(--sp-15); margin-top: var(--sp-1); }

/* ---------- Dashboard ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-15); }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-15);
  display: flex; flex-direction: column; gap: 4px;
}
.stat b { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.stat span { font-size: var(--t-sm); color: var(--muted); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: var(--t-sm); }
.table th { color: var(--muted); font-weight: 600; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.06em; }
.table tr:hover td { background: #FBFCFD; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-dot.on { background: var(--success); }
.status-dot.off { background: var(--muted); }
.api-key {
  display: flex; align-items: center; gap: var(--sp-1);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--t-sm);
  background: #F4F5F7; border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 8px 12px;
}

/* ---------- Estados vacíos ---------- */
.empty {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-25);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-15);
}
.empty .icon { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--primary-hover); display: flex; align-items: center; justify-content: center; }
.empty h3 { font-size: var(--t-h3); font-weight: 500; }
.empty p { color: var(--muted); max-width: 46ch; }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: var(--sp-5) 0 var(--sp-25); margin-top: var(--sp-5); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--sp-25); }
.footer .brand { margin-bottom: var(--sp-1); }
.footer h4 { font-size: var(--t-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: var(--sp-15); }
.footer ul li { margin-bottom: 10px; }
.footer ul a { font-size: var(--t-sm); color: var(--muted-strong); }
.footer ul a:hover { color: var(--primary-hover); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: var(--sp-25); padding-top: var(--sp-15); font-size: var(--t-xs); color: var(--muted); display: flex; justify-content: space-between; gap: var(--sp-15); flex-wrap: wrap; }

/* ---------- Tarjetas en lista (horizontal) + chips de filtro ---------- */
.split-list .card { flex-direction: row; }
.split-list .card-link { flex-direction: row; }
.split-list .card-media { width: 200px; flex: none; aspect-ratio: 4 / 3; }
.split-list .card-body { flex: 1; justify-content: center; }
.card.active { border-color: var(--primary); box-shadow: var(--shadow-raised); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
@media (max-width: 560px) {
  .split-list .card-media { width: 118px; }
  .split-list .card-precio { font-size: 17px; }
}

/* ---------- Launcher ---------- */
.launcher-hero { padding: var(--sp-5) 0 var(--sp-3); }
.screen-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-15); padding-bottom: var(--sp-5); }
.screen-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .15s ease, transform .12s ease, border-color .15s ease;
}
.screen-tile:hover { box-shadow: var(--shadow-raised); transform: translateY(-2px); border-color: var(--primary); }
.screen-tile .thumb { aspect-ratio: 16 / 10; background: var(--ill-bg); display: flex; align-items: center; justify-content: center; }
.screen-tile .thumb svg { width: 60%; height: auto; }
.screen-tile .body { padding: var(--sp-15); display: flex; flex-direction: column; gap: 6px; }
.screen-tile h3 { font-size: var(--t-h3); font-weight: 500; }
.screen-tile p { font-size: var(--t-sm); color: var(--muted); }
.screen-tile .go { font-size: var(--t-sm); font-weight: 600; color: var(--primary-hover); display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .detail-hero, .detail-grid { grid-template-columns: 1fr; }
  .connector-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .screen-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; }
  .split-list { max-height: none; position: static; border-right: 0; border-bottom: 1px solid var(--border); }
  .split-map { position: static; height: 55vh; }
  .view-toggle { display: inline-flex; }
  .split-map.hidden, .split-list.hidden { display: none; }
}

@media (max-width: 640px) {
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: var(--sp-15); gap: var(--sp-15); margin: 0;
  }
  .nav-toggle { display: inline-flex; }
  .container { padding-left: var(--sp-15); padding-right: var(--sp-15); }
  .section { padding: var(--sp-35) 0; }
  .hero { min-height: 460px; }
  .form-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .screen-grid { grid-template-columns: 1fr; }
  .searchbar-row { flex-direction: column; }
  .search-seg { width: 100%; }
  .search-seg button { flex: 1; }
  .topbar-actions .btn-ghost { display: none; }
}

/* ---------- Tamaños de íconos (SVG) ---------- */
svg { height: auto; }
.brand svg { width: 22px; height: 22px; }
.nav-toggle svg { width: 20px; height: 20px; }
.badge-ejemplo svg { width: 12px; height: 12px; }
.card-loc svg { width: 14px; height: 14px; flex: none; }
.amenity svg { width: 18px; height: 18px; flex: none; }
.source-panel svg { width: 18px; height: 18px; }
.connector .icon svg { width: 22px; height: 22px; }
.empty .icon svg { width: 26px; height: 26px; }
.search-input-wrap svg { width: 18px; height: 18px; }
.btn svg { width: 18px; height: 18px; }
.filter > button svg { width: 14px; height: 14px; }
.chip button svg { width: 12px; height: 12px; }
.stat svg { width: 20px; height: 20px; }
.screen-tile .go svg { width: 16px; height: 16px; }
.section-head .link svg { width: 16px; height: 16px; vertical-align: -3px; }

/* ---------- Tarjeta clickeable ---------- */
.card-link { color: inherit; display: flex; flex-direction: column; height: 100%; }
.card-link:hover { color: inherit; }

/* ---------- Sección "¿Por qué?" ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-15); }
.why {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-25);
  display: flex; flex-direction: column; gap: var(--sp-1);
}
.why .icon { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--primary-hover); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.why .icon svg { width: 22px; height: 22px; }
.why h3 { font-size: var(--t-h3); font-weight: 500; }
.why p { font-size: var(--t-sm); color: var(--muted); line-height: 1.55; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .why-grid { grid-template-columns: 1fr; } }

/* ---------- CTA final ---------- */
.cta-band { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-5) var(--sp-25); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--sp-15); }
.cta-band h2 { font-size: var(--t-h2); font-weight: 500; letter-spacing: -0.01em; }
.cta-band p { color: var(--muted); max-width: 52ch; }
.cta-band .row { display: flex; gap: var(--sp-1); flex-wrap: wrap; justify-content: center; }

/* ---------- Registro: tarjetas de tipo de usuario ---------- */
.tipo-card {
  display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
  cursor: pointer; font-family: inherit; font-size: 15px; transition: border-color .15s, background .15s;
}
.tipo-card:hover { border-color: var(--primary); }
.tipo-card b { color: var(--on-surface); }

/* ---------- Favoritos / Comparar / vistas ---------- */
.card-fav {
  position: absolute; bottom: var(--sp-1); right: var(--sp-1); z-index: 3;
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--muted); padding: 0;
}
.card-fav:hover { color: var(--danger); }
.card-fav.activo { color: var(--danger); border-color: var(--danger); background: #FFF0F0; }
.card-compare { position: absolute; top: var(--sp-1); right: var(--sp-1); z-index: 3; width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.badge-compare-tag { position:absolute; top:4px; right:40px; background:var(--primary); color:#000; font-size:11px; padding:1px 6px; border-radius:var(--r-sm); z-index:3; display:none; }
.barra-comparar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  background: var(--surface); border-top: 1px solid var(--border); box-shadow: var(--shadow-raised);
  padding: 10px 20px; display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.toast {
  position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--on-surface); color: var(--surface); padding: 10px 18px; border-radius: var(--r-md);
  font-size: 14px; opacity: 0; transition: opacity .2s, transform .2s; z-index: 1000; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.vista-item { display:flex; gap:12px; align-items:center; padding:10px; border:1px solid var(--border); border-radius:var(--r-md); }
.vista-item img { width:64px; height:48px; object-fit:cover; border-radius:4px; }

/* ---------- Menú lateral de cuenta (estilo Zillow "My Zillow") ---------- */
.cuenta-menu {
  flex: 0 0 220px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
}
.cuenta-menu-titulo { padding: 14px 18px; font-weight: 600; border-bottom: 1px solid var(--border); }
.cuenta-menu-nav { display: flex; flex-direction: column; }
.cuenta-menu-nav a {
  padding: 11px 18px; font-size: 15px; color: var(--on-surface); text-decoration: none;
  border-bottom: 1px solid var(--border); transition: background .15s;
}
.cuenta-menu-nav a:hover { background: var(--accent-soft); }
.cuenta-menu-nav a.activo { background: var(--accent-soft); color: var(--primary-dark); font-weight: 600; border-left: 3px solid var(--primary); }
.cuenta-menu-nav a.activo:hover { background: var(--accent-soft); }
.cuenta-badge {
  display: inline-block; min-width: 18px; padding: 0 5px; text-align: center;
  background: var(--primary); color: #000; border-radius: 9px; font-size: 11px; font-weight: 700;
}
.cuenta-content { flex: 1 1 480px; min-width: 0; }
@media (max-width: 640px) { .cuenta-menu { flex-basis: 100%; } .cuenta-menu-nav { flex-direction: row; flex-wrap: wrap; } .cuenta-menu-nav a { border-right: 1px solid var(--border); border-bottom: none; } }
