/* ABR Inmobiliaria · estilos compartidos */
:root{
  --red:#BA1E1E; --red-deep:#931616; --red-soft:#FCEEEE;
  --ink:#24262E; --muted:#6B6E78; --bg:#FFFFFF; --stone:#F5F5F7; --line:#E6E7EB;
  --night:#1F2230; --on-red:#FFFFFF; --ok:#1B7A43; --wa:#1F9D55;
  --r:18px; --shadow:0 12px 34px -14px rgba(31,34,48,.28); --shadow-s:0 4px 18px -6px rgba(31,34,48,.14);
  --wrap:min(1180px,100% - 2rem);
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --red:#E25050; --red-deep:#B52222; --red-soft:#3A1C1F;
    --ink:#EEEFF3; --muted:#A9ACB6; --bg:#14161D; --stone:#1C1F28; --line:#2E3240;
    --shadow:0 12px 34px -14px rgba(0,0,0,.8); --shadow-s:0 4px 18px -6px rgba(0,0,0,.6); color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --red:#E25050; --red-deep:#B52222; --red-soft:#3A1C1F;
  --ink:#EEEFF3; --muted:#A9ACB6; --bg:#14161D; --stone:#1C1F28; --line:#2E3240;
  --shadow:0 12px 34px -14px rgba(0,0,0,.8); --shadow-s:0 4px 18px -6px rgba(0,0,0,.6); color-scheme:dark;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:84px;-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font-family:"Nunito",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;font-size:1.0625rem;line-height:1.6;overflow-x:hidden}
