/* ==========================================================================
   TharaPlusLiving — theme tokens
   ========================================================================== */
:root {
  --navy-900: #0f1f38;
  --navy-800: #13294b;
  --navy-700: #1c3a63;
  --navy-600: #2a4e82;
  --gold-500: #d6a64c;
  --gold-600: #c08e32;
  --gold-100: #f6e9d1;
  --cream-50: #f8f6f1;
  --white: #ffffff;
  --slate-900: #1f2733;
  --slate-700: #3b4657;
  --slate-500: #6b7686;
  --slate-200: #e3e6ec;
  --slate-100: #eef0f4;
  --success: #2e7d5b;
  --success-bg: #e4f3ec;
  --warning: #c08e32;
  --warning-bg: #faf1e0;
  --danger: #b4483c;
  --danger-bg: #f8e7e5;
  --hero-match: #0a4581;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(15, 31, 56, 0.08);
  --shadow-md: 0 10px 30px rgba(15, 31, 56, 0.12);
  --shadow-lg: 0 20px 50px rgba(15, 31, 56, 0.22);
  --font-body: 'Prompt', 'Segoe UI', Tahoma, sans-serif;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--slate-700);
  background: var(--cream-50);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { color: var(--navy-900); margin: 0 0 .5em; font-weight: 600; line-height: 1.3; }
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
svg { width: 1em; height: 1em; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold-500);
  color: var(--navy-900);
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.eyebrow {
  color: var(--gold-500);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .8rem;
  margin: 0 0 10px;
}
.eyebrow-dark { color: var(--gold-600); }

/* ==========================================================================
   Buttons & badges
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: #f9b102; color: var(--navy-900); }
.btn-gold:hover { background: #cc9102; box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; color: var(--navy-800); border-color: var(--slate-200); }
.btn-outline:hover { border-color: var(--gold-500); color: var(--navy-900); }
.btn-outline-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-outline-light:hover { border-color: var(--gold-500); color: var(--gold-100); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-neutral { background: var(--slate-100); color: var(--slate-500); }
.badge-gold { background: var(--gold-500); color: var(--navy-900); }

/* ==========================================================================
   Header — solid bar, color-matched to whatever section follows it, so the
   seam disappears without needing the header to float over the content.
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
/* Inner pages: matches the page-banner's flat navy exactly. */
.site-header--inner { background: var(--navy-800); }
/* Homepage: matches the top tone of the Designer.png hero photo. */
.site-header--home { background: var(--hero-match); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; gap: 20px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}
.brand-logo { width: 100%; height: 100%; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }

.brand-name { font-weight: 700; font-size: 1.15rem; color: var(--slate-700); }
.brand-name em { font-style: normal; color: var(--gold-600); }
.brand-sub { font-size: .72rem; color: var(--slate-500); }

.main-nav ul { display: flex; gap: 6px; }
.main-nav a {
  display: block;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 500;
  color: var(--slate-700);
  transition: background .15s ease, color .15s ease;
}
.main-nav a:hover { background: var(--slate-100); color: var(--navy-900); }
.main-nav a.active { background: var(--navy-800); color: var(--white); }

/* Desktop / closed state: header sits on a dark backdrop, so text stays light.
   The mobile dropdown panel (.is-open) has a white background and falls back
   to the dark-on-light colors above. */
