/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { margin: 0; padding: 0; list-style: none; }
img, picture { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

:root {
  /* Deep navy + gold, matching the Charkop Crest Realty brand mark. */
  --color-primary: #16215c;
  --color-primary-dark: #0a1440;
  --color-primary-light: #e8eaf6;
  --color-accent: #c8952f;
  --color-text: #1a1d2e;
  --color-text-muted: #454a68;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f5fa;
  --color-border: #dcdfec;
  /* Light text tints for content sitting on the dark navy (hero, footer,
     admin sidebar) -- kept as named tokens rather than one-off hex values
     so the whole dark-surface palette stays consistent and themeable. */
  --color-on-dark-soft: #c7cef0;
  --color-on-dark-muted: #8890c2;
  --color-danger: #b3261e;
  --color-danger-bg: #fce8e6;
  --color-success: #1e7a4c;
  --color-success-bg: #e6f4ea;
  --color-warning: #8a5b00;
  --color-warning-bg: #fdf2dc;
  --gradient-brand: linear-gradient(135deg, #26307a 0%, #16215c 55%, #0a1440 100%);
  --gradient-gold: linear-gradient(135deg, #e2b25a 0%, #c8952f 100%);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 3px rgba(10, 20, 64, 0.08);
  --shadow-md: 0 8px 24px rgba(10, 20, 64, 0.14);
  --shadow-glow: 0 10px 30px rgba(22, 33, 92, 0.28);
  --shadow-glow-gold: 0 10px 26px rgba(200, 149, 47, 0.35);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --max-width: 1180px;
  font-size: 16px;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background:
    radial-gradient(circle, rgba(22, 33, 92, 0.05) 1px, transparent 1px) 0 0 / 26px 26px,
    var(--color-bg-alt);
  line-height: 1.55;
}

h1, h2, h3, h4 { line-height: 1.2; color: var(--color-text); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 1.5rem + 1.5vw, 2.6rem); }
.text-gradient {
  background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text;
  color: var(--color-primary); /* fallback for browsers without background-clip: text */
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .text-gradient { color: transparent; }
}
h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 1.9rem); }
h3 { font-size: 1.2rem; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-4); }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--color-primary);
  color: #fff; padding: var(--space-2) var(--space-4); z-index: 1000; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--color-accent); outline-offset: 2px;
}

/* ---------- Header ---------- */
/* Deliberately edge-to-edge (not wrapped in .container) so the nav sits at
   the true top-right corner of the viewport on any screen, instead of the
   right edge of the 1180px content column with dead space beyond it. */
