/* ============================================================
   House Hunt Machakos — design system
   Mobile-first. One stylesheet, no framework.
   Type: Nunito (Google Fonts), loaded from the layout <head>.
   ============================================================ */

:root {
  /* Brand */
  --green-900: #0a3b2c;
  --green-800: #0d5540;
  --green-700: #0f6b4f;
  --green-600: #14855f;
  --green-100: #e3f2ec;
  --green-50:  #f1f8f5;

  --amber-600: #c97a06;
  --amber-500: #f0a020;
  --amber-100: #fdf0d8;

  /* Neutrals */
  --ink:       #10201b;
  --ink-2:     #33453e;
  --muted:     #66766f;
  --line:      #dfe6e2;
  --line-soft: #eef2f0;
  --surface:   #ffffff;
  --bg:        #f5f8f6;

  /* Status */
  --good:      #0f8b52;
  --good-bg:   #e4f5eb;
  --warn:      #b9741a;
  --warn-bg:   #fdf1dc;
  --bad:       #b03f33;
  --bad-bg:    #fbe9e6;

  /* Shape & motion */
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 20px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(16, 32, 27, .06), 0 1px 3px rgba(16, 32, 27, .04);
  --shadow-2: 0 4px 12px rgba(16, 32, 27, .08);
  --shadow-3: 0 12px 32px rgba(16, 32, 27, .14);

  --wrap: 1140px;
  --sans: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

/* `clip`, not `hidden`: nothing may push the page sideways on a phone, but the
   sticky header and the sticky sidebar must keep working. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

/* `hidden` means hidden. The browser's own rule is only `display: none` at the
   weakest priority, so any class that sets `display` (a grid of places, a flex
   row) silently cancels it and the element stays on screen. */
[hidden] { display: none !important; }

a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: clamp(1.65rem, 4.5vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3.2vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* ------------------------------------------------------------ icons */

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  display: inline-block;
  vertical-align: -0.22em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.icon-sm { width: 1em;    height: 1em;    stroke-width: 1.9; }
.icon-lg { width: 1.5em;  height: 1.5em;  stroke-width: 1.6; }
.icon-xl { width: 2rem;   height: 2rem;   stroke-width: 1.4; }
.icon-2x { width: 2.6rem; height: 2.6rem; stroke-width: 1.3; }
.icon-fill { fill: currentColor; stroke: none; }

/* Icons sitting inside a tinted square/circle container. */
.ico > .icon { width: 1.25em; height: 1.25em; vertical-align: 0; }
.quick-card .ico, .why .ico, .amenity .ico, .place .ico, .step::before { color: var(--green-700); }
.empty .ico { color: var(--muted); }
.badge .icon { width: 1em; height: 1em; stroke-width: 2; vertical-align: -0.15em; }
.btn .icon { width: 1.1em; height: 1.1em; vertical-align: -0.18em; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny  { font-size: .78rem; }
.strong { font-weight: 600; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.grow { flex: 1 1 auto; }

.section { padding: 40px 0; }
.section-head { margin-bottom: 20px; }
.section-head h2 { margin-bottom: .25rem; }
.section-head p { color: var(--muted); margin: 0; }

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px;
  font: inherit; font-weight: 600; line-height: 1;
  border: 1px solid transparent; border-radius: var(--r-pill);
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-800); color: #fff; }

.btn-accent { background: var(--amber-500); color: #23180a; }
.btn-accent:hover { background: var(--amber-600); color: #fff; }

.btn-outline { background: var(--surface); color: var(--green-800); border-color: var(--line); }
.btn-outline:hover { border-color: var(--green-700); background: var(--green-50); }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-soft); }

.btn-whatsapp { background: #1fa855; color: #fff; }
.btn-whatsapp:hover { background: #17904a; color: #fff; }

.btn-danger { background: var(--bad-bg); color: var(--bad); border-color: #f0cdc7; }

.btn-sm { min-height: 38px; padding: 8px 14px; font-size: .875rem; }
.btn-lg { min-height: 54px; padding: 15px 28px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* ------------------------------------------------------------ forms */

label, .label {
  display: block; font-weight: 600; font-size: .9rem;
  margin-bottom: 6px; color: var(--ink-2);
}
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }

input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=password], input[type=date], input[type=time], input[type=search],
input[type=url], select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  appearance: none;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }

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 fill='%2366766f' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px var(--green-100);
  outline: none;
}
input.has-error, select.has-error, textarea.has-error { border-color: var(--bad); }
.error-text { color: var(--bad); font-size: .82rem; margin-top: 4px; }

.field { margin-bottom: 16px; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .field-row.cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .field-row.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); cursor: pointer; font-weight: 500; font-size: .92rem;
  margin-bottom: 0;
}
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--green-700); }
.check:has(input:checked) { border-color: var(--green-600); background: var(--green-50); }