.site-header .brand-name,
.site-header .brand-sub,
.main-nav:not(.is-open) a {
  color: var(--white);
}
.site-header .brand-sub { color: rgba(255,255,255,.75); }
.main-nav:not(.is-open) a:hover { background: rgba(255,255,255,.15); color: var(--white); }
.main-nav:not(.is-open) a.active { background: rgba(255,255,255,.2); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 10px;
  background: transparent;
  color: var(--white);
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 120px 0 90px;
  color: var(--white);
}
.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 140px;
  background: linear-gradient(180deg, var(--hero-match) 0%, rgba(10,69,129,0) 100%);
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; text-shadow: 0 2px 18px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.6); }
/* layout set in admin: position (left/center/right × top/middle/bottom), sizes, height, darkening */
.hero { display: flex; flex-direction: column; justify-content: center; }
.hero--top { justify-content: flex-start; }
.hero--bottom { justify-content: flex-end; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, var(--hero-overlay, 0)); z-index: 0; pointer-events: none; }
.hero--left .hero-inner, .hero--center .hero-inner, .hero--right .hero-inner { max-width: 1200px; width: 100%; }
.hero--left .hero-inner > *, .hero--center .hero-inner > *, .hero--right .hero-inner > * { max-width: 720px; }
.hero--center .hero-inner { text-align: center; }
.hero--center .hero-inner > * { margin-left: auto; margin-right: auto; }
.hero--center .hero-actions { justify-content: center; }
.hero--right .hero-inner { text-align: right; }
.hero--right .hero-inner > * { margin-left: auto; }
.hero--right .hero-actions { justify-content: flex-end; }
.hero h1 { color: var(--white); font-size: calc(2.6rem * var(--hero-title-scale, 1)); margin-bottom: .4em; }
.hero-lead {
  color: var(--white);
  font-size: calc(1.05rem * var(--hero-lead-scale, 1));
  max-width: 560px;
  text-shadow:
    -1px -1px 3px rgba(0,0,0,.8),
    1px -1px 3px rgba(0,0,0,.8),
    -1px 1px 3px rgba(0,0,0,.8),
    1px 1px 3px rgba(0,0,0,.8),
    0 3px 10px rgba(0,0,0,.55);
}
.hero-actions { display: flex; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.hero-actions .btn { text-shadow: none; }

/* ==========================================================================
   Stats bar
   ========================================================================== */
.stats-bar { background: var(--navy-800); color: var(--white); padding: 34px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 700; color: var(--gold-500); }
.stat-label { display: block; font-size: .85rem; color: rgba(255,255,255,.75); margin-top: 4px; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 72px 0; }
.section-alt { background: var(--white); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head-center { text-align: center; justify-content: center; flex-direction: column; align-items: center; }
.section-head h2 { margin: 0; font-size: 1.8rem; }

/* ==========================================================================
   House cards & grid
   ========================================================================== */
.house-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.house-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
  display: flex;
  flex-direction: column;
}
.house-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.house-card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.house-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.house-card:hover .house-card-media img { transform: scale(1.06); }
.house-card-media .badge { position: absolute; top: 14px; left: 14px; }
.house-card-body { padding: 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.house-card-body h3 { font-size: 1.15rem; margin-bottom: 2px; }
.house-card-location { display: flex; gap: 6px; align-items: flex-start; font-size: .82rem; color: var(--slate-500); margin: 0; }
.house-card-location svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; color: var(--gold-600); }
.house-card-tagline { font-size: .88rem; color: var(--slate-500); margin: 4px 0 10px; }
.house-card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--slate-100); }
.house-card-price .label { display: block; font-size: .72rem; color: var(--slate-500); }
.house-card-price .value { display: block; font-weight: 700; color: var(--navy-800); }

/* ==========================================================================
   Feature grid
   ========================================================================== */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature-item { text-align: center; padding: 28px 18px; }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-500);
  margin-bottom: 16px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-item h3 { font-size: 1.05rem; }
.feature-item p { font-size: .88rem; color: var(--slate-500); margin: 0; }

/* Homepage lower zone — retint to match the blue header above it (only
   the homepage uses the hero-matched header color; other pages keep the
   standard navy, which already matches their own navy page-banner). */
.page-home .feature-icon { background: var(--hero-match); }
.page-home .section-head h2,
.page-home .house-card-price .value { color: var(--hero-match); }
.page-home .btn-outline { color: var(--hero-match); }
.page-home .btn-outline:hover { background: var(--hero-match); color: var(--white); border-color: var(--hero-match); }

/* ==========================================================================
   Promotions
   ========================================================================== */
.promo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.promo-card {
  background: var(--navy-800);
  color: var(--white);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.promo-card::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(214, 166, 76, .12);
}
.promo-card h3 { color: var(--white); margin-top: 14px; font-size: 1.15rem; }
.promo-card p { color: rgba(255,255,255,.78); font-size: .9rem; }
.promo-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.promo-project { font-size: .82rem; color: var(--gold-100); font-weight: 600; }
.promo-card .btn-outline { border-color: rgba(255,255,255,.4); color: var(--white); }
.promo-card .btn-outline:hover { border-color: var(--gold-500); color: var(--gold-100); }

.promo-list { display: flex; flex-direction: column; gap: 20px; }
.promo-list-item {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-left: 5px solid var(--slate-200);
}
.promo-list-item.is-highlight { border-left-color: var(--gold-500); }
.promo-hot { position: absolute; top: -10px; left: 24px; }
.promo-project-tag { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--gold-600); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.promo-list-content h2 { font-size: 1.2rem; margin-bottom: 6px; }
.promo-terms { font-size: .78rem; color: var(--slate-500); margin: 6px 0; }
.promo-valid { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--slate-500); margin: 0; }
.promo-valid svg { width: 14px; height: 14px; }
.promo-list-actions { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }

/* ==========================================================================
   Page banner (houses / promotions / contact)
   ========================================================================== */
.page-banner { background: var(--navy-800); color: var(--white); padding: 70px 0 50px; }
.page-banner h1 { color: var(--white); font-size: 2.1rem; }
.page-banner-lead { color: rgba(255,255,255,.78); max-width: 640px; margin: 0; }

/* ==========================================================================
   Filter bar
   ========================================================================== */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.filter-btn {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-700);
  font-size: .85rem;
  font-weight: 500;
}
.filter-btn.active, .filter-btn:hover { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }

/* ==========================================================================
   Project detail page
   ========================================================================== */
.detail-hero { position: relative; background-size: cover; background-position: center; padding: 130px 0 60px; color: var(--white); }
.detail-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg, var(--navy-800) 0%, rgba(19,41,75,0) 100%);
  z-index: 0;
}
.detail-hero > .container { position: relative; z-index: 1; }
.breadcrumb { display: flex; gap: 8px; font-size: .82rem; color: rgba(255,255,255,.7); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--gold-500); }
.detail-hero h1 { color: var(--white); font-size: 2.3rem; margin: 12px 0 6px; }
.detail-hero-tagline { color: rgba(255,255,255,.85); font-size: 1.05rem; }
.detail-hero-location { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.75); font-size: .9rem; }
.detail-hero-location svg { width: 15px; height: 15px; color: var(--gold-500); }

.detail-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; }
.detail-block { margin-bottom: 44px; }
.detail-block h2 { font-size: 1.4rem; margin-bottom: 16px; }

.quick-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0 14px; }
.quick-facts > div { background: var(--white); border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow-sm); text-align: center; }
.quick-facts .label { display: block; font-size: .74rem; color: var(--slate-500); margin-bottom: 4px; }
.quick-facts .value { display: block; font-weight: 700; color: var(--navy-800); }
.progress-bar { height: 8px; background: var(--slate-200); border-radius: 999px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--gold-500); }

.house-type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.house-type-card { background: var(--white); border: 1px solid var(--slate-100); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm); }
.house-type-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.house-type-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: -8px -8px 16px; }
/* floor plans are shown whole (never cropped or zoomed), unlike the photo thumbs they share the lightbox with */
.house-type-plans .house-type-plan { border: 1px solid var(--slate-100); padding: 0; background: #faf8f4; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; aspect-ratio: 1; }
.house-type-plans .house-type-plan img { display: block; width: 100%; height: 100%; object-fit: contain; transform: none; }
.house-type-plans .house-type-plan.is-main { grid-column: 1 / -1; aspect-ratio: auto; }
.house-type-plans .house-type-plan.is-main img { height: auto; }
.house-type-plans .house-type-plan:hover img { transform: none; filter: brightness(1.03); }
.house-type-price { color: var(--gold-600); font-weight: 700; font-size: 1.1rem; margin-bottom: 12px; }
.house-type-card ul { display: flex; flex-direction: column; gap: 8px; }
.house-type-card li { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--slate-700); }
.house-type-card li svg { width: 15px; height: 15px; color: var(--gold-600); flex-shrink: 0; }
.house-type-specs { gap: 10px !important; }
.house-type-specs li { gap: 10px; font-size: .92rem; }
.spec-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; background: var(--gold-100); flex-shrink: 0; }
.house-type-card .spec-icon svg { width: 18px; height: 18px; color: var(--gold-600); stroke-width: 1.7; }