.site-header { background: var(--color-bg); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 100; }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) clamp(14px, 4vw, 64px);
}
.brand {
  display: inline-flex; align-items: center; gap: 12px; font-weight: 900;
  font-size: clamp(1.15rem, 1rem + 1.4vw, 1.85rem); letter-spacing: -0.01em;
  color: var(--color-primary); text-decoration: none; flex: 0 1 auto; min-width: 0;
}
.brand__logo { width: clamp(38px, 4vw, 60px); height: clamp(38px, 4vw, 60px); object-fit: contain; border-radius: 10px; flex: 0 0 auto; }
.brand__name { line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-nav { display: none; gap: clamp(12px, 2vw, 24px); align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a { text-decoration: none; font-weight: 600; color: var(--color-text); white-space: nowrap; }
.main-nav a:hover { color: var(--color-primary); }
.nav-greeting {
  background: var(--color-primary-light); color: var(--color-primary-dark) !important;
  padding: 6px 14px; border-radius: 999px; font-weight: 700;
}
.mobile-nav a.nav-greeting { background: var(--color-primary-light); }

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: transparent; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
}
.nav-toggle span { display: block; height: 2px; width: 20px; background: var(--color-text); margin: 0 auto; }
.mobile-nav { display: flex; flex-direction: column; background: var(--color-bg); border-top: 1px solid var(--color-border); }
.mobile-nav a { padding: var(--space-3) var(--space-4); text-decoration: none; border-bottom: 1px solid var(--color-border); font-weight: 600; }
.mobile-nav[hidden] { display: none; }

@media (min-width: 860px) {
  .main-nav { display: flex; }
  .nav-toggle, .mobile-nav { display: none; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Category nav (Buy/Rent/Mortgage/Agents/Rentals/Advertise/Help) ---------- */
/* Edge-to-edge like .site-header__inner, with matching horizontal padding,
   so this row lines up with the logo/nav above it on every screen size
   instead of sitting in a narrower centered column. */
.category-nav { background: var(--color-bg); border-bottom: 1px solid var(--color-border); }
.category-nav__inner {
  display: flex; gap: var(--space-2); overflow-x: auto;
  padding: var(--space-2) clamp(14px, 4vw, 64px);
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.category-nav__inner a {
  text-decoration: none; font-weight: 700; font-size: clamp(0.86rem, 0.8rem + 0.3vw, 0.95rem); color: var(--color-text);
  white-space: nowrap; padding: 7px 14px; border-radius: 999px; transition: background 0.15s ease, color 0.15s ease;
}
.category-nav__inner a:hover { color: var(--color-primary); background: var(--color-primary-light); }

/* ---------- Flash messages ---------- */
.flash-stack { margin-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.flash { padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); font-weight: 600; }
.flash--success { background: var(--color-success-bg); color: var(--color-success); }
.flash--error { background: var(--color-danger-bg); color: var(--color-danger); }
.flash--warning { background: var(--color-warning-bg); color: var(--color-warning); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-sm); border: 2px solid transparent;
  font-weight: 700; text-decoration: none; font-size: 0.95rem;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gradient-brand); color: #fff; box-shadow: 0 4px 14px rgba(22, 33, 92, 0.22); }
.btn-primary:hover { box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.btn-secondary { background: #fff; color: var(--color-primary); border-color: var(--color-primary); }
.btn-secondary:hover { background: var(--color-primary-light); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: #8f1d17; }
.btn-ghost { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-block { width: 100%; }
.btn-sm { padding: var(--space-2) var(--space-3); font-size: 0.85rem; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------- Hero / landing ---------- */
.hero {
  position: relative; color: var(--color-text); padding: var(--space-7) 0; overflow: hidden;
  background: var(--color-bg);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px); z-index: 0; pointer-events: none;
}
.hero::before {
  width: 480px; height: 480px; top: -220px; right: -140px;
  background: radial-gradient(circle, rgba(200, 149, 47, 0.28) 0%, rgba(200, 149, 47, 0) 70%);
}
.hero::after {
  width: 560px; height: 560px; bottom: -300px; left: -220px;
  background: radial-gradient(circle, rgba(22, 33, 92, 0.16) 0%, rgba(22, 33, 92, 0) 70%);
}
.hero__inner { position: relative; z-index: 1; display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 860px) {
  .hero__inner { grid-template-columns: 1.15fr 0.85fr; }
}
.hero h1 { color: var(--color-text); }
.hero p { color: var(--color-text-muted); font-size: 1.1rem; max-width: 60ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
.hero__visual { display: none; }
.hero__visual img {
  width: 100%; height: auto; filter: drop-shadow(0 20px 34px rgba(22, 33, 92, 0.18));
}
@media (min-width: 860px) { .hero__visual { display: block; } }
.hero-guest-cta {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: var(--gradient-gold); color: #241505; font-weight: 800;
  padding: var(--space-3) var(--space-6); border-radius: var(--radius-md); text-decoration: none;
  font-size: 1.05rem; box-shadow: var(--shadow-glow-gold);
}
.hero-guest-cta:hover { filter: brightness(1.04); transform: translateY(-1px); }

.hero-badges {
  display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-5);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--color-border);
  border-radius: 999px; padding: 7px 14px; font-size: 0.82rem; font-weight: 700; color: var(--color-text);
  box-shadow: var(--shadow-sm);
}
.hero-badge__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); flex: 0 0 auto; }

.hero-search {
  display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4);
  background: #fff; padding: var(--space-2); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border); max-width: 640px;
}
.hero-search input {
  flex: 1 1 260px; min-width: 0; padding: 12px 16px; border: none; border-radius: var(--radius-sm);
  font-size: 1rem; color: var(--color-text);
}
.hero-search input:focus { outline: 2px solid var(--color-primary-light); }
.hero-search .btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; }
.hero-search .btn svg { width: 16px; height: 16px; }

.hero-choice {
  display: flex; align-items: stretch; gap: var(--space-4); margin-top: var(--space-5);
  flex-wrap: wrap;
}
.hero-choice__option {
  flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.hero-choice__option--guest { background: var(--color-accent); color: #241505; border-color: transparent; }
.hero-choice__option--user { background: #fff; color: var(--color-text); }
.hero-choice__option:hover { filter: brightness(1.03); box-shadow: var(--shadow-md); }
.hero-choice__label { font-weight: 800; font-size: 1.1rem; }
.hero-choice__hint { font-size: 0.85rem; opacity: 0.85; }
.hero-choice__or {
  display: flex; align-items: center; justify-content: center; color: var(--color-text-muted);
  font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em;
  flex: 0 0 auto;
}
.hero__signup-hint { color: var(--color-text-muted); margin-top: var(--space-3); font-size: 0.92rem; }
.hero__signup-hint a { color: var(--color-primary); font-weight: 700; }

.action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
@media (min-width: 860px) { .action-grid { grid-template-columns: repeat(4, 1fr); } }
.action-tile {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-decoration: none;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-4) var(--space-3); color: var(--color-text);
  box-shadow: var(--shadow-sm);
}
.action-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.action-tile__icon {
  width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--gradient-gold); color: #241505;
}
.action-tile__icon svg { width: 22px; height: 22px; }
.action-tile__label { font-weight: 700; letter-spacing: 0.02em; }
/* Cycle each action tile's icon through the brand palette so the row reads
   as one deliberate set of accents rather than four repeats of gold. */
.action-tile:nth-child(2) .action-tile__icon { background: var(--gradient-brand); color: #fff; }
.action-tile:nth-child(3) .action-tile__icon { background: linear-gradient(135deg, #2f9e6b 0%, #1e7a4c 100%); color: #fff; }
.action-tile:nth-child(4) .action-tile__icon { background: linear-gradient(135deg, #3b57c9 0%, #26307a 100%); color: #fff; }

.option-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
@media (min-width: 860px) { .option-grid { grid-template-columns: repeat(5, 1fr); } }
.option-tile {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center;
  text-decoration: none; color: var(--color-text); background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-5) var(--space-3); box-shadow: var(--shadow-sm);
}
.option-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.option-tile__icon {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--gradient-brand); color: #fff;
}
.option-tile__icon svg { width: 26px; height: 26px; }
.option-tile:nth-child(2) .option-tile__icon { background: var(--gradient-gold); color: #241505; }
.option-tile:nth-child(3) .option-tile__icon { background: linear-gradient(135deg, #3b57c9 0%, #26307a 100%); color: #fff; }
.option-tile:nth-child(4) .option-tile__icon { background: linear-gradient(135deg, #2f9e6b 0%, #1e7a4c 100%); color: #fff; }
.option-tile:nth-child(5) .option-tile__icon { background: linear-gradient(135deg, #b0562f 0%, #8a3f1f 100%); color: #fff; }
.option-tile__label { font-weight: 700; font-size: 0.92rem; }

.section { padding: var(--space-7) 0; }

.legal-page { max-width: 760px; margin: 0 auto; }
.legal-page h2 { margin-top: var(--space-6); font-size: 1.2rem; }
.legal-page p, .legal-page li { color: var(--color-text); line-height: 1.7; }
.legal-page ul { padding-left: 1.4em; list-style: disc; margin-top: var(--space-2); }
.legal-page li { margin-bottom: var(--space-2); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); flex-wrap: wrap; }
.section-footer-cta { display: flex; justify-content: center; margin-top: var(--space-6); }

/* ---------- Property grid & cards ---------- */
.property-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.property-card {
  background: var(--color-bg); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; position: relative;
}
.property-card:hover { box-shadow: var(--shadow-glow); border-color: rgba(200, 149, 47, 0.4); }
.property-card__link { text-decoration: none; color: var(--color-text); display: flex; flex-direction: column; flex: 1; }
.property-card__image { aspect-ratio: 4 / 3; background: var(--color-bg-alt); position: relative; overflow: hidden; }
.property-card__image img { width: 100%; height: 100%; object-fit: cover; }
.property-card__image::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 55%; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 20, 64, 0) 0%, rgba(10, 20, 64, 0.32) 100%);
}
.property-card__badge {
  position: absolute; top: var(--space-2); left: var(--space-2); background: var(--gradient-gold); color: #241505;
  font-weight: 700; font-size: 0.78rem; padding: 3px 10px; border-radius: 999px; z-index: 1; box-shadow: var(--shadow-sm);
}
.property-card__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.property-card__price {
  font-weight: 800; font-size: 1.25rem;
  background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: var(--color-primary-dark);
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .property-card__price { color: transparent; }
}
.property-card__title { font-size: 1rem; font-weight: 700; }
.property-card__meta { display: flex; gap: var(--space-4); color: var(--color-text-muted); font-size: 0.9rem; }
.property-card__location { color: var(--color-text-muted); font-size: 0.9rem; }

/* ---------- Status / stage badges ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.badge-available, .badge-new { background: var(--color-success-bg); color: var(--color-success); }
.badge-sold, .badge-closed { background: #e6e6e6; color: #4a4a4a; }
.badge-rented, .badge-qualified { background: var(--color-primary-light); color: var(--color-primary-dark); }
.badge-inactive, .badge-spam { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-contacted { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-pending { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-approved { background: var(--color-success-bg); color: var(--color-success); }
.badge-rejected { background: var(--color-danger-bg); color: var(--color-danger); }

/* ---------- Filter bar ---------- */
.filter-bar { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-4); margin-bottom: var(--space-5); }
.filter-bar form { display: grid; gap: var(--space-3); grid-template-columns: 1fr; }
.filter-bar .field { display: flex; flex-direction: column; gap: 4px; }
.filter-bar label { font-size: 0.85rem; font-weight: 700; color: var(--color-text-muted); }
@media (min-width: 860px) {
  .filter-bar form { grid-template-columns: 2fr 1fr 1fr 1fr auto; align-items: end; }
}

/* ---------- Forms ---------- */
.form-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-5); max-width: 640px; }
.field { margin-bottom: var(--space-4); display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; font-size: 0.92rem; }
.field .hint { font-size: 0.86rem; color: var(--color-text-muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="search"], textarea, select {
  padding: var(--space-3); border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  background: #fff; width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--color-primary); }
.field-error input, .field-error textarea, .field-error select { border-color: var(--color-danger); }
.field-error-message { color: var(--color-danger); font-size: 0.85rem; font-weight: 600; }
.checkbox-field { display: flex; align-items: flex-start; gap: var(--space-2); flex-direction: row; }
.checkbox-field input { width: auto; margin-top: 4px; }
.honeypot-field { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }
.privacy-note { font-size: 0.86rem; color: var(--color-text-muted); background: var(--color-bg-alt); padding: var(--space-3); border-radius: var(--radius-sm); }

.otp-code-input { letter-spacing: 8px; font-size: 1.4rem; text-align: center; font-weight: 700; }

.password-field { position: relative; }
.password-field input { padding-right: 44px; }
.password-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; background: transparent; border: none; border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}
.password-toggle:hover { background: var(--color-bg-alt); color: var(--color-text); }
.password-toggle svg { width: 20px; height: 20px; }
.password-toggle__hide { display: none; }
.password-toggle[aria-pressed="true"] .password-toggle__show { display: none; }
.password-toggle[aria-pressed="true"] .password-toggle__hide { display: block; }

/* ---------- Property detail ---------- */
.property-detail__header { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4); flex-wrap: wrap; }
.gallery { display: grid; gap: var(--space-2); grid-template-columns: 1fr; margin-bottom: var(--space-5); }
.gallery__main { aspect-ratio: 16/9; background: var(--color-bg-alt); border-radius: var(--radius-md); overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: var(--space-2); overflow-x: auto; }
.gallery__thumbs img { width: 84px; height: 64px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; border: 2px solid transparent; }
.gallery__thumbs img.active { border-color: var(--color-primary); }

.amenity-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.amenity-chip { background: var(--color-primary-light); color: var(--color-primary-dark); padding: 6px 14px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; }

.detail-grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
@media (min-width: 860px) { .detail-grid { grid-template-columns: 2fr 1fr; align-items: start; } }
.enquiry-panel { position: sticky; top: 90px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-5); box-shadow: var(--shadow-sm); }

.whatsapp-cta { margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--color-border); }
.btn-whatsapp {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2); width: 100%;
  background: #25d366; color: #063e1f; font-weight: 700; text-decoration: none;
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-sm); margin-top: var(--space-2);
}
.btn-whatsapp:hover { filter: brightness(1.05); }
.btn-whatsapp svg { width: 20px; height: 20px; }
.whatsapp-cta .hint { font-size: 0.86rem; color: var(--color-text-muted); margin-top: var(--space-2); }

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2); width: 100%;
  background: var(--color-bg-alt); color: var(--color-text); font-weight: 700; text-decoration: none;
  padding: 14px var(--space-5); border-radius: 999px; border: none;
}
.btn-google:hover { background: var(--color-border); }
.btn-google svg { width: 20px; height: 20px; }
.auth-divider {
  display: flex; align-items: center; gap: var(--space-3); margin: var(--space-4) 0;
  color: var(--color-text-muted); font-size: 0.85rem;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }

