/* ===== Aburrabienes · estilos ===== */
:root {
  --blue: #1d4ed8; --blue-600: #2563eb; --blue-700: #1e40af; --blue-900: #172554;
  --blue-50: #eff6ff; --blue-100: #dbeafe; --sky: #38bdf8;
  --yellow: #facc15; --orange: #f97316; --green: #16a34a; --wa: #25d366; --red: #dc2626; --purple: #7c3aed;
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e2e8f0; --bg: #f5f8ff; --card: #ffffff;
  --radius: 18px; --radius-sm: 12px; --shadow: 0 6px 24px rgba(29, 78, 216, .08); --shadow-lg: 0 18px 50px rgba(29, 78, 216, .18);
  --font: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; --font-head: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --header-h: 68px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); } h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); } h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .between { justify-content: space-between; }
.grow { flex: 1; } .mt { margin-top: 24px; } .mb { margin-bottom: 24px; } .mt-s { margin-top: 12px; }
.hide-mobile { } @media (max-width: 860px) { .hide-mobile { display: none !important; } }
.only-mobile { display: none; } @media (max-width: 860px) { .only-mobile { display: initial; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; font: 700 .95rem var(--font);
  padding: 11px 20px; border-radius: 999px; background: var(--blue-50); color: var(--blue); transition: transform .12s, box-shadow .2s, background .2s; white-space: nowrap; text-decoration: none !important; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: linear-gradient(135deg, var(--blue-600), var(--blue)); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .35); }
.btn-yellow { background: var(--yellow); color: var(--blue-900); box-shadow: 0 6px 18px rgba(250, 204, 21, .35); }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 6px 18px rgba(37, 211, 102, .35); }
.btn-ghost { background: transparent; color: var(--ink-2); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { background: #fee2e2; color: var(--red); }
.btn-sm { padding: 7px 14px; font-size: .85rem; } .btn-lg { padding: 15px 28px; font-size: 1.05rem; } .btn-block { width: 100%; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; background: #fff; border: 0; cursor: pointer; font-size: 1.15rem; box-shadow: var(--shadow); position: relative; }
.badge-dot { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--orange); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; font: 700 1.45rem var(--font-head); color: var(--blue); text-decoration: none !important; }
.logo img { height: 40px; width: auto; }
.logo span b { color: var(--sky); font-weight: 700; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a { padding: 8px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 700; font-size: .95rem; text-decoration: none; }
.main-nav a:hover, .main-nav a.active { background: var(--blue-50); color: var(--blue); }
.header-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.user-menu { position: relative; }
.user-menu > button { display: flex; align-items: center; gap: 8px; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; font: 700 .9rem var(--font); color: var(--ink); }
.user-menu .dropdown { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 230px; padding: 8px; }
.user-menu.open .dropdown { display: block; animation: pop .15s ease-out; }
.dropdown a, .dropdown button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--ink); font: 600 .95rem var(--font); background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none; }
.dropdown a:hover, .dropdown button:hover { background: var(--blue-50); }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--blue-100); display: inline-grid; place-items: center; font-weight: 800; color: var(--blue); flex: none; overflow: hidden; }
.avatar-lg { width: 96px; height: 96px; font-size: 2rem; border: 4px solid #fff; box-shadow: var(--shadow); }
.avatar-md { width: 56px; height: 56px; font-size: 1.3rem; }

/* Barra inferior (celular) */
.bottom-nav { display: none; }
@media (max-width: 860px) {
  :root { --header-h: 60px; }
  .main-nav { display: none; }
  .logo { font-size: 1.25rem; } .logo img { height: 34px; }
  body { padding-bottom: 76px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; background: #fff; border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(15, 23, 42, .06); }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .7rem; font-weight: 700; color: var(--muted); text-decoration: none; padding: 4px 0; position: relative; }
  .bottom-nav a .ico { font-size: 1.35rem; line-height: 1; transition: transform .15s; }
  .bottom-nav a.active { color: var(--blue); } .bottom-nav a.active .ico { transform: translateY(-2px) scale(1.12); }
  .bottom-nav .fab { margin-top: -26px; } .bottom-nav .fab .ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue-600), var(--blue)); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, .45); border: 4px solid #fff; font-size: 1.6rem; }
  .bottom-nav .badge-dot { top: -2px; right: calc(50% - 22px); }
}

