/* ===== Design tokens — change these to rebrand the whole site ===== */
:root {
  --brand: #1f3a5f;        /* deep navy */
  --brand-dark: #152a46;
  --accent: #f2a93b;       /* construction amber */
  --bg: #ffffff;
  --bg-alt: #f5f3ef;
  --text: #1d2430;
  --muted: #667085;
  --border: #e4e2dd;
  --ok: #1b8a5a;
  --warn: #c27c0e;
  --danger: #c0392b;
  --radius: 12px;
  --shadow: 0 6px 24px rgb(16 24 40 / 0.08);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-head: 'Manrope', var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
code { background: var(--bg-alt); padding: .1em .35em; border-radius: 4px; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.muted { color: var(--muted); margin: 0; }
.center { text-align: center; margin-top: 32px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 48px 0; color: var(--muted); }
.error { color: var(--danger); margin: 0; min-height: 1.2em; }
.rounded { border-radius: var(--radius); box-shadow: var(--shadow); }
.hp { position: absolute; left: -9999px; } /* honeypot */

/* ===== Buttons & inputs ===== */
.btn, .btn-outline, .btn-sm {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 2px solid var(--brand);
  background: var(--brand); color: #fff; font: 600 1rem var(--font); text-decoration: none; cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-outline { background: transparent; color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-wa { background: #25d366; border-color: #25d366; }
.btn-wa:hover { background: #1da851; }
.btn-sm { padding: 6px 12px; font-size: .875rem; background: #fff; color: var(--brand); border-width: 1px; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-link { background: none; border: 0; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; color: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.stack { display: grid; gap: 12px; }
.panel { background: #fff; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.narrow { max-width: 420px; margin: 40px auto; }

/* ===== Header ===== */
.demo-banner { background: var(--accent); color: #2b1d00; text-align: center; padding: 8px 16px; font-size: .9rem; }
.header { position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / .95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font: 800 1.15rem var(--font-head); color: var(--brand); text-decoration: none; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { text-decoration: none; color: var(--text); font-weight: 500; }
.nav a.btn { color: #fff; padding: 8px 16px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; cursor: pointer; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
         gap: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; }
}

/* ===== Hero ===== */
.hero {
  color: #fff; padding: 96px 0 72px;
  background: linear-gradient(100deg, rgb(21 42 70 / .92), rgb(21 42 70 / .55)),
              url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1800&q=70') center / cover;
}
.eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .02em; margin: 0 0 12px; }
.hero-sub { font-size: 1.2rem; opacity: .9; margin: 0 0 28px; }
.hero-search { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 8px; background: #fff; padding: 8px; border-radius: 14px; max-width: 760px; }
.hero-search select { border: 0; color: var(--text); }
.hero-search .btn { background: var(--accent); border-color: var(--accent); color: #2b1d00; }
.stats { display: flex; gap: 40px; list-style: none; padding: 0; margin: 40px 0 0; flex-wrap: wrap; }
.stats strong { display: block; font: 800 1.8rem var(--font-head); color: var(--accent); }
@media (max-width: 640px) { .hero-search { grid-template-columns: 1fr; } }

/* ===== Filters & cards ===== */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; align-items: end;
           background: var(--bg-alt); padding: 16px; border-radius: var(--radius); margin-bottom: 28px; }
.filters label { font-size: .8rem; font-weight: 600; color: var(--muted); display: grid; gap: 4px; }
.filters .btn-link { justify-self: start; padding-bottom: 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-muted { opacity: .75; }
.card-link { color: inherit; text-decoration: none; display: block; }
.card-img { position: relative; aspect-ratio: 4 / 3; background: var(--bg-alt); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px 18px 20px; }
.card-price { font: 800 1.35rem var(--font-head); color: var(--brand); margin: 0 0 4px; }
.specs { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; padding: 0; margin: 12px 0 0; font-size: .9rem; }
.specs li + li::before { content: '•'; margin-right: 14px; color: var(--border); }
.img-placeholder { display: grid; place-items: center; height: 100%; min-height: 200px; color: var(--muted); }

.badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 99px; font-size: .75rem; font-weight: 600; background: #fff; }
.badge-available { color: var(--ok); }
.badge-booked { color: var(--warn); }
.badge-sold { color: var(--danger); }
.badge-featured { left: auto; right: 12px; background: var(--accent); color: #2b1d00; }
.admin-table .badge { position: static; padding: 2px 8px; background: var(--bg-alt); }

/* ===== Process / about ===== */
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; list-style: none; padding: 0; margin: 28px 0 0; }
.timeline li { background: #fff; padding: 24px; border-radius: var(--radius); border-top: 4px solid var(--accent); }
.timeline span { font: 800 1.5rem var(--font-head); color: var(--accent); }
.timeline p { margin: 0; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; }
.checks li { padding-left: 28px; position: relative; margin: 8px 0; }
.checks li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

/* ===== Flat detail ===== */
.back { display: inline-block; margin-bottom: 20px; text-decoration: none; }
.detail { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
.detail-img { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; aspect-ratio: 16 / 10; background: var(--bg-alt); }
.detail-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-price { font: 800 2rem var(--font-head); color: var(--brand); margin: 16px 0; }
.detail-price small { display: block; font: 500 .95rem var(--font); color: var(--muted); }
.detail-desc { font-size: 1.05rem; }
.detail h2 { margin-top: 32px; font-size: 1.3rem; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--border); }
.spec-table th { color: var(--muted); font-weight: 500; width: 40%; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.chips li { background: var(--bg-alt); padding: 6px 12px; border-radius: 99px; font-size: .9rem; }
.enquiry-box { position: sticky; top: 88px; display: grid; gap: 12px; background: #fff; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.enquiry-box h2 { margin: 0; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } .enquiry-box { position: static; } }

/* ===== Footer & floating WhatsApp ===== */
.footer { background: var(--brand-dark); color: #c9d3e0; padding: 24px 0; font-size: .9rem; }
.footer a { color: #fff; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer p { margin: 0; }
.wa-float { position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
            background: #25d366; color: #fff; box-shadow: var(--shadow); z-index: 30; }

/* ===== Toast ===== */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; padding: 12px 20px; border-radius: 10px;
         background: var(--ok); color: #fff; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast-error { background: var(--danger); }

/* ===== Admin ===== */
.admin .header-inner a:last-child { text-decoration: none; }
.dash-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.tabs { display: flex; gap: 4px; background: var(--bg-alt); padding: 4px; border-radius: 10px; }
.tab { border: 0; background: none; padding: 8px 16px; border-radius: 8px; font: 600 .95rem var(--font); cursor: pointer; color: var(--muted); }
.tab.active { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgb(0 0 0 / .1); }
.pill:not(:empty) { background: var(--danger); color: #fff; border-radius: 99px; padding: 0 7px; font-size: .75rem; margin-left: 4px; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; }
.admin-table th, .admin-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.admin-table th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; }
.actions { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.actions select { width: auto; padding: 6px 8px; }

.enquiry { display: flex; justify-content: space-between; gap: 16px; padding: 16px; border: 1px solid var(--border); border-left: 4px solid var(--accent);
           border-radius: 8px; margin-bottom: 12px; background: #fff; }
.enquiry p { margin: 4px 0 0; }
.enquiry-contacted { border-left-color: var(--brand); }
.enquiry-closed { border-left-color: var(--border); opacity: .7; }
@media (max-width: 640px) { .enquiry { flex-direction: column; } }

dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(760px, 100% - 24px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgb(16 24 40 / .5); }
.flat-form { padding: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.form-grid .checkbox { display: flex; align-items: center; gap: 8px; }
.form-grid .checkbox input { width: auto; }
.span-2 { grid-column: span 2; }
.image-preview img { max-height: 200px; border-radius: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