/* ---------- Auth pages (sign in / register): pill-shaped, minimal look ---------- */
.auth-card { max-width: 440px; margin: 0 auto; border: none; box-shadow: var(--shadow-md); padding: var(--space-6); }
.auth-card h1 { text-align: center; font-size: 1.6rem; }
.auth-card .field label {
  font-size: 0.78rem; font-weight: 700; color: var(--color-text-muted);
  text-transform: uppercase; letter-spacing: 0.04em; padding-left: var(--space-2);
}
.auth-card input[type="text"], .auth-card input[type="email"], .auth-card input[type="tel"],
.auth-card .password-field input {
  border-radius: 999px; border: none; background: var(--color-bg-alt); padding: 14px 20px;
}
.auth-card .password-field input { padding-right: 48px; }
.auth-card input:focus { outline: 2px solid var(--color-primary-light); }
.auth-card .btn-primary { border-radius: 999px; padding: 14px var(--space-5); font-size: 1rem; }
.auth-card .checkbox-field { padding: 0 var(--space-2); }

/* ---------- Ad banners: side rails (desktop) + horizontal strip (everything else) ---------- */
/* Two presentations of the same slide data so an ad is visible on every
   device. Below the grid breakpoint, .page-grid is just a plain block and
   the rails stay display:none -- only the horizontal strip shows. At the
   breakpoint, .page-grid becomes a real 3-column CSS grid (rail | content
   | rail) that *reserves* the rail columns, instead of the old approach
   of guessing whether incidental empty space existed outside a fixed-width
   content column -- that guesswork is exactly what caused rails to either
   overlap content (breakpoint too low) or never appear (breakpoint raised
   to compensate). A real grid column can't overlap by construction, so the
   breakpoint only has to be wide enough for a readable center column, not
   wide enough to have "leftover" space. The rails are normal grid items
   (no fixed/absolute/sticky positioning), so they scroll away with the
   rest of the page exactly like the strip does. */
