:root {
  --brand: #2f4a5c;
  --brand-dark: #22384a;
  --ink: #1d2730;
  --muted: #66727d;
  --line: #e4e8ec;
  --bg: #f6f7f8;
  --card: #ffffff;
  --accent: #b08d57;
  --wa: #1fa855;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 20; }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { font-family: "Jost", sans-serif; font-weight: 300; font-size: 30px; letter-spacing: .32em; }
.nav { display: flex; gap: 28px; font-size: 14px; letter-spacing: .04em; }
.nav a { opacity: .85; }
.nav a:hover { opacity: 1; }

/* Hero */
.hero { background: var(--brand); color: #fff; padding: 80px 0 110px; text-align: center; }
.hero h1 { font-family: "Jost", sans-serif; font-weight: 300; font-size: clamp(30px, 5vw, 50px); margin: 0 0 12px; letter-spacing: .02em; line-height: 1.2; }
.hero p { margin: 0 auto; max-width: 560px; opacity: .8; font-size: 16px; }
.eyebrow { text-transform: uppercase; letter-spacing: .28em; font-size: 12px; opacity: .7; margin-bottom: 18px; }

/* Filters */
.filters { background: #fff; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(20,35,50,.12); margin: -48px auto 40px; padding: 14px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; position: relative; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: #fff; padding: 9px 18px; border-radius: 999px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.tab:hover { border-color: var(--brand); }
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.search { flex: 1; min-width: 200px; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; font: inherit; font-size: 14px; }
.search:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* Grid & cards */
.section-title { font-family: "Jost", sans-serif; font-weight: 400; font-size: 26px; margin: 0 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; padding-bottom: 70px; }
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20,35,50,.10); }
.card-img { aspect-ratio: 16/10; position: relative; background: #dfe5ea; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.95); color: var(--brand); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 5px 10px; border-radius: 4px; }
.badge.status { left: auto; right: 12px; background: var(--brand); color: #fff; }
.badge.sold { background: #9b2c2c; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-price { font-size: 20px; font-weight: 600; color: var(--brand); }
.card-title { font-size: 16px; font-weight: 500; margin: 4px 0 2px; }
.card-loc { color: var(--muted); font-size: 13px; }
.facts { display: flex; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: auto; padding-top: 14px; font-size: 13px; color: var(--muted); }
.card-body .card-loc { margin-bottom: 14px; }
.facts b { color: var(--ink); font-weight: 600; }
.empty { grid-column: 1/-1; text-align: center; padding: 60px 0; color: var(--muted); }

/* Placeholder image */
.ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; background: linear-gradient(135deg, #3b5a6e, var(--brand-dark)); color: rgba(255,255,255,.75); font-family: "Jost", sans-serif; letter-spacing: .3em; font-size: 13px; text-transform: uppercase; }
.ph .ph-logo { font-size: 26px; font-weight: 300; color: #fff; }

/* Property page */
.crumbs { font-size: 13px; color: var(--muted); padding: 24px 0 14px; }
.crumbs a:hover { color: var(--brand); }
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; border-radius: var(--radius); overflow: hidden; height: 460px; }
.gallery .main { grid-row: span 2; }
.gallery.one { grid-template-columns: 1fr; }
.gallery.one .main, .gallery.two .main { grid-row: auto; }
.gallery.two { grid-template-columns: 1fr 1fr; }
.gallery > div { background: #dfe5ea; overflow: hidden; cursor: zoom-in; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.more { position: absolute; inset: 0; background: rgba(20,35,50,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.detail { display: grid; grid-template-columns: 1fr 360px; gap: 40px; padding: 34px 0 80px; align-items: start; }
.detail h1 { font-family: "Jost", sans-serif; font-weight: 400; font-size: clamp(26px, 4vw, 36px); margin: 8px 0 4px; line-height: 1.25; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 5px 10px; border-radius: 4px; background: #e8eef2; color: var(--brand); }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); background: #fff; border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 28px 0; }
.spec { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.spec span { font-weight: 600; }
.detail h2 { font-family: "Jost", sans-serif; font-weight: 400; font-size: 21px; margin: 30px 0 10px; }
.desc { white-space: pre-line; color: #39444e; }
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.features li { padding-left: 26px; position: relative; }
.features li::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.side { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: sticky; top: 90px; }
.side .price { font-size: 28px; font-weight: 600; color: var(--brand); margin-bottom: 4px; }
.side p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 14px; border-radius: 8px; font-weight: 600; font-size: 15px; margin-bottom: 10px; border: 0; cursor: pointer; font-family: inherit; }
.btn svg { width: 20px; height: 20px; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-call { background: var(--brand); color: #fff; }
.btn-ghost { background: #fff; color: var(--brand); border: 1px solid var(--line); }
.btn:hover { filter: brightness(1.07); }
.ref { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10,15,20,.94); display: none; align-items: center; justify-content: center; z-index: 50; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 6px; }
.lb-btn { position: absolute; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; padding: 16px; line-height: 1; }
.lb-prev { left: 8px; } .lb-next { right: 8px; } .lb-close { top: 8px; right: 8px; font-size: 32px; }
.lb-count { position: absolute; bottom: 18px; color: #fff; font-size: 13px; opacity: .7; }

/* Floating WhatsApp (mobile) */
.mobile-bar { display: none; }

/* Footer */
.footer { background: var(--brand-dark); color: rgba(255,255,255,.8); padding: 50px 0 30px; font-size: 14px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer .logo { color: #fff; font-size: 24px; }
.footer a:hover { color: #fff; }
.footer .copy { width: 100%; border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; margin-top: 10px; font-size: 12px; opacity: .6; }

@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; gap: 10px; }
  .side { position: static; }
  .gallery { height: 300px; grid-template-columns: 1fr; }
  .gallery > div:not(.main) { display: none; }
  .nav { display: none; }
  .grid { grid-template-columns: 1fr; }
  .mobile-bar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; gap: 8px; padding: 10px 16px; background: #fff; border-top: 1px solid var(--line); z-index: 30; }
  .mobile-bar .btn { margin: 0; }
  body.has-bar { padding-bottom: 76px; }
}

/* Tall (portrait) images: show the top part on cards, the whole image in the gallery */
.card-img img.portrait { object-position: center 22%; }
.gallery img.portrait { object-fit: contain; background: #0e1a2b; }