/* ---------- Mensajes destacados ---------- */
.ticker { background: linear-gradient(90deg, var(--blue-900), var(--blue)); color: #fff; font-weight: 700; font-size: .92rem; overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; gap: 48px; padding: 9px 0; animation: ticker 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker a { color: #fff; } .ticker .yellow { color: var(--yellow); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- Flash ---------- */
.flash { margin: 16px auto 0; max-width: 1240px; padding: 0 16px; }
.flash div { padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px; animation: pop .25s; }
.flash .success { background: #dcfce7; color: #166534; } .flash .error { background: #fee2e2; color: #991b1b; } .flash .info { background: var(--blue-50); color: var(--blue-700); }
.flash button { background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: inherit; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; padding: 56px 0 90px; overflow: hidden;
  background: radial-gradient(1200px 500px at 85% -10%, rgba(56, 189, 248, .55), transparent 60%), linear-gradient(135deg, #1e3a8a 0%, var(--blue) 55%, #2563eb 100%); }
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 90px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath fill='%23f5f8ff' d='M0 60 L120 40 L210 55 L330 20 L450 50 L560 30 L690 58 L820 15 L950 45 L1080 25 L1200 55 L1320 35 L1440 50 V90 H0Z'/%3E%3C/svg%3E") bottom/100% 100% no-repeat; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 760px; }
.hero h1 .hl { color: var(--yellow); }
.hero p.lead { font-size: 1.15rem; opacity: .92; max-width: 620px; }
.hero-emoji { position: absolute; font-size: 3rem; opacity: .9; animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px) rotate(6deg); } }
@media (max-width: 860px) { .hero { padding: 32px 0 80px; } .hero-emoji { display: none; } }

.search-box { margin-top: 26px; background: #fff; border-radius: 24px; padding: 14px; box-shadow: var(--shadow-lg); color: var(--ink); max-width: 980px; position: relative; z-index: 2; }
.op-tabs { display: inline-flex; background: var(--blue-50); border-radius: 999px; padding: 4px; margin-bottom: 12px; }
.op-tabs label { cursor: pointer; } .op-tabs input { display: none; }
.op-tabs span { display: block; padding: 8px 20px; border-radius: 999px; font-weight: 800; color: var(--blue); }
.op-tabs input:checked + span { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .35); }
.search-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr auto; gap: 10px; }
@media (max-width: 860px) { .search-grid { grid-template-columns: 1fr 1fr; } .search-grid .btn { grid-column: 1 / -1; } }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label, .label { font-weight: 800; font-size: .88rem; color: var(--ink-2); }
.field .hint { font-size: .8rem; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; font: 600 .97rem var(--font); color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%231d4ed8' d='M6 8 0 0h12z'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 34px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
textarea { min-height: 130px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; } .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; } .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: 1fr 1fr; } }

/* Selector tipo "chips" */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 2px solid var(--line); font-weight: 700; font-size: .9rem; color: var(--ink-2); cursor: pointer; text-decoration: none !important; user-select: none; transition: all .12s; }
.chip:hover { border-color: var(--blue-600); color: var(--blue); }
.chip input { display: none; }
.chip.active, .chip:has(input:checked) { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .3); }
.chip-sm { padding: 5px 11px; font-size: .82rem; }
.stepper { display: flex; gap: 6px; } .stepper .chip { min-width: 44px; justify-content: center; }

/* ---------- Secciones ---------- */
.section { padding: 36px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; } .section-head p { margin: 4px 0 0; color: var(--muted); }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 16px; }