.page-grid { display: block; }
.page-grid__main { min-width: 0; }

.promo-rail {
  position: relative; border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--color-border);
}
.promo-rail--left, .promo-rail--right { display: none; width: 100%; height: 500px; }

.promo-strip-wrap { padding-top: var(--space-4); }
.promo-rail--strip { width: 100%; height: 96px; }

/* Same breakpoint as the main nav switch above (860px) -- deliberately
   the *only* structural breakpoint on the page below the phone/tablet
   boundary. One dividing line means one consistent layout for every
   screen from a small tablet up through a large monitor: nav, grid,
   and both ad placements all change together, instead of the nav
   going "desktop" at 860px while the ad layout stayed "mobile" until
   some larger, unrelated breakpoint further out. */
@media (min-width: 860px) {
  .page-grid {
    display: grid; grid-template-columns: 140px minmax(0, 1fr) 140px;
    gap: var(--space-4); align-items: start; padding: var(--space-4) var(--space-3) 0;
  }
  /* grid-template-columns is positional: with no rails to fill the outer
     tracks (admin pages, or any view rendered with show_promo_rails
     false), .page-grid__main would otherwise land in just the first
     140px track instead of spanning the row. Collapse to one full-width
     column whenever the rails aren't in the markup at all. */
  .page-grid--no-rails { display: block; padding: var(--space-4) var(--space-3) 0; }
  .promo-rail--left, .promo-rail--right { display: block; margin-top: var(--space-4); }
  /* The top strip stays visible here too, deliberately -- both
     placements run at once instead of one replacing the other. */
}