.check.is-disabled { opacity: .5; cursor: not-allowed; }

.check-grid { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .check-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .check-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font-weight: 700; font-size: 1.05rem; padding: 0; margin-bottom: 10px; }

/* ------------------------------------------------------------ cards & panels */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
}
.card-pad { padding: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head h2, .panel-head h3 { margin: 0; }

/* ------------------------------------------------------------ badges */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: .78rem; font-weight: 600; line-height: 1.4;
  background: var(--line-soft); color: var(--ink-2);
}
.badge-good   { background: var(--good-bg); color: var(--good); }
.badge-warn   { background: var(--warn-bg); color: var(--warn); }
.badge-bad    { background: var(--bad-bg);  color: var(--bad); }
.badge-muted  { background: var(--line-soft); color: var(--muted); }
.badge-accent { background: var(--amber-100); color: var(--amber-600); }
.badge-brand  { background: var(--green-100); color: var(--green-800); }

.badge-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------------------ header */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--green-800); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  background: var(--green-700); color: #fff;
  border-radius: 10px; font-size: 1rem;
}
.brand span small { display: block; font-size: .68rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }

.main-nav { display: none; margin-left: auto; gap: 4px; align-items: center; }
.main-nav a {
  padding: 9px 12px; border-radius: var(--r-pill);
  color: var(--ink-2); font-weight: 600; font-size: .93rem;
}
.main-nav a:hover { background: var(--line-soft); text-decoration: none; }
.main-nav a.is-active { background: var(--green-100); color: var(--green-800); }

.header-cta { margin-left: auto; display: flex; gap: 8px; align-items: center; }
@media (min-width: 900px) {
  .main-nav { display: flex; }
  .header-cta { margin-left: 0; }
}
@media (max-width: 559px) { .hide-sm { display: none; } }

/* ------------------------------------------------------- account menu */

.avatar {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--green-100); color: var(--green-800);
  font-weight: 800; font-size: .82rem; letter-spacing: .02em;
}
.avatar-lg { width: 42px; height: 42px; font-size: .95rem; }

.account-menu { position: relative; }
.account-trigger {
  display: flex; align-items: center; gap: 4px;
  padding: 3px 6px 3px 3px;
  background: transparent; border: 1px solid transparent; border-radius: var(--r-pill);
  cursor: pointer; color: var(--muted); font: inherit;
}
.account-trigger:hover { background: var(--line-soft); }
.account-trigger[aria-expanded="true"] { background: var(--line-soft); border-color: var(--line); }
.account-trigger .icon { transform: rotate(90deg); transition: transform .15s; }
.account-trigger[aria-expanded="true"] .icon { transform: rotate(-90deg); }

.account-drop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  min-width: 232px; padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-3);
}
.account-drop[hidden] { display: none; }
.account-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 12px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line-soft);
}
.account-head strong { display: block; font-size: .92rem; line-height: 1.25; }
.account-head .tiny { display: block; }

.account-drop a,
.account-drop button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--ink-2);
  font: inherit; font-size: .9rem; font-weight: 600; text-align: left; cursor: pointer;
}
.account-drop a:hover,
.account-drop button:hover { background: var(--line-soft); text-decoration: none; }
.account-drop form { margin: 4px 0 0; border-top: 1px solid var(--line-soft); padding-top: 4px; }
.account-drop button { color: var(--bad); }

/* ------------------------------------------------------------ mobile bottom nav */

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 4px 8px; font-size: .68rem; font-weight: 600; color: var(--muted);
}
.bottom-nav a:hover { text-decoration: none; }
.bottom-nav a.is-active { color: var(--green-700); }
.bottom-nav .ico { font-size: 1.15rem; line-height: 1; }
body { padding-bottom: 64px; }
@media (min-width: 900px) {
  .bottom-nav { display: none; }
  body { padding-bottom: 0; }
}

/* ------------------------------------------------------------ hero */