.amenity-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.amenity-item { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow-sm); font-size: .9rem; }
.amenity-icon { display: inline-flex; width: 34px; height: 34px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; background: var(--gold-100); color: var(--gold-600); }
.amenity-icon svg { width: 17px; height: 17px; }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery-thumb { border: none; padding: 0; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 3; background: var(--slate-100); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-thumb:hover img { transform: scale(1.08); }

.detail-sidebar { position: sticky; top: 104px; }
.sidebar-card { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: 28px; }
.sidebar-card .label { font-size: .8rem; color: var(--slate-500); }
.sidebar-price { font-size: 1.6rem; font-weight: 700; color: var(--navy-800); margin: 4px 0 10px; }
.sidebar-note { font-size: .85rem; color: var(--slate-500); margin: 14px 0; }
.sidebar-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

.not-found { text-align: center; padding: 40px 0; }

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 31, 56, .94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 78vh; border-radius: var(--radius-sm); display: block; }
.lightbox-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lightbox-caption { color: #fff; font-size: 1.05rem; font-weight: 500; text-align: center; max-width: 90vw; padding: 6px 16px; border-radius: 999px; background: rgba(255,255,255,.1); }
.lightbox-caption[hidden] { display: none; }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,.12);
  border: none;
  color: var(--white);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close svg, .lightbox-prev svg, .lightbox-next svg { width: 20px; height: 20px; }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%) rotate(180deg); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: var(--gold-500); color: var(--navy-900); }

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-info-card { display: flex; gap: 14px; align-items: flex-start; background: var(--white); border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-sm); }
.icon-badge { display: inline-flex; width: 42px; height: 42px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 50%; background: var(--navy-800); color: var(--gold-500); }
.icon-badge svg { width: 18px; height: 18px; }
.contact-info-card h3 { font-size: .95rem; margin-bottom: 2px; }
.contact-info-card p { margin: 0; font-size: .88rem; color: var(--slate-500); }
.contact-info-card a:hover { color: var(--gold-600); }

.map-placeholder {
  margin-top: 4px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: rgba(255,255,255,.75);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: .85rem;
}
.map-placeholder svg { width: 30px; height: 30px; color: var(--gold-500); }

.contact-form-wrap { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 32px; }
.contact-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: .86rem; font-weight: 500; color: var(--navy-800); }
.required { color: var(--danger); }
.form-row input, .form-row select, .form-row textarea {
  padding: 12px 14px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .92rem;
  background: var(--cream-50);
  color: var(--slate-900);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  background: var(--white);
}
.field-error { color: var(--danger); font-size: .8rem; }

.alert { display: flex; gap: 14px; align-items: flex-start; background: var(--success-bg); color: var(--success); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 20px; }
.alert svg { width: 22px; height: 22px; flex-shrink: 0; }
.alert h3 { color: var(--success); margin-bottom: 2px; font-size: 1rem; }
.alert p { margin: 0; font-size: .88rem; }

/* ==========================================================================
   CTA banner & footer
   ========================================================================== */
.cta-banner { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: var(--white); padding: 48px 0; }
.cta-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-banner h2 { color: var(--white); margin-bottom: 4px; font-size: 1.5rem; }
.cta-banner p { margin: 0; color: rgba(255,255,255,.75); }