.promo-rail__slide {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  text-decoration: none; opacity: 0; pointer-events: none; background: var(--color-bg);
}
.promo-rail__slide.is-active { opacity: 1; pointer-events: auto; }
@media (prefers-reduced-motion: no-preference) {
  .promo-rail__slide { transition: opacity 0.6s ease; }
}
.promo-rail__slide img { width: 100%; height: 100%; object-fit: cover; }
.promo-rail__badge {
  position: absolute; top: 8px; left: 8px; z-index: 1; background: rgba(10, 20, 64, 0.6); color: #fff;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: 999px;
}
.promo-rail__slide--house {
  background: var(--gradient-brand); color: #fff; padding: var(--space-5) var(--space-4);
  align-items: center; justify-content: center; text-align: center; gap: var(--space-2);
}
.promo-rail__slide--house .promo-rail__badge { background: rgba(255, 255, 255, 0.2); position: static; margin-bottom: var(--space-2); }
.promo-rail__title { font-weight: 800; font-size: 1.05rem; line-height: 1.3; }
.promo-rail__subtitle { font-size: 0.85rem; color: var(--color-on-dark-soft); line-height: 1.4; }
.promo-rail__cta { margin-top: var(--space-2); font-weight: 700; font-size: 0.85rem; color: var(--color-accent); }