.hero {
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(240,160,32,.18), transparent 60%),
    linear-gradient(160deg, var(--green-800), var(--green-700) 55%, var(--green-600));
  color: #fff;
  padding: 40px 0 32px;
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lead { color: rgba(255,255,255,.9); font-size: 1.05rem; max-width: 52ch; margin-bottom: 22px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; font-size: .85rem; color: rgba(255,255,255,.9); }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }

.search-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  padding: 16px;
  color: var(--ink);
}
.search-card .field-row { gap: 12px; }
.search-card label { font-size: .82rem; }
@media (min-width: 820px) {
  .search-card { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 12px; align-items: end; padding: 18px; }
  .search-card .field { margin-bottom: 0; }
  .search-card .search-submit { min-width: 170px; }
}

.tabs-pill { display: inline-flex; background: rgba(255,255,255,.16); border-radius: var(--r-pill); padding: 4px; margin-bottom: 18px; }
.tabs-pill a {
  padding: 8px 16px; border-radius: var(--r-pill); color: rgba(255,255,255,.85);
  font-weight: 600; font-size: .9rem;
}
.tabs-pill a:hover { text-decoration: none; color: #fff; }
.tabs-pill a.is-active { background: #fff; color: var(--green-800); }

/* ------------------------------------------------------------ quick categories */

.quick-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .quick-grid { grid-template-columns: repeat(3, 1fr); } }

.quick-card {
  display: flex; gap: 14px; align-items: center;
  padding: 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-1); color: var(--ink);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.quick-card:hover { text-decoration: none; box-shadow: var(--shadow-2); transform: translateY(-2px); border-color: var(--green-600); }
.quick-card .ico {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center;
  background: var(--green-100); border-radius: 12px; font-size: 1.4rem;
}
.quick-card h3 { margin: 0 0 2px; font-size: 1.02rem; }
.quick-card p { margin: 0; font-size: .86rem; color: var(--muted); }

/* ------------------------------------------------------------ property cards */

.property-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .property-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .property-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .property-grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }

.p-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: box-shadow .15s, transform .15s;
}
.p-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }

.p-media { position: relative; aspect-ratio: 4 / 3; background: var(--line-soft); overflow: hidden; }
.p-media img { width: 100%; height: 100%; object-fit: cover; }
.p-media .p-status { position: absolute; top: 10px; left: 10px; box-shadow: var(--shadow-1); }
.p-media .p-featured { position: absolute; top: 10px; right: 10px; }

.p-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.p-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 2px; }
.p-title a { color: var(--ink); }
.p-title a:hover { color: var(--green-700); text-decoration: none; }
/* The block a room type belongs to, under the room type's own name. */
.p-block { font-size: .84rem; margin: 0 0 4px; }
.p-place { font-size: .86rem; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 5px; }

.p-price { font-size: 1.22rem; font-weight: 800; color: var(--green-800); line-height: 1.2; }
.p-price small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.p-type { font-size: .84rem; color: var(--ink-2); font-weight: 600; }

.p-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.p-facts .badge { background: var(--green-50); color: var(--green-800); }

.p-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p-verified { font-size: .78rem; color: var(--muted); }

/* ------------------------------------------------------------ search / filters */

.results-layout { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) { .results-layout { grid-template-columns: 290px 1fr; } }

.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
@media (min-width: 980px) { .filters { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; } }
.filters h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 20px 0 10px; }
.filters h3:first-child { margin-top: 0; }

.filter-toggle { width: 100%; }
@media (min-width: 980px) { .filter-toggle { display: none; } }
@media (max-width: 979px) { .filters[hidden] { display: none; } }