img{max-width:100%;display:block}
a{color:inherit}
button{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--red);outline-offset:3px}
.wrap{width:var(--wrap);margin-inline:auto}
[hidden]{display:none!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;left:1rem;top:-4rem;z-index:99;background:var(--red);color:#fff;padding:.6rem 1rem;font-weight:700}
.skip:focus{top:1rem}
h1,h2,h3{line-height:1.12;letter-spacing:-.01em;margin:0;font-weight:800}
h2{font-size:clamp(1.7rem,3.2vw,2.35rem)}
.lead{color:var(--muted);max-width:58ch;margin:.6rem 0 0;font-size:1.08rem}
section{padding:clamp(3.5rem,7vw,5.5rem) 0}
.sec-head{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.2rem;margin-bottom:2.4rem}
.sec-head .lead{margin-inline:auto}

/* ---------- botones (píldora) ---------- */
.btn{--bg:var(--red);--fg:var(--on-red);display:inline-flex;align-items:center;justify-content:center;gap:.55rem;text-decoration:none;font-weight:800;font-size:1rem;line-height:1.2;padding:.85rem 1.7rem;border:0;border-radius:999px;background:var(--bg);color:var(--fg);cursor:pointer;transition:background-color .15s,color .15s,box-shadow .15s}
.btn:hover{--bg:var(--red-deep)}
.btn svg{width:1.15em;height:1.15em;flex:none}
.btn.ghost{--bg:transparent;--fg:var(--ink);box-shadow:inset 0 0 0 1.5px var(--line)}
.btn.ghost:hover{--bg:var(--stone);box-shadow:inset 0 0 0 1.5px var(--ink)}
.btn.wa{--bg:var(--wa);--fg:#fff}
.btn.wa:hover{--bg:#167A41}
.btn.light{--bg:#fff;--fg:#861111}
.btn.light:hover{--bg:#F6E1E0}
.btn.sm{padding:.6rem 1rem;font-size:.92rem}
.link{background:none;border:0;padding:0;color:var(--red);font-weight:800;text-decoration:none;cursor:pointer}
.link:hover{text-decoration:underline;text-underline-offset:3px}

/* ---------- header ---------- */
.top{position:sticky;top:0;z-index:40;background:color-mix(in srgb,var(--bg) 94%,transparent);backdrop-filter:saturate(1.4) blur(10px);-webkit-backdrop-filter:saturate(1.4) blur(10px);box-shadow:0 1px 0 var(--line)}
.bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;height:72px}
.logo{display:block;background:#fff;border-radius:10px;padding:.3rem .55rem;flex:none}
.logo img{height:34px;width:auto}
.nav{display:flex;align-items:center;gap:1.6rem}
.nav a:not(.btn):not(.acc){text-decoration:none;font-weight:700;font-size:.95rem;color:var(--ink);opacity:.85}
.nav a:not(.btn):not(.acc):hover{opacity:1;color:var(--red)}
.acc{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:var(--red);color:#fff;flex:none}
.acc svg{width:20px;height:20px}
.acc:hover{background:var(--red-deep)}
.menu-btn{display:none;background:none;border:0;padding:.5rem;cursor:pointer}
.menu-btn svg{width:28px;height:28px}
@media(max-width:900px){
  .menu-btn{display:block}
  .nav{position:fixed;inset:68px 0 auto 0;flex-direction:column;align-items:stretch;gap:0;background:var(--bg);border-bottom:1px solid var(--line);padding:.5rem 1rem 1.2rem;box-shadow:var(--shadow);transform:translateY(-8px);opacity:0;visibility:hidden;transition:opacity .18s,transform .18s,visibility .18s}
  .nav.open{opacity:1;transform:none;visibility:visible}
  .nav a:not(.btn):not(.acc){padding:.85rem 0;border-bottom:1px solid var(--line)}
  .nav .acc{width:auto;height:auto;border-radius:999px;padding:.7rem 1rem;margin-top:.6rem;grid-auto-flow:column;gap:.5rem;font-weight:800;text-decoration:none}
  .nav .acc span{display:inline!important}
  .nav .btn{margin-top:1rem}
}

/* ---------- formularios ---------- */
label{display:block;font-weight:700;font-size:.86rem}
.field{display:flex;flex-direction:column;gap:.3rem;min-width:0}
input,select,textarea{width:100%;font:inherit;font-size:1rem;color:var(--ink);background:var(--bg);border:1.5px solid var(--line);border-radius:12px;padding:.72rem .9rem;transition:border-color .15s}
input:hover,select:hover,textarea:hover{border-color:color-mix(in srgb,var(--ink) 35%,var(--line))}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--red);box-shadow:0 0 0 3px color-mix(in srgb,var(--red) 22%,transparent)}
select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23BA1E1E' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .7rem center;background-size:16px;padding-right:2.2rem}

/* ---------- tarjetas de propiedad ---------- */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:1.6rem 1.4rem}
.card{display:flex;flex-direction:column;text-decoration:none;color:inherit;background:var(--bg);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;box-shadow:var(--shadow-s);transition:box-shadow .2s,transform .2s}
.card:hover{box-shadow:var(--shadow);transform:translateY(-3px)}
.card .ph{position:relative;aspect-ratio:4/3;background:var(--stone);overflow:hidden}
.card .ph img{width:100%;height:100%;object-fit:cover;transition:transform .5s}
.card:hover .ph img{transform:scale(1.04)}
.card .ph .noimg{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted)}
.card .ph .noimg svg{width:56px;height:56px;opacity:.5}
.tag{position:absolute;left:12px;top:12px;background:var(--red);color:#fff;font-weight:800;font-size:.8rem;padding:.3rem .8rem;border-radius:999px;box-shadow:0 4px 12px -4px rgba(0,0,0,.4)}
.tag.rent{background:#fff;color:var(--night)}
.count{position:absolute;right:12px;bottom:12px;background:rgba(20,22,30,.65);color:#fff;font-size:.78rem;font-weight:700;padding:.2rem .6rem;border-radius:999px;display:flex;align-items:center;gap:.3rem}
.count svg{width:14px;height:14px}
.card .bd{padding:1.05rem 1.15rem 1.2rem;display:flex;flex-direction:column;gap:.35rem;flex:1}
.price{font-weight:900;font-size:1.4rem;line-height:1.15;color:var(--ink)}
.price small{font-size:.88rem;font-weight:700;color:var(--muted)}
.card h3{font-size:1.04rem;font-weight:700;letter-spacing:0;line-height:1.35}
.where{display:flex;align-items:center;gap:.35rem;color:var(--muted);font-size:.92rem}
.where svg{width:16px;height:16px;color:var(--red);flex:none}
.card .ex{display:none;margin:.2rem 0 0;color:var(--muted);font-size:.95rem;white-space:pre-line}
.card.feat .ex{display:block}
.specs{display:flex;flex-wrap:wrap;gap:.4rem 1.1rem;margin:auto 0 0;padding:.75rem 0 0;border-top:1px solid var(--line);list-style:none;font-size:.92rem;font-weight:600}
.specs li{display:flex;align-items:center;gap:.35rem}
.specs svg{width:18px;height:18px;color:var(--muted)}
.skel .ph,.skel .sk{background:linear-gradient(90deg,var(--stone) 30%,color-mix(in srgb,var(--stone) 60%,var(--line)) 50%,var(--stone) 70%) 0 0/300% 100%;animation:sk 1.3s linear infinite}
.skel .sk{height:1rem;border-radius:3px}
@keyframes sk{to{background-position:-150% 0}}
.empty{border:1.5px dashed var(--line);border-radius:var(--r);background:var(--stone);padding:2.5rem 1.5rem;text-align:center;color:var(--muted);grid-column:1/-1}
.empty strong{display:block;color:var(--ink);font-size:1.15rem;margin-bottom:.3rem}

/* ---------- footer ---------- */
.foot{background:var(--night);color:#C9CBD4;padding:4rem 0 2rem;font-size:.95rem}
:root[data-theme="dark"] .foot{background:#0E1016}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .foot{background:#0E1016}}
.foot .cols{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:2rem}
.foot h3{font-size:1.02rem;color:#fff;margin-bottom:.9rem}
.foot .social{display:flex;gap:.6rem;list-style:none;padding:0;margin:0}
.social a{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;box-shadow:inset 0 0 0 1.5px #4A4E60;color:#fff}
.social a:hover{background:var(--red);box-shadow:none;text-decoration:none}
.social svg{width:20px;height:20px}
.foot a{text-decoration:none}.foot a:hover{color:#fff;text-decoration:underline}
.foot ul{list-style:none;padding:0;margin:0;display:grid;gap:.45rem}
.foot .legal{margin-top:2.8rem;padding-top:1.4rem;border-top:1px solid #33374A;display:flex;flex-wrap:wrap;justify-content:space-between;gap:.6rem;color:#8E92A2;font-size:.85rem}
.foot .legal a{color:#8E92A2}
.foot .legal .dev{color:#C9CBD4;text-decoration:none}
.foot .legal .dev b{color:#fff;letter-spacing:.04em}
.foot .legal .dev:hover{color:#fff;text-decoration:underline}
@media(max-width:900px){.foot .cols{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.foot .cols{grid-template-columns:1fr}}

/* ---------- chat ---------- */
.fab{position:fixed;right:1rem;bottom:calc(1rem + env(safe-area-inset-bottom,0px));z-index:50;display:flex;flex-direction:column;align-items:flex-end;gap:.6rem}
.fab-btn{display:flex;align-items:center;gap:.55rem;border:0;cursor:pointer;font-weight:800;color:#fff;background:var(--red);padding:.85rem 1.25rem .85rem 1rem;border-radius:999px;box-shadow:0 10px 26px -8px rgba(120,10,10,.6);transition:transform .15s,background-color .15s}
.fab-btn:hover{background:var(--red-deep);transform:translateY(-2px)}
.fab-btn svg{width:24px;height:24px}
.fab-wa{width:54px;height:54px;border-radius:50%;background:var(--wa);display:grid;place-items:center;color:#fff;box-shadow:0 10px 26px -8px rgba(10,80,40,.6)}
.fab-wa svg{width:28px;height:28px}
.fab-wa:hover{background:#167A41}
.dot{position:absolute;top:-2px;right:-2px;width:14px;height:14px;border-radius:50%;background:#FFC23D;border:2px solid #fff}
.fab-btn{position:relative}
.badge{position:absolute;top:-6px;right:-4px;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#FFC23D;color:#1F2230;font-size:.75rem;font-weight:900;display:grid;place-items:center;border:2px solid #fff;animation:pop .3s}
@keyframes pop{from{transform:scale(.4)}}
#chat{position:fixed;right:1rem;bottom:calc(5.4rem + env(safe-area-inset-bottom,0px));z-index:60;width:min(390px,calc(100vw - 2rem));height:min(600px,calc(100dvh - 7.5rem));display:flex;flex-direction:column;background:var(--bg);border:1px solid var(--line);border-radius:22px;box-shadow:0 30px 60px -20px rgba(0,0,0,.45);overflow:hidden;transform-origin:bottom right;transition:opacity .18s,transform .18s}
#chat[hidden]{display:flex!important;opacity:0;transform:scale(.94) translateY(8px);pointer-events:none;visibility:hidden}
.ch-head{display:flex;align-items:center;gap:.75rem;padding:.85rem 1rem;background:var(--red);color:#fff}
.ch-av{width:40px;height:40px;border-radius:50%;background:#fff;display:grid;place-items:center;flex:none;overflow:hidden}
.ch-av img{width:34px}
.ch-head strong{display:block;line-height:1.2}
.ch-head small{opacity:.9;font-size:.82rem;display:flex;align-items:center;gap:.35rem}
.ch-head small::before{content:"";width:8px;height:8px;border-radius:50%;background:#6EE7A0}
.ch-x{margin-left:auto;background:none;border:0;color:#fff;cursor:pointer;padding:.3rem;border-radius:4px}
.ch-x svg{width:22px;height:22px;display:block}
.ch-log{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.55rem;background:var(--stone);overscroll-behavior:contain}
.msg{max-width:84%;padding:.6rem .85rem;font-size:.95rem;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:14px}
.msg.v{align-self:flex-end;background:var(--red);color:#fff;border-bottom-right-radius:4px}
.msg.a,.msg.g{align-self:flex-start;background:var(--bg);border:1px solid var(--line);border-bottom-left-radius:4px}
.msg.g::before{content:"Asesor de ABR";display:block;font-size:.75rem;font-weight:700;color:var(--red);margin-bottom:.15rem}
.msg a{color:inherit;font-weight:700;text-decoration:underline;text-underline-offset:2px}
.msg.a a,.msg.g a{color:var(--red)}
.typing{display:flex;gap:4px;padding:.8rem .9rem}
.typing i{width:7px;height:7px;border-radius:50%;background:var(--muted);animation:bl 1s infinite}
.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}
@keyframes bl{0%,60%,100%{opacity:.25;transform:none}30%{opacity:1;transform:translateY(-3px)}}
.mailask{align-self:stretch;background:var(--bg);border:1.5px dashed var(--red);border-radius:14px;padding:.7rem .8rem;margin-top:.3rem}
.mailask label{font-size:.85rem;margin-bottom:.4rem;display:block}
.mailask div{display:flex;gap:.4rem}
.mailask input{padding:.5rem .7rem;border-radius:999px;font-size:.9rem}
.mailask button{flex:none;border:0;border-radius:999px;background:var(--red);color:#fff;font-weight:800;padding:0 .9rem;cursor:pointer}
.quick{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.2rem}
.quick button{border:1.5px solid var(--red);background:var(--bg);color:var(--red);font-weight:600;font-size:.86rem;padding:.35rem .75rem;border-radius:999px;cursor:pointer}
.quick button:hover{background:var(--red);color:#fff}
.ch-form{display:flex;gap:.5rem;padding:.75rem;border-top:1px solid var(--line);background:var(--bg)}
.ch-form input{border-radius:999px;padding:.65rem 1rem}
.ch-send{flex:none;width:44px;height:44px;border-radius:50%;border:0;background:var(--red);color:#fff;display:grid;place-items:center;cursor:pointer}
.ch-send svg{width:20px;height:20px}
.ch-foot{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.4rem;padding:0 .9rem .75rem;font-size:.83rem;color:var(--muted);background:var(--bg)}
.ch-foot button,.ch-foot a{background:none;border:0;padding:0;font-weight:700;color:var(--red);cursor:pointer;text-decoration:none;font-size:.83rem}
.ch-foot a.wa{color:var(--wa)}
@media(max-width:520px){
  #chat{right:0;left:0;bottom:0;width:100%;height:100dvh;border-radius:0;border:0}
  .fab-btn span{display:none}.fab-btn{padding:.9rem}
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}