/* Horizontal strip layout: row instead of the rail's centered column, and
   compact enough to fit a 90-ish px tall banner on a phone screen. */
.promo-rail--strip .promo-rail__slide--house {
  flex-direction: row; align-items: center; justify-content: flex-start;
  text-align: left; gap: var(--space-3); padding: var(--space-3) var(--space-4);
}
.promo-rail--strip .promo-rail__slide--house .promo-rail__badge { position: absolute; top: 8px; left: 8px; margin-bottom: 0; }
.promo-rail--strip .promo-rail__title { font-size: 0.95rem; }
.promo-rail--strip .promo-rail__subtitle { display: none; }
.promo-rail--strip .promo-rail__cta { margin-top: 0; white-space: nowrap; }
@media (min-width: 560px) {
  .promo-rail--strip .promo-rail__subtitle { display: block; font-size: 0.82rem; }
}

/* ---------- Floating marketing button ---------- */
.marketing-fab {
  position: fixed; right: var(--space-4); bottom: var(--space-4); z-index: 200;
  background: var(--color-accent); color: #241505; font-weight: 800; text-decoration: none;
  padding: var(--space-3) var(--space-5); border-radius: 999px; box-shadow: var(--shadow-md);
  display: inline-flex; align-items: center; gap: var(--space-2); font-size: 0.9rem;
}
.marketing-fab:hover { filter: brightness(1.05); }
@media (max-width: 480px) {
  .marketing-fab { right: var(--space-3); bottom: var(--space-3); padding: var(--space-3) var(--space-4); font-size: 0.85rem; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--color-bg-alt); color: var(--color-text); border-top: 1px solid var(--color-border); padding: var(--space-6) 0 var(--space-7); margin-top: var(--space-7); }