.results-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.results-head h1 { font-size: 1.4rem; margin: 0; }
.sort-select { min-width: 190px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: .85rem; font-weight: 600; color: var(--ink-2);
}
.chip:hover { text-decoration: none; border-color: var(--green-600); }
.chip.is-active { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.chip .x { font-weight: 700; opacity: .7; }

.empty {
  text-align: center; padding: 48px 20px;
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r);
}
.empty .ico { font-size: 2.4rem; margin-bottom: 8px; }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 28px; }
.pagination a, .pagination span {
  min-width: 42px; min-height: 42px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); font-weight: 600; font-size: .9rem; color: var(--ink-2);
}
.pagination a:hover { border-color: var(--green-600); text-decoration: none; }
.pagination .is-current { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.pagination .is-disabled { opacity: .45; }

/* ------------------------------------------------------------ property detail */

.detail-layout { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) { .detail-layout { grid-template-columns: 1fr 340px; } }
/* A grid item is as wide as its widest child unless told otherwise, and the
   gallery photo carries its full pixel width — without this the column grows
   past the screen and the whole page scrolls sideways. */
.detail-layout > * { min-width: 0; }

.gallery { border-radius: var(--r); overflow: hidden; background: var(--line-soft); min-width: 0; max-width: 100%; }
.gallery-main { position: relative; aspect-ratio: 16 / 10; background: var(--line-soft); min-width: 0; }
.gallery-main img { width: 100%; height: 100%; max-width: 100%; object-fit: cover; }
.gallery-count {
  position: absolute; right: 12px; bottom: 12px;
  background: rgba(16,32,27,.75); color: #fff;
  padding: 6px 12px; border-radius: var(--r-pill); font-size: .8rem; font-weight: 600;
}
.gallery-thumbs { display: flex; gap: 8px; padding: 8px; overflow-x: auto; scrollbar-width: thin; min-width: 0; max-width: 100%; }
.gallery-thumbs button {
  flex: none; width: 84px; height: 62px; padding: 0;
  border: 2px solid transparent; border-radius: var(--r-sm); overflow: hidden;
  background: var(--line-soft); cursor: pointer;
}
.gallery-thumbs button[aria-current="true"] { border-color: var(--green-600); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.lightbox {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(8,16,13,.94);
  display: grid; place-items: center; padding: 20px;
}
.lightbox img { max-height: 88vh; max-width: 100%; object-fit: contain; border-radius: var(--r-sm); }
.lightbox-close {
  position: absolute; top: 14px; right: 14px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff; border: 0; font-size: 1.3rem; cursor: pointer;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.15); color: #fff; font-size: 1.4rem;
}
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }

.detail-head h1 { margin-bottom: 6px; }
.detail-place { color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }

.facts-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; grid-template-columns: repeat(2, 1fr); }
/* A long unbroken value (a reference, a plus code) must wrap, not widen the grid. */
.facts-grid .fact { min-width: 0; }
.facts-grid dd, .facts-grid dt { overflow-wrap: anywhere; }
@media (min-width: 620px) { .facts-grid { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--surface); padding: 14px; }
.fact dt { font-size: .78rem; color: var(--muted); margin-bottom: 3px; }
.fact dd { margin: 0; font-weight: 700; font-size: 1rem; }

.amenity-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
@media (min-width: 700px) { .amenity-grid { grid-template-columns: repeat(3, 1fr); } }
.amenity { display: flex; align-items: center; gap: 9px; font-size: .92rem; }
.amenity .ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; background: var(--green-50); border-radius: 9px; }

.unit-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.unit {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; background: var(--surface);
}
.unit .u-label { font-weight: 700; }
.unit.is-vacant { border-color: #b6e0c9; background: var(--good-bg); }

/* price with a promotion — the payable amount is always the loudest number */
.price-tag { margin: 10px 0; }
.price-was {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap; margin-bottom: 2px;
}
.price-was s { color: var(--muted); font-size: .95rem; }
.price-off {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--amber-600); color: #fff;
  font-size: .72rem; font-weight: 800; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 999px; text-transform: uppercase;
}
.price-now { font-size: 1.7rem; font-weight: 800; color: var(--green-800); line-height: 1.1; }
.price-tag.is-lg .price-now { font-size: 2.1rem; }
.price-save { font-size: .78rem; font-weight: 700; color: var(--green-700); margin-top: 2px; }

/* room types — the bedsitters, one bedrooms and two bedrooms in one block */
.room-type {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 14px; background: var(--surface);
}
.room-type h3 { font-size: 1.02rem; }
.room-type .p-price { font-size: 1.1rem; white-space: nowrap; }
.p-price .from, .action-price .from { font-weight: 600; color: var(--muted); }

.room-photos {
  display: flex; gap: 8px; margin-top: 12px;
  overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory;
}
.room-photos a { flex: 0 0 auto; scroll-snap-align: start; }
.room-photos img {
  width: 168px; height: 122px; object-fit: cover;
  border-radius: var(--r-sm); border: 1px solid var(--line); display: block;
}

