/* ==========================================================================
   MADU Estates — public stylesheet (v2)
   Minimal. Light-locked. Manrope. Rectangular wordmark.
   ========================================================================== */
:root{
  --blue:#1400FF;--blue-deep:#0E00C2;--blue-tint:#ECEBFF;
  --ink:#0B0B0F;--ink-2:#2A2B31;--muted:#6A6E78;
  --line:#E9EAEE;--mist:#F6F7F9;--paper:#FFFFFF;
  --radius:14px;--radius-sm:10px;--maxw:1240px;
  --font:'Manrope',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --shadow:0 1px 2px rgba(11,11,15,.04),0 8px 24px rgba(11,11,15,.06);
  --shadow-lift:0 2px 4px rgba(11,11,15,.05),0 18px 40px rgba(11,11,15,.12);
  color-scheme:light only;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;color-scheme:light only;background:#fff !important}
body{
  margin:0;font-family:var(--font);color:var(--ink);background:#fff !important;
  font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
.appbg{background:#fff;min-height:100vh}
img{max-width:100%;display:block}
svg{width:18px;height:18px;flex:none}
a{color:inherit;text-decoration:none}
button{font-family:inherit}
h1,h2,h3,h4{font-family:var(--font);font-weight:800;letter-spacing:-.02em;line-height:1.08;margin:0;color:var(--ink)}
p{margin:0}
.num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 24px}
.eyebrow{font-weight:600;font-size:.72rem;letter-spacing:.18em;text-transform:uppercase;color:var(--blue)}
.muted{color:var(--muted)}
.hidden{display:none !important}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.85rem 1.4rem;border-radius:999px;font-weight:600;font-size:.95rem;border:1px solid transparent;cursor:pointer;transition:transform .15s ease,background .15s ease,color .15s,border-color .15s;white-space:nowrap}
.btn-primary{background:var(--blue);color:#fff}
.btn-primary:hover{background:var(--blue-deep);transform:translateY(-1px)}
.btn-outline{background:transparent;color:var(--ink);border-color:var(--ink)}
.btn-outline:hover{background:var(--ink);color:#fff}
.btn-ghost{background:var(--mist);color:var(--ink)}
.btn-ghost:hover{background:#ececf0}
.btn-block{width:100%}

/* ---------- rectangular wordmark logo ---------- */
.logo{display:inline-flex;flex-direction:column;justify-content:center;align-items:center;background:var(--blue);color:#fff;border-radius:5px;padding:7px 16px 8px;line-height:1;transition:background .15s}
.logo:hover{background:var(--blue-deep)}
.logo .l1{font-weight:600;font-size:1.05rem;letter-spacing:.22em;padding-left:.22em}
.logo .l2{font-weight:300;font-size:.5rem;letter-spacing:.42em;margin-top:4px;opacity:.92;padding-left:.42em}

/* ---------- top nav (brand blue) ---------- */
.nav{position:sticky;top:0;z-index:50;background:var(--blue);box-shadow:0 4px 20px rgba(20,0,255,.22)}
.nav-inner{display:flex;align-items:center;justify-content:space-between;height:74px;gap:16px}
.nav .logo{background:transparent;padding:0}
.nav .logo:hover{background:transparent}
.nav-right{display:flex;align-items:center;gap:14px}
.lang-toggle{display:inline-flex;align-items:center;gap:7px;font-size:.82rem;font-weight:600;color:rgba(255,255,255,.72)}
.lang-toggle a{color:rgba(255,255,255,.72);transition:color .15s;padding:2px 1px}
.lang-toggle a.on{color:#fff}
.lang-toggle a:hover{color:#fff}
.lang-toggle .sep{color:rgba(255,255,255,.4)}
.menu-btn{display:inline-flex;align-items:center;gap:.5rem;background:transparent;border:1px solid rgba(255,255,255,.45);border-radius:999px;padding:.55rem .95rem;font-weight:600;font-size:.9rem;color:#fff;cursor:pointer;transition:.15s}
.menu-btn:hover{border-color:#fff;background:#fff;color:var(--blue)}
.menu-btn svg{width:18px;height:18px}

/* ---------- slide-down menu ---------- */
.menu-overlay{position:fixed;inset:0;z-index:90;background:rgba(11,11,15,.5);backdrop-filter:blur(4px);animation:fade .2s ease}
.menu-overlay[hidden]{display:none}
.menu-panel{position:relative;background:var(--paper);padding:60px 24px 36px;max-width:var(--maxw);margin:0 auto;border-bottom-left-radius:18px;border-bottom-right-radius:18px;animation:slideDown .26s cubic-bezier(.2,.7,.3,1)}
.menu-close{position:absolute;top:20px;right:22px;width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:#fff;cursor:pointer;display:grid;place-items:center}
.menu-close svg{width:20px;height:20px}
.menu-links{display:flex;flex-direction:column;gap:2px;max-width:520px;margin:0 auto}
.menu-links a{font-weight:700;font-size:clamp(1.35rem,3vw,1.8rem);letter-spacing:-.01em;color:var(--ink);padding:.35rem 0;border-bottom:1px solid var(--line);transition:color .15s,padding-left .15s}
.menu-links a:hover,.menu-links a.cur{color:var(--blue);padding-left:8px}
.menu-foot{display:flex;flex-wrap:wrap;gap:10px 28px;max-width:560px;margin:26px auto 0;color:var(--muted);font-weight:500;font-size:.95rem}
.menu-foot a{display:inline-flex;align-items:center;gap:.5rem;color:var(--ink-2)}
.menu-foot a:hover{color:var(--blue)}
.menu-foot svg{width:17px;height:17px}
@keyframes slideDown{from{transform:translateY(-12px);opacity:.6}to{transform:translateY(0);opacity:1}}
@keyframes fade{from{opacity:0}to{opacity:1}}

/* ---------- listings page (home) ---------- */
.listings{padding:34px 0 84px}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:22px;flex-wrap:wrap}
.filter-btn{display:inline-flex;align-items:center;gap:.55rem;background:var(--ink);color:#fff;border:1px solid var(--ink);border-radius:999px;padding:.65rem 1.25rem;font-weight:600;font-size:.92rem;cursor:pointer;transition:.15s}
.filter-btn:hover{background:#000}
.filter-btn svg{width:17px;height:17px}
.filter-btn.active{background:var(--blue);border-color:var(--blue)}
.toolbar-right{display:flex;align-items:center;gap:16px}
.results-count{font-size:.92rem;color:var(--muted)}
.results-count b{color:var(--ink);font-weight:700}
.col-toggle{display:inline-flex;background:var(--mist);border-radius:999px;padding:4px;gap:4px}
.col-toggle button{border:0;background:transparent;width:40px;height:34px;border-radius:999px;display:grid;place-items:center;cursor:pointer;color:var(--muted);transition:.15s}
.col-toggle button.active{background:var(--paper);color:var(--blue);box-shadow:var(--shadow)}
.col-toggle svg{width:16px;height:16px}

/* collapsible filters */
.filters{border:1px solid var(--line);border-radius:var(--radius);padding:18px;margin-bottom:26px;background:var(--paper);box-shadow:var(--shadow)}
.filters[hidden]{display:none}
.filter-grid{display:grid;grid-template-columns:repeat(5,1fr) auto;gap:12px;align-items:end}
.filter-actions{display:flex;gap:8px}
.dual{display:flex;gap:8px;align-items:center}
.dual input{width:100%;min-width:0}
.field label{display:block;font-size:.72rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin-bottom:6px}
.field select,.field input{width:100%;padding:.74rem .9rem;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper);font-family:inherit;font-size:16px;color:var(--ink);appearance:none;transition:border-color .15s,box-shadow .15s}
.field select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236A6E78' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .9rem center;padding-right:2.2rem}
.field input:focus,.field select:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-tint)}
.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}

/* ---------- property grid + cards ---------- */
.grid{display:grid;gap:22px;grid-template-columns:1fr}
@media(min-width:700px){.grid:not([data-cols]){grid-template-columns:repeat(2,1fr)}}
.grid[data-cols="1"]{grid-template-columns:1fr}
.grid[data-cols="2"]{grid-template-columns:repeat(2,1fr)}
.card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease,border-color .2s}
.card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lift);border-color:transparent}
.card-media{position:relative;aspect-ratio:1/1;overflow:hidden;background:var(--mist);display:block}
.card-media img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.card:hover .card-media img{transform:scale(1.05)}
.card-badges{position:absolute;top:12px;left:12px;right:54px;display:flex;gap:6px;flex-wrap:wrap}
.badge{display:inline-flex;align-items:center;justify-content:center;line-height:1;font-size:.74rem;font-weight:700;letter-spacing:.02em;padding:.34rem .66rem;border-radius:999px;backdrop-filter:blur(4px)}
.badge-excl{background:var(--blue);color:#fff}
.badge-txn{background:rgba(11,11,15,.78);color:#fff;text-transform:uppercase;font-size:.64rem;letter-spacing:.03em}
.badge-status{position:absolute;bottom:12px;left:12px;background:rgba(255,255,255,.94);color:var(--ink);font-size:.68rem;font-weight:700;padding:.32rem .6rem;border-radius:999px;z-index:2}
.badge-status.rezervat{background:#FFF2D6;color:#8A5800}
.badge-status.vandut{background:#0B0B0F;color:#fff}
.card-body{padding:18px 18px 20px;display:flex;flex-direction:column;gap:10px;flex:1}
.card-price{font-weight:800;font-size:1.5rem;letter-spacing:-.02em;color:var(--ink)}
.card-price .per{font-size:.82rem;font-weight:600;color:var(--muted);letter-spacing:0}
.card-title{font-weight:600;font-size:1.02rem;line-height:1.3;color:var(--ink)}
.card-zone{display:flex;align-items:center;gap:.4rem;color:var(--muted);font-size:.9rem;margin-top:-2px}
.card-zone svg{width:14px;height:14px;flex:none}
.card-specs{display:flex;gap:.9rem;flex-wrap:wrap;margin-top:auto;padding-top:12px;border-top:1px solid var(--line);color:var(--ink-2);font-size:.86rem}
.card-specs span{display:flex;align-items:center;gap:.35rem;font-variant-numeric:tabular-nums}
.card-specs svg{width:15px;height:15px;color:var(--muted)}
.empty-state{text-align:center;padding:70px 20px;border:1px dashed var(--line);border-radius:var(--radius);color:var(--muted)}
.empty-state h3{font-size:1.3rem;margin-bottom:8px;color:var(--ink)}

/* ---------- secondary pages (about / contact) ---------- */
.page{padding:48px 0 90px}
.page-head{max-width:640px;margin-bottom:40px}
.page-head h1{font-size:clamp(2rem,5vw,3rem);margin-top:12px}
.page-lead{margin-top:14px;color:var(--ink-2);font-size:1.1rem}
.about-grid{display:grid;grid-template-columns:.9fr 1.1fr;gap:60px;align-items:center}
.about-grid h1{font-size:clamp(2rem,5vw,3rem);max-width:16ch;margin:12px 0 18px}
.about-grid p{color:var(--ink-2);font-size:1.08rem;margin-bottom:1.1rem;line-height:1.65}
.about-media{aspect-ratio:5/6;border-radius:var(--radius);overflow:hidden;background:var(--mist);border:1px solid var(--line)}
.about-media img{width:100%;height:100%;object-fit:cover}

/* ---------- contact ---------- */
.contact-grid{display:grid;grid-template-columns:1fr 1fr;gap:56px}
.contact-info{display:flex;flex-direction:column;gap:4px}
.contact-row{display:flex;align-items:center;gap:16px;padding:18px 0;border-bottom:1px solid var(--line)}
.contact-row:last-child{border-bottom:0}
.contact-row .ic{width:44px;height:44px;border-radius:50%;background:var(--blue-tint);color:var(--blue);display:grid;place-items:center;flex:none}
.contact-row .ic svg{width:20px;height:20px}
.contact-row .k{font-size:.78rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.contact-row .v{font-size:1.05rem;font-weight:600;color:var(--ink)}
.contact-form{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:28px;box-shadow:var(--shadow)}
.contact-form .field{margin-bottom:14px}
textarea{width:100%;padding:.8rem .9rem;border:1px solid var(--line);border-radius:var(--radius-sm);font-family:inherit;font-size:16px;line-height:1.5;resize:vertical;min-height:140px;background:var(--paper);color:var(--ink)}
textarea:focus{outline:none;border-color:var(--blue);box-shadow:0 0 0 3px var(--blue-tint)}
.form-note{font-size:.84rem;color:var(--muted);margin-top:10px}
.flash{padding:.85rem 1rem;border-radius:var(--radius-sm);font-size:.92rem;margin-bottom:16px}
.flash-ok{background:#E6F7EC;color:#1A7A3E;border:1px solid #BFE8CC}
.flash-err{background:#FDEAEA;color:#B42323;border:1px solid #F4C9C9}

/* ---------- footer (brand blue) ---------- */
.footer{background:var(--blue);color:rgba(255,255,255,.85)}
.footer .wrap{padding:60px 24px 32px}
.footer .logo{background:transparent;padding:0}
.footer .logo:hover{background:transparent}
.footer-top{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:40px;padding-bottom:38px;border-bottom:1px solid rgba(255,255,255,.22)}
.logo-light{margin-bottom:4px}
.footer-blurb{margin-top:16px;max-width:34ch;font-size:.95rem;line-height:1.6;color:rgba(255,255,255,.82)}
.footer h4{color:#fff;font-size:.8rem;letter-spacing:.1em;text-transform:uppercase;font-weight:700;margin-bottom:16px}
.footer-col a{display:block;padding:6px 0;font-size:.95rem;color:rgba(255,255,255,.85);transition:color .15s}
.footer-col a:hover{color:#fff}
.footer-bottom{display:flex;align-items:center;justify-content:space-between;padding-top:24px;font-size:.85rem;gap:16px;flex-wrap:wrap;color:rgba(255,255,255,.78)}
.footer-bottom a{color:rgba(255,255,255,.78)}
.footer-bottom a:hover{color:#fff}

/* negotiable price tag */
.neg-tag{display:inline-block;vertical-align:middle;margin-left:.5rem;font-size:.6rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--blue);background:var(--blue-tint);padding:.28rem .55rem;border-radius:999px}
.detail-price .neg-tag{font-size:.68rem;margin-left:.6rem;transform:translateY(-2px)}

/* ---------- property detail ---------- */
.detail{padding:28px 0 0}
.back-link{display:inline-flex;align-items:center;gap:.4rem;color:var(--muted);font-size:.92rem;font-weight:500;margin-bottom:22px}
.back-link:hover{color:var(--blue)}
.back-link svg{width:18px;height:18px}
.detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;flex-wrap:wrap;margin-bottom:24px}
.detail-head h1{font-size:clamp(1.8rem,3.6vw,2.6rem);max-width:20ch}
.detail-zone{display:flex;align-items:center;gap:.4rem;color:var(--muted);margin-top:10px;font-size:1rem}
.detail-zone svg{width:16px;height:16px}
.detail-price{font-weight:800;font-size:clamp(1.8rem,3.6vw,2.6rem);color:var(--blue);white-space:nowrap}
.detail-price .per{font-size:.95rem;color:var(--muted);font-weight:600}
.gallery{display:grid;grid-template-columns:2fr 1fr;gap:14px;margin-bottom:36px}
.gallery-main{aspect-ratio:16/10;border-radius:var(--radius);overflow:hidden;background:var(--mist);border:1px solid var(--line)}
.gallery-main img{width:100%;height:100%;object-fit:cover}
.gallery-side{display:grid;grid-template-rows:1fr 1fr;gap:14px}
.gallery-side .g{border-radius:var(--radius);overflow:hidden;background:var(--mist);border:1px solid var(--line)}
.gallery-side .g img{width:100%;height:100%;object-fit:cover}
.detail-body{display:grid;grid-template-columns:1.5fr .9fr;gap:48px;padding-bottom:80px}
.spec-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--line);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;margin:0 0 24px}
.spec-grid .cell{background:var(--paper);padding:18px 20px}
.spec-grid .k{font-size:.74rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:6px}
.spec-grid .v{font-size:1.1rem;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums}
.detail-desc h3{font-size:1.3rem;margin:8px 0 12px}
.detail-desc p{color:var(--ink-2);line-height:1.7;white-space:pre-line}
.detail-aside{position:sticky;top:96px;align-self:start}
.aside-card{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);padding:26px;box-shadow:var(--shadow)}
.aside-card h3{font-size:1.2rem;margin-bottom:6px}
.aside-card .agent{display:flex;align-items:center;gap:14px;margin:18px 0;padding-bottom:18px;border-bottom:1px solid var(--line)}
.aside-card .agent .av{width:48px;height:48px;border-radius:50%;background:var(--blue);color:#fff;display:grid;place-items:center;font-weight:700}
.aside-card .agent .nm{font-weight:600}
.aside-card .agent .rl{font-size:.85rem;color:var(--muted)}
.aside-card .field{margin-bottom:12px}
.aside-actions{display:flex;flex-direction:column;gap:10px;margin-top:6px}

/* ---------- responsive ---------- */
@media (max-width:1080px){
  .about-grid{grid-template-columns:1fr;gap:32px}
  .about-media{aspect-ratio:16/10;order:-1}
  .filter-grid{grid-template-columns:repeat(3,1fr)}
  .filter-actions{grid-column:span 3}
  .filter-actions .btn{flex:1}
  .detail-body{grid-template-columns:1fr;gap:32px}
  .detail-aside{position:static}
}
@media (max-width:860px){
  .contact-grid{grid-template-columns:1fr;gap:30px}
  .footer-top{grid-template-columns:1fr;gap:28px}
  .gallery{grid-template-columns:1fr}
  .gallery-side{grid-template-columns:1fr 1fr;grid-template-rows:none}
}
@media (max-width:640px){
  .wrap{padding:0 18px}
  .listings{padding:24px 0 60px}
  .page{padding:32px 0 64px}
  .filter-grid{grid-template-columns:1fr 1fr}
  .filter-actions{grid-column:span 2}
  .menu-panel{padding:74px 18px 34px}
  /* the 1/2 column toggle stays active on phones */
}
@media (prefers-reduced-motion:reduce){*{transition:none !important;animation:none !important}}
:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:4px}

/* ===== imobiliare.ro-style gallery + lightbox ===== */
.gallery2{position:relative;border-radius:var(--radius);overflow:hidden;background:var(--mist);border:1px solid var(--line);margin-bottom:12px}
.gstage{aspect-ratio:3/2;max-height:62vh;position:relative;background:#1b1d23}
.gstage img{width:100%;height:100%;object-fit:contain;cursor:zoom-in;display:block}
.gcount{position:absolute;right:12px;bottom:12px;background:rgba(11,11,15,.7);color:#fff;font-size:.8rem;font-weight:600;padding:.3rem .7rem;border-radius:999px}
.gnav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:44px;height:44px;border-radius:50%;border:0;background:rgba(255,255,255,.92);color:var(--ink);font-size:1.4rem;line-height:1;display:grid;place-items:center;cursor:pointer;box-shadow:var(--shadow)}
.gnav:hover{background:#fff}
.gnav svg{width:20px;height:20px}
.gprev{left:12px}.gnext{right:12px}
.gthumbs{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px;margin-bottom:20px;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.gthumb{flex:0 0 auto;width:82px;height:60px;border-radius:8px;overflow:hidden;border:2px solid transparent;background:var(--mist);padding:0;cursor:pointer}
.gthumb img{width:100%;height:100%;object-fit:cover}
.gthumb.active{border-color:var(--blue)}
.lightbox{position:fixed;inset:0;z-index:200;background:rgba(11,11,15,.95);display:grid;place-items:center}
.lightbox[hidden]{display:none}
.lightbox img{max-width:92vw;max-height:84vh;object-fit:contain;border-radius:6px}
.lb-close{position:absolute;top:18px;right:18px;width:46px;height:46px;border-radius:50%;border:0;background:rgba(255,255,255,.15);color:#fff;font-size:1.5rem;cursor:pointer;display:grid;place-items:center}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);width:54px;height:54px;border-radius:50%;border:0;background:rgba(255,255,255,.15);color:#fff;cursor:pointer;display:grid;place-items:center}
.lb-nav svg,.lb-close svg{width:24px;height:24px}
.lb-nav:hover,.lb-close:hover{background:rgba(255,255,255,.28)}
.lb-prev{left:18px}.lb-next{right:18px}
.lb-count{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);color:#fff;font-size:.9rem;background:rgba(255,255,255,.14);padding:.35rem .8rem;border-radius:999px}
@media(max-width:640px){.gnav{width:38px;height:38px}.gthumb{width:72px;height:54px}.lb-nav{width:44px;height:44px}}


/* ===== WhatsApp button ===== */
.btn-wa{background:#25D366;color:#fff}
.btn-wa:hover{background:#1ebe5b}
.contact-row .ic-wa{background:#dcf8e8;color:#1ebe5b}

/* ===== mortgage calculator ===== */
.calc{margin-top:28px;border:1px solid var(--line);border-radius:var(--radius);padding:24px;background:var(--mist)}
.calc h3{display:flex;align-items:center;gap:.5rem;font-size:1.15rem;margin-bottom:18px}
.calc h3 svg{width:20px;height:20px;color:var(--blue)}
.calc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}
.calc-field label{display:block;font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:6px}
.calc-in{display:flex;align-items:center;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--paper);overflow:hidden}
.calc-in input{flex:1;min-width:0;border:0;padding:.7rem .8rem;font-family:inherit;font-size:16px;color:var(--ink);background:transparent}
.calc-in input:focus{outline:none}
.calc-in span{padding:0 .8rem;color:var(--muted);font-size:.9rem;font-weight:600;border-left:1px solid var(--line);align-self:stretch;display:flex;align-items:center}
.calc-out{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius-sm);overflow:hidden}
.calc-out .row{display:flex;align-items:center;justify-content:space-between;padding:12px 16px}
.calc-out .row+.row{border-top:1px solid var(--line)}
.calc-out .cl{color:var(--muted);font-size:.92rem}
.calc-out .cv{font-weight:700;font-variant-numeric:tabular-nums}
.calc-out .big{background:var(--blue-tint)}
.calc-out .big .cl{color:var(--blue);font-weight:600}
.calc-out .big .cv{color:var(--blue);font-size:1.35rem}
.calc-note{font-size:.8rem;color:var(--muted);margin-top:12px;line-height:1.5}

/* ===== area map ===== */
.map-wrap{margin-top:28px}
.map-wrap h3{display:flex;align-items:center;gap:.5rem;font-size:1.15rem;margin-bottom:14px}
.map-wrap h3 svg{width:20px;height:20px;color:var(--blue)}
.map-embed{aspect-ratio:16/9;border-radius:var(--radius);overflow:hidden;border:1px solid var(--line);background:var(--mist)}
.map-embed iframe{width:100%;height:100%;border:0;display:block}
@media(max-width:520px){.calc-grid{grid-template-columns:1fr}}

/* ===== price per m² ===== */
.card-price .ppsqm{display:inline-block;margin-left:8px;font-size:.72rem;font-weight:600;color:var(--muted);vertical-align:middle}
.card-price .ppsqm::before{content:'·';margin-right:8px;color:var(--line)}

/* ===== energy class pill ===== */
.energy-pill{display:inline-flex;align-items:center;justify-content:center;min-width:26px;height:22px;padding:0 7px;border-radius:5px;font-weight:800;font-size:.82rem;color:#1a1a1a}
.energy-A{background:#00a651;color:#fff}.energy-B{background:#50b848;color:#fff}.energy-C{background:#bfd730}
.energy-D{background:#fff200}.energy-E{background:#fdb913}.energy-F{background:#f37021;color:#fff}.energy-G{background:#ed1c24;color:#fff}

/* ===== similar properties ===== */
.similar{margin-top:48px}
.similar h2{font-size:1.4rem;margin-bottom:18px}
.similar-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
@media(max-width:760px){.similar-grid{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.similar-grid{grid-template-columns:1fr}}

/* ===== favorites ===== */
.fav-btn{position:absolute;top:10px;right:10px;width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.92);display:flex;align-items:center;justify-content:center;cursor:pointer;border:0;z-index:2;transition:transform .12s,background .15s;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.fav-btn:hover{transform:scale(1.08)}
.fav-btn svg{width:18px;height:18px;color:#555;fill:none;stroke:currentColor;stroke-width:2}
.fav-btn.active{background:#fff}
.fav-btn.active svg{color:#ed2b4e;fill:#ed2b4e}
.fav-toggle{display:inline-flex;align-items:center;gap:6px;background:var(--paper);border:1px solid var(--line);border-radius:999px;padding:.45rem .8rem;font-family:inherit;font-size:.85rem;font-weight:600;color:var(--ink);cursor:pointer;transition:.15s}
.fav-toggle svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2}
.fav-toggle b{background:var(--mist);border-radius:999px;padding:0 7px;font-size:.78rem}
.fav-toggle.active{background:#fdeef1;border-color:#f5b8c4;color:#ed2b4e}
.fav-toggle.active svg{fill:#ed2b4e;color:#ed2b4e}
.fav-toggle.active b{background:#fff}
.fav-btn-lg svg{fill:none;stroke:currentColor;stroke-width:2}
.fav-btn-lg.active{border-color:#f5b8c4;color:#ed2b4e}
.fav-btn-lg.active svg{fill:#ed2b4e;color:#ed2b4e}

/* ===== all-properties map page ===== */
.map-page{padding-top:24px}
.map-page h1{font-size:1.7rem;margin:10px 0 4px}
.map-page-sub{margin-bottom:18px}
.all-map{height:72vh;min-height:440px;width:100%;background:var(--mist);border-top:1px solid var(--line);border-bottom:1px solid var(--line);z-index:0}
.all-map-empty{display:flex;align-items:center;justify-content:center;height:100%;color:var(--muted)}
.leaflet-popup-content{margin:0!important}
.leaflet-popup-content-wrapper{border-radius:12px!important;overflow:hidden;padding:0!important}
a.map-pop{display:block;text-decoration:none;color:var(--ink);width:210px}
a.map-pop img{width:100%;height:120px;object-fit:cover;display:block}
a.map-pop .mp-price{display:block;font-weight:800;font-size:1.02rem;color:var(--blue);padding:8px 10px 0}
a.map-pop .mp-title{display:block;font-weight:600;font-size:.9rem;padding:2px 10px 0;line-height:1.3}
a.map-pop .mp-zone{display:block;font-size:.8rem;color:var(--muted);padding:2px 10px 10px}

/* ===== send confirmation card ===== */
.sent-card{text-align:center;padding:42px 28px;background:var(--paper);border:1px solid var(--line);border-radius:var(--radius)}
.sent-ico svg{width:54px;height:54px;color:#1d8c43;stroke-width:2;fill:none}
.sent-card h3,.sent-card h4{font-size:1.3rem;margin:14px 0 8px}
.sent-card p{color:var(--muted);margin-bottom:20px}
.sent-card-sm{padding:24px 18px;margin-top:18px}
.sent-card-sm h4{font-size:1.05rem;margin:10px 0 6px}
.sent-card-sm p{margin-bottom:0;font-size:.92rem}
.sent-card-sm .sent-ico svg{width:40px;height:40px}

/* ===== desktop nav links ===== */
.nav-links{display:none;align-items:center;gap:26px;margin-left:auto;margin-right:22px}
.nav-links a{font-weight:600;font-size:.95rem;color:#fff;opacity:.82;transition:.15s}
.nav-links a:hover,.nav-links a.cur{opacity:1}
.nav-links a.cur{text-decoration:underline;text-underline-offset:5px}
@media(min-width:860px){.nav-links{display:flex}.menu-btn{display:none}}


/* ===== compact secondary spec grid ===== */
.spec-grid-sec{margin-top:-1px}
.spec-grid-sec .cell{padding:12px 20px}
.spec-grid-sec .k{margin-bottom:3px}
.spec-grid-sec .v{font-size:.98rem;font-weight:600}

/* heart on the big gallery image */
.fav-btn-gallery{width:40px;height:40px;top:14px;right:14px}
.fav-btn-gallery svg{width:20px;height:20px}

/* ===== sticky mobile contact bar (detail page) ===== */
.detail-cta{position:fixed;left:0;right:0;bottom:0;z-index:50;display:none;gap:10px;padding:10px 14px;background:rgba(255,255,255,.97);backdrop-filter:saturate(180%) blur(6px);border-top:1px solid var(--line);box-shadow:0 -2px 12px rgba(0,0,0,.08)}
.detail-cta .btn{flex:1;margin:0;justify-content:center}
@media(max-width:760px){.detail-cta{display:flex}}
body:has(.detail-cta) .appbg{padding-bottom:0}
@media(max-width:760px){body:has(.detail-cta) .appbg{padding-bottom:74px}}

/* ===== map page filters ===== */
.map-filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.map-filters select{padding:.5rem .7rem;border:1px solid var(--line);border-radius:10px;font-family:inherit;font-size:.9rem;background:var(--paper)}
.map-count{font-size:.9rem;color:var(--muted)}

/* ===== synchronized rotating card images ===== */
.card-slides{position:absolute;inset:0}
.card-media .card-slide{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .9s ease, transform .5s ease}
.card-media .card-slide.active{opacity:1}

/* ===== collapsible mortgage calculator ===== */
.calc-details{margin-top:28px;margin-bottom:24px;border:1px solid var(--line);border-radius:var(--radius);background:var(--mist);overflow:hidden}
.calc-details>summary{cursor:pointer;padding:16px 20px;font-weight:700;font-size:1.05rem;display:flex;align-items:center;gap:10px;list-style:none}
.calc-details>summary::-webkit-details-marker{display:none}
.calc-details>summary svg{width:20px;height:20px;color:var(--blue)}
.calc-details>summary::after{content:'+';margin-left:auto;font-size:1.25rem;font-weight:700;color:var(--muted)}
.calc-details[open]>summary::after{content:'–'}
.calc-details .calc{margin:0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;padding:20px}

/* badges only shrink when in 2-column mode on narrow screens (where cards are small) */
@media(max-width:640px){
  .grid[data-cols="2"] .card-badges{gap:5px;right:46px}
  .grid[data-cols="2"] .badge{font-size:.55rem;padding:.2rem .42rem}
  .grid[data-cols="2"] .badge-txn{font-size:.5rem}
  .grid[data-cols="2"] .badge-status{font-size:.56rem;padding:.22rem .48rem}
}