.site-footer a { color: var(--color-primary); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer__grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
@media (min-width: 860px) { .site-footer__grid { grid-template-columns: 1.3fr 1fr; } }
.site-footer__tagline { font-weight: 700; color: var(--color-text); font-size: 1.05rem; max-width: 40ch; }
.site-footer__links { display: flex; gap: var(--space-4); margin-top: var(--space-3); flex-wrap: wrap; }
.site-footer__privacy { margin-top: var(--space-4); font-size: 0.86rem; color: var(--color-text-muted); max-width: 70ch; }
.site-footer__contact { display: flex; flex-direction: column; gap: 4px; font-size: 0.92rem; color: var(--color-text); }
.site-footer__rera { margin-top: var(--space-2); font-size: 0.86rem; color: var(--color-text-muted); }
.site-footer__whatsapp {
  display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-3);
  background: #25d366; color: #063e1f !important; font-weight: 700; padding: 8px 16px;
  border-radius: 999px; width: fit-content; text-decoration: none !important;
}
.site-footer__whatsapp:hover { filter: brightness(1.05); }
.site-footer__copyright { grid-column: 1 / -1; margin-top: var(--space-4); font-size: 0.86rem; color: var(--color-text-muted); border-top: 1px solid var(--color-border); padding-top: var(--space-4); }

/* ---------- Admin shell ---------- */
.admin-shell { display: flex; min-height: calc(100vh - 130px); }
.admin-sidebar { width: 230px; background: var(--color-primary-dark); color: var(--color-on-dark-soft); padding: var(--space-5) var(--space-3); display: none; }
.admin-sidebar a { display: block; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--color-on-dark-soft); text-decoration: none; font-weight: 600; margin-bottom: 2px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.12); color: #fff; }
.admin-content { flex: 1; padding: var(--space-5); min-width: 0; }
@media (min-width: 900px) { .admin-sidebar { display: block; } }
.admin-mobile-nav { display: flex; gap: var(--space-2); overflow-x: auto; padding: var(--space-3); background: var(--color-primary-dark); }
.admin-mobile-nav a { color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; padding: 6px 10px; border-radius: var(--radius-sm); }
@media (min-width: 900px) { .admin-mobile-nav { display: none; } }

.stat-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: var(--space-6); }
.stat-card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-4); }
.stat-card__value { font-size: 1.8rem; font-weight: 800; color: var(--color-primary-dark); }
.stat-card__label { color: var(--color-text-muted); font-size: 0.85rem; font-weight: 600; }