/* nearby places */
.tab-bar { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.tab-bar button {
  flex: none; padding: 8px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface);
  font: inherit; font-size: .87rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.tab-bar button[aria-selected="true"] { background: var(--green-700); border-color: var(--green-700); color: #fff; }

.place-list { display: grid; gap: 8px; }
.place {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border: 1px solid var(--line-soft); border-radius: var(--r-sm); background: var(--surface);
}
.place .ico { font-size: 1.2rem; width: 34px; height: 34px; flex: none; display: grid; place-items: center; background: var(--line-soft); border-radius: 9px; }
.place .name { font-weight: 600; font-size: .94rem; }
.place .meta { font-size: .8rem; color: var(--muted); }
.place .dist { margin-left: auto; font-size: .82rem; font-weight: 600; color: var(--green-700); white-space: nowrap; }

/* sticky contact panel */
.action-card { position: sticky; top: 80px; }
.action-price { font-size: 1.7rem; font-weight: 800; color: var(--green-800); line-height: 1.1; }
.action-price small { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-top: 2px; }

.locked-map {
  position: relative; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line); background: var(--green-50);
  padding: 22px; text-align: center;
}
.locked-map .blurmap {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.8)),
    repeating-linear-gradient(0deg, #dbe7e0 0 2px, transparent 2px 26px),
    repeating-linear-gradient(90deg, #dbe7e0 0 2px, transparent 2px 26px);
  filter: blur(1px);
}
.locked-map > * { position: relative; }
.locked-map .ico { font-size: 1.8rem; }

.mobile-action-bar {
  position: fixed; left: 0; right: 0; bottom: 64px; z-index: 44;
  display: flex; gap: 8px; padding: 10px 12px;
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 14px rgba(16,32,27,.07);
}
.mobile-action-bar .btn { flex: 1; }
@media (min-width: 980px) { .mobile-action-bar { display: none; } }

/* ------------------------------------------------------------ misc blocks */

.why-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .why-grid { grid-template-columns: repeat(5, 1fr); } }
.why {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px;
}
.why .ico { font-size: 1.6rem; margin-bottom: 8px; }
.why h3 { font-size: 1rem; margin-bottom: 4px; }
.why p { margin: 0; font-size: .87rem; color: var(--muted); }

.cta-band {
  background: linear-gradient(150deg, var(--green-800), var(--green-600));
  color: #fff; border-radius: var(--r-lg); padding: 30px 24px;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 56ch; }

.area-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .area-grid { grid-template-columns: repeat(4, 1fr); } }
.area-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; color: var(--ink);
}
.area-tile:hover { text-decoration: none; border-color: var(--green-600); }
.area-tile .n { font-weight: 700; }
.area-tile .c { font-size: .82rem; color: var(--muted); }

.steps { display: grid; gap: 14px; counter-reset: step; grid-template-columns: 1fr; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 10px;
  background: var(--green-700); color: #fff; border-radius: 50%; font-weight: 700; font-size: .9rem;
}

.review { border-bottom: 1px solid var(--line-soft); padding: 14px 0; }
.review:last-child { border-bottom: 0; }
.stars { color: var(--amber-500); display: inline-flex; align-items: center; gap: 1px; }
.stars .icon { width: .95em; height: .95em; }
.stars-value { margin-left: 5px; font-size: .85em; font-weight: 700; color: var(--ink-2); }

/* ------------------------------------------------------------ flash & alerts */

.flash-stack { position: sticky; top: 64px; z-index: 35; padding: 12px 0 0; }
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface);
  font-size: .92rem; box-shadow: var(--shadow-1); margin-bottom: 10px;
}
.alert-success { background: var(--good-bg); border-color: #b6e0c9; color: #0b5f39; }
.alert-error   { background: var(--bad-bg);  border-color: #f0cdc7; color: #8b2f24; }
.alert-info    { background: var(--green-50); border-color: #cfe6dc; color: var(--green-800); }
.alert-warning { background: var(--warn-bg); border-color: #f0dcb4; color: #7d4f10; }

/* ------------------------------------------------------------ footer */

.site-footer {
  background: var(--green-900); color: rgba(255,255,255,.75);
  padding: 40px 0 28px; margin-top: 48px;
}
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 10px; }
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.2fr; } }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .9rem; }
.footer-bottom {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14);
  font-size: .83rem; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}

/* ------------------------------------------------------------ tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg); font-weight: 700; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--green-50); }

/* ------------------------------------------------------------ print & motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.d-none {
  display: none;
}