:root {
  --sand: #f7f3ec;
  --paper: #fffdf9;
  --ink: #17262a;
  --muted: #5d6b6e;
  --line: #e6ddcf;
  --teal: #0f6e70;
  --teal-dark: #0b3b3e;
  --sun: #f2b85b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 38, 42, .06), 0 8px 24px rgba(23, 38, 42, .06);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--sand);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--sand); line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; margin: 0; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 20px; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 253, 249, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: "Fraunces", Georgia, serif; font-size: 20px; font-weight: 600; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { display: flex; gap: 20px; margin-left: auto; font-size: 14px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.top .call { font-size: 14px; font-weight: 600; color: var(--teal); text-decoration: none; white-space: nowrap; }
@media (max-width: 720px) { .top nav { display: none; } .top .call { margin-left: auto; } }

/* Hero */
.hero { position: relative; color: #fff; background: var(--teal-dark); overflow: hidden; }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .55; transition: opacity .6s; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 59, 62, .25), rgba(11, 59, 62, .85)); }
.hero .wrap { position: relative; z-index: 1; padding-block: 72px 36px; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); max-width: 15ch; line-height: 1.05; }
.hero p { margin: 14px 0 0; max-width: 52ch; color: rgba(255, 255, 255, .85); }
.search { margin-top: 28px; display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)) auto; gap: 8px; background: var(--paper); padding: 8px; border-radius: 14px; box-shadow: var(--shadow); color: var(--ink); }
.search select, .search button { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 0 12px; font: inherit; font-size: 14px; color: var(--ink); min-width: 0; }
.seg { display: inline-flex; background: var(--sand); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: transparent; height: 38px; padding: 0 14px; }
.seg button[aria-pressed="true"] { background: var(--teal); color: #fff; }
.search .go { background: var(--teal); color: #fff; border-color: var(--teal); font-weight: 600; padding: 0 20px; cursor: pointer; }
@media (max-width: 820px) { .search { grid-template-columns: 1fr 1fr; } .seg, .search .go { grid-column: span 2; } .seg button { flex: 1; } }

.live { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; color: rgba(255, 255, 255, .85); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #5ee0a0; box-shadow: 0 0 0 0 rgba(94, 224, 160, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(94, 224, 160, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 224, 160, 0); } }

/* Listings */
.section { padding-block: 40px 64px; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-head h2 { font-size: 28px; }
.section-head .count { color: var(--muted); font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(23, 38, 42, .08), 0 14px 32px rgba(23, 38, 42, .10); }
.card .ph { position: relative; flex: 0 0 auto; aspect-ratio: 3 / 2; overflow: hidden; background: #e9e2d6; }
/* Photos come in every shape; the frame decides the shape, the photo fills it. */
.card .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card.closed .ph img { filter: saturate(.6); }
.ribbon { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .02em; background: var(--paper); color: var(--ink); }
.ribbon.under_offer, .ribbon.reserved { background: var(--sun); color: #3b2a07; }
.ribbon.sold, .ribbon.let { background: var(--ink); color: #fff; }
.ribbon.new { background: var(--teal); color: #fff; }
.flag { position: absolute; right: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #fff; color: var(--teal); box-shadow: var(--shadow); }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.price { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.card h3 { font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.35; }
.where { font-size: 13px; color: var(--muted); }
.facts { display: flex; gap: 14px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card.changed { animation: changed 1.6s ease 2; }
@keyframes changed { 0%, 100% { box-shadow: var(--shadow); } 50% { box-shadow: 0 0 0 4px var(--sun), var(--shadow); } }
.empty, .notice { padding: 28px; background: var(--paper); border-radius: var(--radius); text-align: center; color: var(--muted); }
.notice code { background: var(--sand); padding: 2px 6px; border-radius: 6px; }

/* Property page */
.crumbs { padding-top: 22px; font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.gallery { margin-top: 14px; display: grid; grid-template-columns: 2fr 1fr; gap: 8px; height: clamp(260px, 40vw, 500px); border-radius: var(--radius); overflow: hidden; }
.gallery .main { position: relative; min-height: 0; overflow: hidden; background: #e9e2d6; }
.gallery .main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery .side { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; min-height: 0; }
.gallery .side img { width: 100%; height: 100%; min-height: 0; object-fit: cover; background: #e9e2d6; }
.gallery.single { grid-template-columns: 1fr; }
.gallery.single .side { display: none; }
.gallery.single { height: clamp(220px, 34vw, 440px); }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; }
.thumbs button { flex: 0 0 auto; width: 88px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; }
.thumbs button[aria-current="true"] { border-color: var(--teal); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; background: #e9e2d6; }
@media (max-width: 720px) { .gallery { grid-template-columns: 1fr; height: 62vw; } .gallery .side { display: none; } }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; padding-block: 28px 64px; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } }
.layout h1 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; }
.layout .price { font-size: 30px; margin-top: 10px; }
.keyfacts { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.keyfacts > span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font-size: 14px; font-variant-numeric: tabular-nums; }
.epc { display: inline-block; min-width: 26px; text-align: center; border-radius: 6px; background: #1f9d55; color: #fff; font-weight: 700; padding: 1px 6px; }
.desc { white-space: pre-line; max-width: 68ch; color: #2b3a3d; }
.features { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; margin: 18px 0 0; }
.features li { padding: 6px 12px; border-radius: 999px; background: #e7f1ef; color: var(--teal-dark); font-size: 13px; }
.legal { margin-top: 26px; font-size: 12px; color: var(--muted); }
.panel { position: sticky; top: 92px; align-self: start; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.agent { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.agent .av { width: 44px; height: 44px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 700; }
.agent small { display: block; color: var(--muted); }
.tabs { display: flex; background: var(--sand); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.tabs button { flex: 1; border: 0; background: transparent; height: 36px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; color: var(--muted); }
.tabs button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
form { display: grid; gap: 10px; }
label { font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
input, textarea { font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
textarea { min-height: 96px; resize: vertical; }
.primary { height: 46px; border: 0; border-radius: 10px; background: var(--teal); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.primary:disabled { opacity: .6; cursor: default; }
.slots { display: grid; gap: 10px; max-height: 260px; overflow-y: auto; }
.slots h4 { margin: 4px 0 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.slots .row { display: flex; flex-wrap: wrap; gap: 6px; }
.slots button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums; }
.slots button[aria-pressed="true"] { background: var(--teal); color: #fff; border-color: var(--teal); }
.ok { padding: 14px; border-radius: 10px; background: #e7f1ef; color: var(--teal-dark); font-size: 14px; }
.err { padding: 10px 12px; border-radius: 10px; background: #fdecec; color: #8a1f1f; font-size: 13px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
footer { background: var(--teal-dark); color: rgba(255, 255, 255, .8); font-size: 14px; }
footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; padding-block: 40px; }
footer strong { color: #fff; font-family: "Fraunces", Georgia, serif; font-size: 18px; font-weight: 600; }
footer p { margin: 6px 0 0; }
footer .demo { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 12px; color: rgba(255, 255, 255, .6); }
@media (max-width: 720px) { footer .wrap { grid-template-columns: 1fr; } }

/* Virtual tour and video */
.media-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.media-bar button { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line, #e2dccf); border-radius: 999px; background: var(--paper, #fff); font: inherit; font-weight: 600; color: var(--teal); cursor: pointer; }
.media-bar button:hover { border-color: var(--teal); }
.media-bar button span { font-size: 12px; font-weight: 700; }
.card .ph .has-tour { position: absolute; right: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(11, 59, 62, .85); color: #fff; font-size: 12px; font-weight: 600; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; padding: 16px; background: rgba(10, 20, 22, .88); }
.lightbox-bar { display: flex; align-items: center; gap: 16px; color: #fff; padding: 0 4px 10px; }
.lightbox-bar strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox-bar a { color: #cfe7e6; font-size: 14px; }
.lightbox-bar button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.lightbox iframe { flex: 1; width: 100%; border: 0; border-radius: 12px; background: #000; }