/* Zonas */
.zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.zone { position: relative; border-radius: var(--radius); padding: 18px; color: #fff; overflow: hidden; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none !important; transition: transform .15s, box-shadow .2s; }
.zone:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: var(--shadow-lg); }
.zone .e { font-size: 2.2rem; } .zone b { font: 600 1.2rem var(--font-head); } .zone small { opacity: .9; font-weight: 700; }
.zone::after { content: ''; position: absolute; right: -30px; bottom: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.zone.big { grid-column: span 2; } @media (max-width: 520px) { .zones { grid-template-columns: 1fr 1fr; } .zone.big { grid-column: span 2; } }

.mun-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Tipos */
.types { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.type { background: #fff; border-radius: var(--radius); padding: 16px 10px; text-align: center; box-shadow: var(--shadow); color: var(--ink); font-weight: 800; text-decoration: none !important; transition: transform .15s; }
.type:hover { transform: translateY(-4px); } .type .e { font-size: 2.2rem; display: block; margin-bottom: 6px; transition: transform .3s; } .type:hover .e { transform: scale(1.2) rotate(-8deg); }

/* ---------- Tarjetas de inmueble ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.l-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .18s, box-shadow .2s; position: relative; color: var(--ink); text-decoration: none !important; }
.l-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.l-card .ph { position: relative; aspect-ratio: 4/3; background: var(--blue-100); overflow: hidden; }
.l-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.l-card:hover .ph img { transform: scale(1.06); }
.l-card .tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.tag-featured { background: var(--yellow); color: var(--blue-900); } .tag-venta { background: var(--blue); color: #fff; } .tag-arriendo { background: var(--green); color: #fff; }
.tag-sold { background: var(--ink); color: #fff; } .tag-paused { background: var(--muted); color: #fff; }
.l-card .fav { position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); cursor: pointer; font-size: 1.1rem; display: grid; place-items: center; transition: transform .15s; }
.l-card .fav:hover { transform: scale(1.15); } .fav.on { animation: heart .4s; } @keyframes heart { 50% { transform: scale(1.4); } }
.l-card .count { position: absolute; bottom: 10px; right: 10px; background: rgba(15, 23, 42, .65); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.l-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.l-card .price { font: 700 1.3rem var(--font-head); color: var(--blue); }
.l-card .price small { font: 600 .8rem var(--font); color: var(--muted); }
.l-card h3 { font: 700 1rem var(--font); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.l-card .loc { color: var(--muted); font-size: .88rem; font-weight: 600; }
.feats { display: flex; gap: 12px; flex-wrap: wrap; font-size: .85rem; font-weight: 700; color: var(--ink-2); margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); }
.l-card .by { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); font-weight: 700; }
.l-card .by .avatar { width: 24px; height: 24px; font-size: .7rem; }
.l-card.featured { outline: 3px solid var(--yellow); }

/* Carrusel horizontal */
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 300px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px; scrollbar-width: thin; }
.scroller > * { scroll-snap-align: start; }

/* ---------- Listado con filtros ---------- */
.results-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; padding-top: 24px; padding-bottom: 40px; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; }
.filters h4 { font-size: .95rem; margin: 16px 0 8px; } .filters h4:first-of-type { margin-top: 0; }
.filters .field { margin-bottom: 10px; }
.filters-toggle { display: none; }
@media (max-width: 960px) {
  .results-layout { grid-template-columns: 1fr; }
  .filters { display: none; position: fixed; inset: 0; z-index: 1100; max-height: none; border-radius: 0; padding-bottom: 100px; }
  .filters.open { display: block; animation: slideup .2s ease-out; }
  .filters-toggle { display: inline-flex; }
  .filters .close-filters { display: inline-grid !important; }
}
@keyframes slideup { from { transform: translateY(30px); opacity: 0; } }
.close-filters { display: none !important; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.active-filters a { background: var(--blue-100); color: var(--blue-700); padding: 4px 10px; border-radius: 999px; font-size: .82rem; font-weight: 800; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #fff; font-weight: 800; box-shadow: var(--shadow); padding: 0 10px; }
.pagination .cur { background: var(--blue); color: #fff; }
.empty { text-align: center; padding: 50px 20px; }
.empty .big { font-size: 4rem; animation: float 4s ease-in-out infinite; display: inline-block; }

/* ---------- Detalle ---------- */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 8px; border-radius: var(--radius); overflow: hidden; margin: 20px 0; }
.gallery a { position: relative; display: block; background: var(--blue-100); overflow: hidden; }
.gallery a:first-child { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; } .gallery a:hover img { transform: scale(1.04); }
.gallery .more { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); color: #fff; display: grid; place-items: center; font: 700 1.3rem var(--font-head); }
.gallery.n1 { grid-template-columns: 1fr; } .gallery.n1 a:first-child { grid-row: span 2; }
.gallery.n2 { grid-template-columns: 2fr 1fr; } .gallery.n2 a:nth-child(2) { grid-row: span 2; }
.gallery.n3 { grid-template-columns: 2fr 1fr; }
@media (max-width: 760px) { .gallery, .gallery.n2 { grid-template-columns: 1fr; grid-template-rows: 280px; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 0; margin: 0 -16px 16px; }
  .gallery a { flex: 0 0 88%; height: 280px; scroll-snap-align: center; } .gallery .more { display: none; } }
.detail-layout { display: grid; grid-template-columns: 1fr 370px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-price { font: 700 2rem var(--font-head); color: var(--blue); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 18px 0; }
.fact { background: var(--blue-50); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.fact .e { font-size: 1.5rem; } .fact b { display: block; font: 700 1.15rem var(--font-head); } .fact small { color: var(--muted); font-weight: 700; }
.amenities { display: flex; flex-wrap: wrap; gap: 8px; }
.amenities span { background: #f0fdf4; color: #166534; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .88rem; }
.contact-card { position: sticky; top: calc(var(--header-h) + 16px); }
.contact-card .who { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.contact-card .stack { display: grid; gap: 10px; }
.mini-map { height: 300px; border-radius: var(--radius); overflow: hidden; z-index: 1; }
.description { white-space: pre-line; }
.sticky-cta { display: none; }
@media (max-width: 960px) {
  .contact-card { position: static; }
  .sticky-cta { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 70px; padding: 10px 12px; background: #fff; box-shadow: 0 -6px 20px rgba(0, 0, 0, .08); z-index: 900; }
  .sticky-cta .btn { flex: 1; }
}
.share { display: flex; gap: 8px; flex-wrap: wrap; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(2, 6, 23, .92); z-index: 2000; display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; } .lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 12px; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .15); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; }
.lightbox .lb-close { top: 16px; right: 16px; } .lightbox .lb-prev { left: 16px; } .lightbox .lb-next { right: 16px; }
.lightbox .lb-count { position: absolute; bottom: 20px; color: #fff; font-weight: 700; }

/* ---------- Mapa ---------- */
body.is-map { padding-bottom: 0; }
.map-page { position: relative; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); display: grid; grid-template-columns: 380px 1fr; }
.map-side { background: #fff; overflow-y: auto; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.map-side .head { padding: 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.map-list { padding: 12px; display: grid; gap: 10px; }
.map-item { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 8px; border-radius: 14px; cursor: pointer; color: var(--ink); text-decoration: none !important; border: 2px solid transparent; }
.map-item:hover, .map-item.hl { background: var(--blue-50); border-color: var(--blue-100); }
.map-item img { width: 96px; height: 76px; object-fit: cover; border-radius: 10px; }
.map-item b { color: var(--blue); font-family: var(--font-head); font-size: 1.05rem; }
.map-item .t { font-weight: 700; font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
#map { width: 100%; height: 100%; z-index: 1; }
.map-float { position: absolute; z-index: 500; display: flex; gap: 8px; flex-wrap: wrap; }
.map-float.top { top: 12px; left: 392px; right: 12px; }
.map-float .chip { box-shadow: var(--shadow); }
.price-pin { background: var(--blue); color: #fff; font: 800 .78rem var(--font); padding: 4px 9px; border-radius: 999px; white-space: nowrap; box-shadow: 0 3px 10px rgba(29, 78, 216, .45); border: 2px solid #fff; transform: translate(-50%, -100%); position: absolute; transition: transform .12s; }
.price-pin::after { content: ''; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--blue); }
.price-pin.arriendo { background: var(--green); } .price-pin.arriendo::after { border-top-color: var(--green); }
.price-pin.featured { background: var(--yellow); color: var(--blue-900); } .price-pin.featured::after { border-top-color: var(--yellow); }
.price-pin.hl, .price-pin:hover { transform: translate(-50%, -100%) scale(1.2); z-index: 1000; background: var(--orange); } .price-pin.hl::after { border-top-color: var(--orange); }
.agency-pin { width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 3px solid var(--purple); display: grid; place-items: center; font-size: 1.2rem; box-shadow: 0 4px 12px rgba(124, 58, 237, .4); overflow: hidden; transform: translate(-50%, -50%); position: absolute; }
.agency-pin img { width: 100%; height: 100%; object-fit: cover; }
.me-pin { width: 22px; height: 22px; border-radius: 50%; background: var(--blue-600); border: 4px solid #fff; box-shadow: 0 0 0 8px rgba(37, 99, 235, .25); transform: translate(-50%, -50%); position: absolute; animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 16px rgba(37, 99, 235, .08); } }
.leaflet-popup-content-wrapper { border-radius: 16px !important; padding: 0 !important; overflow: hidden; }
.leaflet-popup-content { margin: 0 !important; width: 240px !important; font-family: var(--font); }
.pop img { width: 100%; height: 130px; object-fit: cover; } .pop .in { padding: 10px 12px; } .pop b { color: var(--blue); font: 700 1.1rem var(--font-head); } .pop a { color: var(--ink); }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(37, 99, 235, .25) !important; }
.marker-cluster div { background: var(--blue) !important; color: #fff !important; font: 800 .85rem var(--font) !important; }
.legend { background: #fff; padding: 10px 12px; border-radius: 12px; box-shadow: var(--shadow); font-size: .8rem; font-weight: 700; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.map-toggle-list { display: none; }
@media (max-width: 860px) {
  .map-page { grid-template-columns: 1fr; height: calc(100dvh - var(--header-h) - 70px); }
  .map-side { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: 600; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .15); transition: height .25s; }
  .map-side.collapsed { height: 96px; } .map-side.expanded { height: 88%; }
  .map-side .grip { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 10px; }
  .map-float.top { left: 12px; }
  body.is-map { padding-bottom: 70px; }
}

/* ---------- Perfil ---------- */
.profile-cover { height: 240px; background: linear-gradient(135deg, #1e3a8a, var(--blue) 60%, var(--sky)); background-size: cover; background-position: center; position: relative; }
.profile-head { display: flex; gap: 20px; align-items: end; margin-top: -60px; position: relative; flex-wrap: wrap; }
.profile-head .avatar-lg { width: 128px; height: 128px; border-radius: 28px; font-size: 3rem; background: #fff; }
.profile-head h1 { margin: 0; } .profile-url { font-weight: 800; color: var(--blue); background: var(--blue-50); padding: 3px 10px; border-radius: 999px; font-size: .85rem; }
.verified { color: var(--blue-600); font-size: .9em; }
.profile-layout { display: grid; grid-template-columns: 320px 1fr; gap: 24px; margin-top: 24px; align-items: start; }
@media (max-width: 960px) { .profile-layout { grid-template-columns: 1fr; } .profile-cover { height: 160px; } .profile-head { margin-top: -50px; } .profile-head .avatar-lg { width: 100px; height: 100px; } }
.kv { display: grid; gap: 10px; } .kv div { display: flex; gap: 10px; align-items: start; font-weight: 600; } .kv .e { width: 22px; flex: none; text-align: center; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.stat { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.stat b { display: block; font: 700 1.7rem var(--font-head); color: var(--blue); } .stat span { color: var(--muted); font-weight: 700; font-size: .85rem; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.person { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; transition: transform .15s; }
.person:hover { transform: translateY(-3px); }
.dir-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; color: var(--ink); text-decoration: none !important; display: flex; flex-direction: column; transition: transform .15s; }
.dir-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dir-card .cv { height: 90px; background: linear-gradient(135deg, var(--blue), var(--sky)); background-size: cover; background-position: center; }
.dir-card .in { padding: 0 16px 16px; margin-top: -32px; } .dir-card .avatar { width: 64px; height: 64px; border-radius: 18px; border: 3px solid #fff; font-size: 1.5rem; background: #fff; }

/* ---------- Panel ---------- */
.dash { display: grid; grid-template-columns: 250px 1fr; gap: 24px; padding: 24px 16px 40px; align-items: start; }
.dash-nav { position: sticky; top: calc(var(--header-h) + 16px); padding: 10px; }
.dash-nav a { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 12px; color: var(--ink-2); font-weight: 700; text-decoration: none; }
.dash-nav a:hover { background: var(--blue-50); } .dash-nav a.active { background: var(--blue); color: #fff; }
@media (max-width: 860px) { .dash { grid-template-columns: 1fr; padding-top: 12px; } .dash-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; } .dash-nav a { white-space: nowrap; padding: 8px 12px; font-size: .9rem; } }
.table { width: 100%; border-collapse: collapse; } .table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: .92rem; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.my-listing { display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.my-listing img { width: 120px; height: 90px; object-fit: cover; border-radius: 12px; }
@media (max-width: 640px) { .my-listing { grid-template-columns: 90px 1fr; } .my-listing img { width: 90px; height: 70px; } .my-listing .actions { grid-column: 1 / -1; } }
.inline { display: inline; }

/* ---------- Publicar ---------- */
.steps { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; }
.steps a { flex: 1; min-width: 120px; display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); font-weight: 800; color: var(--ink-2); font-size: .88rem; text-decoration: none; }
.steps a span { width: 28px; height: 28px; border-radius: 50%; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; flex: none; }
.form-section { scroll-margin-top: calc(var(--header-h) + 20px); }
.type-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.type-picker label { cursor: pointer; } .type-picker input { display: none; }
.type-picker span { display: block; text-align: center; padding: 14px 8px; border-radius: 14px; border: 2px solid var(--line); background: #fff; font-weight: 800; font-size: .88rem; transition: all .12s; }
.type-picker span i { display: block; font-style: normal; font-size: 1.9rem; margin-bottom: 4px; }
.type-picker input:checked + span { border-color: var(--blue); background: var(--blue-50); color: var(--blue); transform: scale(1.03); }
.dropzone { border: 3px dashed var(--blue-100); border-radius: var(--radius); padding: 28px; text-align: center; background: var(--blue-50); cursor: pointer; transition: all .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #e0ebff; }
.dropzone .big { font-size: 2.6rem; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 12px; }
.thumbs figure { margin: 0; position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--blue-100); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs label { position: absolute; top: 4px; right: 4px; background: #fff; border-radius: 8px; padding: 2px 6px; font-size: .75rem; font-weight: 800; cursor: pointer; }
.thumbs figure:has(input:checked) img { opacity: .3; }
.thumbs .first { position: absolute; left: 4px; bottom: 4px; background: var(--yellow); color: var(--blue-900); font-size: .7rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; }
.pick-map { height: 320px; border-radius: var(--radius); overflow: hidden; z-index: 1; }
.wa-preview { display: flex; gap: 10px; align-items: center; background: #f0fdf4; padding: 10px 14px; border-radius: 12px; font-weight: 700; color: #166534; font-size: .9rem; }

/* ---------- Chat ---------- */
.chat-layout { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - var(--header-h) - 48px); height: calc(100dvh - var(--header-h) - 48px); margin: 24px auto; max-width: 1240px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.conv-list { border-right: 1px solid var(--line); overflow-y: auto; }
.conv-list h2 { padding: 18px 18px 10px; margin: 0; font-size: 1.3rem; }
.conv { display: flex; gap: 12px; padding: 12px 16px; color: var(--ink); text-decoration: none !important; border-left: 4px solid transparent; }
.conv:hover { background: var(--blue-50); } .conv.active { background: var(--blue-50); border-left-color: var(--blue); }
.conv .meta { flex: 1; min-width: 0; } .conv .meta b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .meta small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv .unread { background: var(--orange); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 800; padding: 1px 7px; height: fit-content; }
.chat-main { display: flex; flex-direction: column; min-height: 0; }
.chat-top { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-top .listing-chip { display: flex; gap: 8px; align-items: center; margin-left: auto; background: var(--blue-50); border-radius: 12px; padding: 6px 10px 6px 6px; font-size: .82rem; font-weight: 700; color: var(--ink); max-width: 280px; }
.chat-top .listing-chip img { width: 40px; height: 32px; border-radius: 8px; object-fit: cover; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(#f8fbff, #f1f6ff); }
.msg { max-width: 75%; padding: 10px 14px; border-radius: 18px; background: #fff; box-shadow: 0 2px 6px rgba(15, 23, 42, .06); align-self: flex-start; white-space: pre-wrap; word-wrap: break-word; animation: pop .2s; }
.msg.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 6px; } .msg.them { border-bottom-left-radius: 6px; }
.msg small { display: block; font-size: .7rem; opacity: .7; margin-top: 3px; font-weight: 700; }
.chat-form { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 46px; max-height: 140px; border-radius: 22px; resize: none; }
.chat-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; }
.quick-replies { display: flex; gap: 6px; padding: 0 12px; overflow-x: auto; }
.quick-replies .chip { white-space: nowrap; flex: none; }
@media (max-width: 860px) {
  .chat-layout { grid-template-columns: 1fr; margin: 0; border-radius: 0; height: calc(100dvh - var(--header-h) - 70px); }
  body.chat-open .conv-list { display: none; } body:not(.chat-open) .chat-main { display: none; }
}

/* ---------- Blog ---------- */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.post-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; display: flex; flex-direction: column; transition: transform .15s; }
.post-card:hover { transform: translateY(-4px); }
.post-card .ph { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--blue), var(--sky)); overflow: hidden; } .post-card img { width: 100%; height: 100%; object-fit: cover; }
.post-card .in { padding: 16px; } .post-card .cat { color: var(--orange); font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.post-card h3 { margin: 6px 0; }
.post-card.big { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; } .post-card.big .ph { aspect-ratio: auto; min-height: 280px; } .post-card.big h3 { font-size: 1.6rem; }
@media (max-width: 760px) { .post-card.big { grid-template-columns: 1fr; } .post-card.big .ph { min-height: 200px; } }
.article { max-width: 780px; margin: 0 auto; }
.article .cover { border-radius: var(--radius); width: 100%; max-height: 440px; object-fit: cover; margin: 18px 0; }
.article .content { font-size: 1.08rem; line-height: 1.75; } .article .content img { border-radius: 14px; margin: 16px 0; }
.article .content h2 { margin-top: 1.4em; } .article .content blockquote { border-left: 5px solid var(--blue); margin: 0; padding: 6px 18px; background: var(--blue-50); border-radius: 0 12px 12px 0; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 30px 16px; background: radial-gradient(800px 400px at 20% 0%, var(--blue-100), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 520px; }
.role-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.role-picker label { cursor: pointer; } .role-picker input { display: none; }
.role-picker span { display: block; text-align: center; padding: 14px 6px; border: 2px solid var(--line); border-radius: 14px; font-weight: 800; font-size: .85rem; transition: all .12s; }
.role-picker span i { display: block; font-size: 1.8rem; font-style: normal; }
.role-picker input:checked + span { border-color: var(--blue); background: var(--blue-50); color: var(--blue); }
.url-preview { font-size: .85rem; font-weight: 700; color: var(--muted); } .url-preview b { color: var(--blue); }

/* ---------- Alertas ---------- */
.alert-hero { background: linear-gradient(135deg, var(--orange), #fb923c 50%, var(--yellow)); color: #fff; border-radius: 24px; padding: 28px; position: relative; overflow: hidden; }
.alert-hero .bell { position: absolute; right: 20px; top: 10px; font-size: 5rem; animation: ring 2.5s ease-in-out infinite; transform-origin: top center; }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } }
.alert-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cta-band { background: linear-gradient(135deg, var(--blue-900), var(--blue)); color: #fff; border-radius: 24px; padding: 32px; display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-900); color: #cbd5e1; padding: 44px 0 30px; margin-top: 40px; }
.site-footer a { color: #e2e8f0; } .site-footer h4 { color: #fff; font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .92rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 950; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); display: grid; place-items: center; box-shadow: 0 8px 22px rgba(37, 211, 102, .5); color: #fff; font-size: 1.8rem; text-decoration: none !important; }
@media (max-width: 860px) { .wa-float { bottom: 86px; } }

.error-page { text-align: center; padding: 80px 16px; } .error-page .code { font: 700 5rem var(--font-head); color: var(--blue); }
.notice { background: var(--blue-50); border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 600; color: var(--blue-700); font-size: .92rem; }
.pill-status { padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.pill-status.active { background: #dcfce7; color: #166534; } .pill-status.paused { background: #f1f5f9; color: var(--muted); } .pill-status.sold { background: var(--ink); color: #fff; } .pill-status.pending { background: #fef9c3; color: #854d0e; }