.data-table-wrap { overflow-x: auto; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table.data-table { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data-table th, table.data-table td { text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); font-size: 0.92rem; }
table.data-table th { background: var(--color-bg-alt); font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.03em; }
table.data-table tr:last-child td { border-bottom: none; }

.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.toolbar form { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.pagination { display: flex; gap: var(--space-2); margin-top: var(--space-4); }
.pagination a, .pagination span { padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--color-border); text-decoration: none; }
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

.image-manager { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.image-manager__item { position: relative; width: 120px; }
.image-manager__item img { width: 120px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-border); }
.image-manager__item button { position: absolute; top: -8px; right: -8px; background: var(--color-danger); color: #fff; border: none; border-radius: 50%; width: 24px; height: 24px; }

.card { background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-5); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.text-muted { color: var(--color-text-muted); }
.note-list { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-3); }
.note-item { background: var(--color-bg-alt); border-radius: var(--radius-sm); padding: var(--space-3); }
.note-item__meta { font-size: 0.86rem; color: var(--color-text-muted); margin-top: 4px; }

.qr-box { background: #fff; padding: var(--space-4); border-radius: var(--radius-md); display: inline-block; border: 1px solid var(--color-border); }

.empty-state { text-align: center; padding: var(--space-7) var(--space-4); color: var(--color-text-muted); }

.property-map { width: 100%; height: 60vh; min-height: 380px; border-radius: var(--radius-md); border: 1px solid var(--color-border); margin-top: var(--space-4); }

.favorite-toggle {
  display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--color-border);
  border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 0.85rem; color: var(--color-text);
}
.favorite-toggle[data-active="true"] { border-color: var(--color-accent); color: #8a5b1a; background: #fdf2dc; }
.property-card__favorite {
  position: absolute; top: var(--space-2); right: var(--space-2); background: rgba(255,255,255,0.92);
  border: none; border-radius: 50%; width: 32px; height: 32px; font-size: 1rem; line-height: 1;
  transition: transform 0.15s ease;
}
.property-card__favorite:hover { transform: scale(1.15); }
.property-card__favorite.is-updating { opacity: 0.5; pointer-events: none; }

/* ==================================================================
   Motion & dynamic UI: transitions, reveal-on-scroll, live states
   ================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .property-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .property-card:hover { transform: translateY(-4px); }
  .property-card__image img { transition: transform 0.35s ease; }
  .property-card:hover .property-card__image img { transform: scale(1.06); }

  .btn, .hero-guest-cta, .hero-choice__option, .marketing-fab, .favorite-toggle, .action-tile, .option-tile {
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, filter 0.15s ease;
  }
  .hero-choice__option:hover, .marketing-fab:hover, .hero-guest-cta:hover { transform: translateY(-2px); }

  [data-reveal] {
    opacity: 0; transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
}

/* Flash messages: slide/fade in, dismissible, auto-fade out via JS */
.flash-stack { position: relative; }
.flash {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  animation: flash-in 0.3s ease; overflow: hidden;
}
.flash.is-leaving { animation: flash-out 0.3s ease forwards; }
.flash__dismiss {
  background: transparent; border: none; font-size: 1.1rem; line-height: 1; padding: 0 0 0 var(--space-3);
  color: inherit; opacity: 0.6;
}
.flash__dismiss:hover { opacity: 1; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes flash-out { from { opacity: 1; max-height: 60px; } to { opacity: 0; max-height: 0; margin: 0; padding-top: 0; padding-bottom: 0; } }

/* Live search/filter loading state */
.results-loading { position: relative; min-height: 120px; }
.results-loading .property-grid,
.results-loading .empty-state { opacity: 0.4; transition: opacity 0.15s ease; pointer-events: none; }
.results-spinner {
  display: none; position: absolute; top: var(--space-5); left: 50%; transform: translateX(-50%);
  width: 34px; height: 34px; border: 3px solid var(--color-border); border-top-color: var(--color-primary);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
.results-loading .results-spinner { display: block; }
@keyframes spin { to { transform: translateX(-50%) rotate(360deg); } }

/* Skeleton cards shown briefly while first AJAX page loads */
.skeleton-card { background: var(--color-bg); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); }
.skeleton-card__image, .skeleton-card__line {
  background: linear-gradient(90deg, var(--color-bg-alt) 25%, #eceffa 37%, var(--color-bg-alt) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite;
}
.skeleton-card__image { aspect-ratio: 4/3; }
.skeleton-card__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.skeleton-card__line { height: 14px; border-radius: 4px; width: 70%; }
.skeleton-card__line--short { width: 40%; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Field validation live states (progressive enhancement over server errors) */
.field.is-valid input, .field.is-valid textarea, .field.is-valid select { border-color: var(--color-success); }
.field-hint-live { font-size: 0.86rem; margin-top: 2px; }
.field-hint-live.is-error { color: var(--color-danger); font-weight: 600; }
.field-hint-live.is-ok { color: var(--color-success); font-weight: 600; }

/* Gallery lightbox */
.gallery__main { cursor: zoom-in; position: relative; }
.gallery__main img { transition: opacity 0.2s ease; }
.lightbox {
  position: fixed; inset: 0; background: rgba(10, 16, 13, 0.92); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: var(--space-5);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__img { max-width: min(1000px, 92vw); max-height: 86vh; object-fit: contain; border-radius: var(--radius-sm); transition: opacity 0.15s ease; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255,255,255,0.12); color: #fff; border: none; border-radius: 50%;
  width: 44px; height: 44px; font-size: 1.3rem; display: flex; align-items: center; justify-content: center;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,0.24); }
.lightbox__close { top: var(--space-4); right: var(--space-4); }
.lightbox__nav--prev { left: var(--space-4); top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: var(--space-4); top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox__nav { width: 38px; height: 38px; } }

/* Admin stat counters -- number itself is animated via JS (textContent updates) */
.stat-card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