.site-footer { background: var(--navy-900); color: rgba(255,255,255,.75); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 40px; }
.footer-col h3 { color: var(--white); font-size: 1rem; margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: .88rem; }
.footer-col a:hover { color: var(--gold-500); }
.brand-footer { margin-bottom: 14px; }
.brand-footer .brand-name { color: var(--white); }
.footer-brand p { font-size: .86rem; margin: 10px 0 16px; }
.social-links { display: flex; gap: 10px; }
.social-links a { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.08); }
.social-links a:hover { background: var(--gold-500); color: var(--navy-900); }
.social-links svg { width: 17px; height: 17px; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; font-size: .86rem; }
.footer-contact svg { width: 15px; height: 15px; margin-top: 3px; color: var(--gold-500); flex-shrink: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; text-align: center; font-size: .8rem; color: rgba(255,255,255,.5); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
  .house-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-grid { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .quick-facts { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    inset: 84px 0 0 0;
    background: var(--white);
    padding: 20px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 90;
    overflow-y: auto;
  }
  .main-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { padding: 14px 16px; font-size: 1.05rem; }
  .nav-toggle { display: flex; }
  .header-actions .btn-gold.btn-sm { display: none; }

  .hero { padding: 90px 0 60px; }
  .hero h1 { font-size: calc(2rem * var(--hero-title-scale, 1)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .house-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .house-type-grid { grid-template-columns: 1fr; }
  .amenity-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-facts { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .promo-list-item { flex-direction: column; align-items: flex-start; }
  .promo-list-actions { flex-direction: row; }
  .cta-banner-inner { text-align: center; justify-content: center; flex-direction: column; }
}

@media (max-width: 480px) {
  .header-inner { height: 72px; }
  .brand-logo { width: 44px; height: 44px; }
  .brand-sub { display: none; }
  .hero h1 { font-size: calc(1.6rem * var(--hero-title-scale, 1)); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox-prev, .lightbox-next { width: 38px; height: 38px; }
}

/* map embed on contact page (admin: map_embed_url) */
.map-embed { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.map-embed iframe { display: block; width: 100%; height: 280px; border: 0; }
.detail-location { display: flex; gap: 8px; align-items: flex-start; color: var(--slate-500); margin-bottom: 14px; }
.detail-location svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; color: var(--gold-600); }
.detail-map iframe { height: 420px; }
.detail-map-open { margin-top: 14px; }
.detail-map-open svg { width: 16px; height: 16px; }
@media (max-width: 640px) { .detail-map iframe { height: 300px; } }

/* ==========================================================================
   Site plan + units (บ้านรายหลัง)
   ========================================================================== */
.units-summary { color: var(--slate-500); margin-bottom: 14px; }
.plan-wrap { position: relative; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--slate-100); }
.plan-img { width: 100%; display: block; }
.plan-dot { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; }
.plan-dot span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--navy-900); background: rgba(255,255,255,.92); padding: 1px 8px; border-radius: 6px; white-space: nowrap; text-align: center; line-height: 1.2; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.plan-dot-status { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 5px; background: inherit; color: #fff; font-style: normal; font-size: 12px; font-weight: 600; line-height: 1.3; padding: 2px 8px; border-radius: 999px; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.plan-dot span small { display: block; font-size: 11px; font-weight: 400; color: var(--slate-500); }
.plan-dot.is-active { outline: 3px solid var(--gold-500); outline-offset: 2px; }
/* status colours — only on dots, badges and legend swatches (never on table rows) */
.plan-dot.u-empty, .unit-status.u-empty, .unit-pop-status.u-empty, .plan-legend-item i.u-empty { background: #3aa76d; }
.plan-dot.u-building, .unit-status.u-building, .unit-pop-status.u-building, .plan-legend-item i.u-building { background: #e0a83a; }
.plan-dot.u-ready, .unit-status.u-ready, .unit-pop-status.u-ready, .plan-legend-item i.u-ready { background: #2f7fd6; }
.plan-dot.u-reserved, .unit-status.u-reserved, .unit-pop-status.u-reserved, .plan-legend-item i.u-reserved { background: #9a9aa5; }
.plan-dot.u-sold, .unit-status.u-sold, .unit-pop-status.u-sold, .plan-legend-item i.u-sold { background: #6b6b75; }
.plan-dot.u-transferred, .unit-status.u-transferred, .unit-pop-status.u-transferred, .plan-legend-item i.u-transferred { background: #3d3d45; }
.unit-row.u-sold td, .unit-row.u-reserved td, .unit-row.u-transferred td { color: var(--slate-500); }
.unit-build { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .88rem; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 12px 0 4px; font-size: 14px; color: var(--slate-700); }
.plan-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.plan-legend-item i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--slate-200); }
.plan-hint { font-size: 13px; color: var(--slate-500); margin-bottom: 16px; }
.unit-pop { position: absolute; left: 12px; bottom: 12px; max-width: 320px; width: calc(100% - 24px); background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 14px 16px; z-index: 3; }
.unit-pop-close { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--slate-500); cursor: pointer; }
.unit-pop-code { display: block; font-size: 20px; color: var(--navy-900); }
.unit-pop-status { display: inline-block; font-size: 13px; padding: 2px 10px; border-radius: 99px; color: #fff; margin: 4px 0 8px; }
.unit-pop-facts { margin: 0 0 10px; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 14px; }
.unit-pop-facts dt { color: var(--slate-500); }
.unit-pop-facts dd { margin: 0; color: var(--slate-900); }
.unit-table-wrap { overflow-x: auto; }
.unit-table-wrap[hidden], .unit-table .unit-row[hidden] { display: none !important; }
.unit-table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
.unit-table th, .unit-table td { padding: 10px 12px; border-bottom: 1px solid var(--slate-200); text-align: left; vertical-align: middle; white-space: nowrap; }
.unit-table th { background: var(--slate-100); color: var(--slate-500); font-weight: 500; font-size: 12px; }
.unit-table .muted { color: var(--slate-500); }
.unit-code { font-weight: 600; color: var(--navy-900); }
.unit-status { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 99px; color: #fff; }
.unit-progress { display: inline-block; width: 70px; height: 6px; background: var(--slate-200); border-radius: 99px; margin: 0 6px 0 8px; vertical-align: middle; overflow: hidden; }
.unit-progress i { display: block; height: 100%; background: var(--gold-500); }
.unit-row.is-active td { background: var(--gold-100); }
/* grid children must be allowed to shrink, otherwise a wide table stretches the whole page */
.detail-layout > * { min-width: 0; }
.detail-block { min-width: 0; }
/* dense plans (thin strips of plots): name + size to the left of the dot, status to the right, all on one line */
.plan-dense .plan-dot span { top: 50%; left: auto; right: 100%; transform: translateY(-50%); margin: 0 5px 0 0; }
.plan-dense .plan-dot span small { display: inline; margin-left: 4px; }
.plan-dense .plan-dot-status { bottom: auto; top: 50%; left: 100%; transform: translateY(-50%); margin: 0 0 0 5px; }
/* dots near the left edge flip sides so the name doesn't run off the plan */
.plan-dense .plan-dot.is-left span { right: auto; left: 100%; margin: 0 0 0 5px; }
.plan-dense .plan-dot.is-left .plan-dot-status { left: auto; right: 100%; margin: 0 5px 0 0; }
@media (max-width: 640px) {
  .plan-dot { width: 22px; height: 22px; }
  .plan-dot span { font-size: 10px; padding: 0 4px; }
  .plan-dot span small { font-size: 9px; display: inline; margin-left: 4px; }
  .plan-dot-status { font-size: 9px; padding: 1px 6px; margin-bottom: 3px; }
  .plan-dense .plan-dot { width: 16px; height: 16px; border-width: 2px; }
  .plan-dense .plan-dot-status { margin: 0 0 0 4px; }
  .unit-pop { left: 8px; right: 8px; bottom: 8px; width: auto; max-width: none; }
  /* unit table → stacked cards */
  .unit-table, .unit-table tbody, .unit-table tr, .unit-table td { display: block; }
  .unit-table thead { display: none; }
  .unit-table { background: none; }
  .unit-row { background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 10px 14px; margin-bottom: 10px; }
  .unit-row td { border: 0; padding: 4px 0; white-space: normal; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
  .unit-row td::before { content: attr(data-label); color: var(--slate-500); font-size: 12px; flex: 0 0 auto; }
  .unit-row td.unit-code { font-size: 1.05rem; padding-bottom: 6px; border-bottom: 1px solid var(--slate-100); margin-bottom: 4px; }
  .unit-row td.unit-code::before { content: 'แปลง'; }
  .unit-row td.unit-cta { justify-content: flex-end; padding-top: 8px; }
  .unit-row td.unit-cta::before { content: none; }
  .unit-row td.unit-cta .btn { width: 100%; justify-content: center; }
  .unit-row.is-active { outline: 2px solid var(--gold-500); }
}

/* showcase: hero photo + 2 supporting photos at the top of a project page */
.showcase { display: grid; gap: 10px; margin-bottom: 28px; position: relative; }
.showcase-all { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.95); color: var(--navy-900); font-size: .9rem; font-weight: 600; box-shadow: 0 2px 10px rgba(0,0,0,.25); text-decoration: none; }
.showcase-all svg { width: 16px; height: 16px; }
.showcase-all:hover { background: #fff; }
#gallery { scroll-margin-top: 90px; }
html { scroll-behavior: smooth; }
.showcase.has-side { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.showcase-item { border: 0; padding: 0; background: var(--slate-100); border-radius: var(--radius-md); overflow: hidden; cursor: zoom-in; box-shadow: var(--shadow-sm); }
.showcase-item img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4 / 3; }
.showcase.has-side .showcase-main { grid-row: 1 / 3; }
.showcase.has-side .showcase-main img { aspect-ratio: auto; }
.showcase-item:hover img { filter: brightness(1.04); }
@media (max-width: 720px) {
  .showcase.has-side { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .showcase.has-side .showcase-main { grid-column: 1 / 3; grid-row: 1; }
}

/* house card: price chip + optional 3 small thumbnails over the cover (admin: card_style) */
.card-price { position: absolute; left: 12px; bottom: 12px; background: rgba(15,31,56,.88); color: var(--gold-400, #e2b55e); font-weight: 600; font-size: .9rem; padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(4px); }
.card-thumbs { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.card-thumbs img { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); transition: none !important; transform: none !important; }
.house-card-media .card-cover { transform-origin: center; }
.house-card:hover .house-card-media .card-thumbs img { transform: none; }
.house-card-price .value { font-size: .9rem; }
@media (max-width: 480px) { .card-thumbs img { width: 44px; height: 34px; } }
