/* Reusable components. Class names are prefixed where they could clash with Bootstrap. */

/* ---------- Buttons ---------- */
.btn-ds {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 44px; padding: 0 var(--sp-5);
  font-family: var(--font-body); font-weight: 600; font-size: .95rem; line-height: 1;
  border: 1px solid transparent; border-radius: var(--radius);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--t), border-color var(--t), color var(--t), box-shadow var(--t);
}
.btn-ds:disabled, .btn-ds[aria-disabled="true"] { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-ds-primary { background: var(--c-primary); color: #fff; }
.btn-ds-primary:hover { background: var(--c-primary-hover); color: #fff; }
.btn-ds-primary:active { background: var(--c-primary-active); }
.btn-ds-secondary { background: var(--c-surface); color: var(--c-heading); border-color: var(--c-border-strong); }
.btn-ds-secondary:hover { border-color: var(--c-heading); color: var(--c-heading); }
.btn-ds-ghost { background: transparent; color: var(--c-primary); }
.btn-ds-ghost:hover { background: var(--c-tint-1); color: var(--c-primary-hover); }
.btn-ds-light { background: #fff; color: var(--c-deep); }
.btn-ds-light:hover { background: var(--c-tint-1); color: var(--c-deep); }
.btn-ds-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ds-outline-light:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }
.btn-ds-whatsapp { background: #1f7a4a; color: #fff; }
.btn-ds-whatsapp:hover { background: #185f3a; color: #fff; }
.btn-ds-sm { min-height: 36px; padding: 0 var(--sp-4); font-size: var(--fs-sm); }
.btn-ds-lg { min-height: 52px; padding: 0 var(--sp-6); font-size: 1rem; }
.btn-ds-block { display: flex; width: 100%; }
.btn-ds-icon { width: 44px; padding: 0; }
.btn-ds[aria-pressed="true"] { background: var(--c-tint-1); border-color: var(--c-primary); color: var(--c-primary); }

/* ---------- Status pill ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; white-space: nowrap;
  background: var(--st-sold-bg); color: var(--st-sold-fg);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--st-sold-dot); flex: none; }
.pill-available   { background: var(--st-available-bg); color: var(--st-available-fg); }
.pill-available::before { background: var(--st-available-dot); }
.pill-reserved    { background: var(--st-reserved-bg); color: var(--st-reserved-fg); }
.pill-reserved::before { background: var(--st-reserved-dot); }
.pill-coming_soon { background: var(--st-soon-bg); color: var(--st-soon-fg); }
.pill-coming_soon::before { background: var(--st-soon-dot); }
.pill-neutral { background: var(--c-tint-1); color: var(--c-primary-active); }
.pill-neutral::before { background: var(--c-primary); }

/* ---------- Cards ---------- */
.card-ds {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1); overflow: hidden;
}
.card-ds-body { padding: var(--sp-5); }
.card-ds-hover { transition: transform var(--t), box-shadow var(--t); }
.card-ds-hover:hover, .card-ds-hover:focus-within { transform: translateY(-2px); box-shadow: var(--shadow-2); }

.media-43 { position: relative; aspect-ratio: 4 / 3; background: var(--c-tint-1); overflow: hidden; }
.media-43 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center; gap: var(--sp-2);
  color: var(--c-text-muted); font-size: var(--fs-sm); text-align: center;
  background: repeating-linear-gradient(135deg, var(--c-tint-1) 0 12px, #fbe6eb 12px 24px);
}
.media-placeholder i { font-size: 2rem; color: var(--c-accent-on-dark-hover); }

/* Plot card */
.plot-card { display: flex; flex-direction: column; height: 100%; }
.plot-card .pill { position: absolute; top: var(--sp-3); left: var(--sp-3); box-shadow: var(--shadow-1); }
.plot-card-body { padding: var(--sp-4) var(--sp-5) var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-1); flex: 1; }
.plot-card-title { font-size: 1.15rem; margin: 0; }
.plot-card-title a { color: inherit; text-decoration: none; }
.plot-card-title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.plot-card-meta { color: var(--c-text-muted); font-size: var(--fs-sm); margin: 0; }
.plot-card-specs { display: flex; flex-wrap: wrap; gap: var(--sp-3); color: var(--c-text-muted); font-size: var(--fs-sm); margin-top: var(--sp-1); }
.plot-card-specs i { color: var(--c-primary); }
.plot-card-price { margin-top: var(--sp-3); }
.plot-card-actions {
  position: relative; z-index: 1; display: flex; align-items: center; gap: var(--sp-2);
  margin-top: auto; padding-top: var(--sp-4); border-top: 1px solid var(--c-border);
}
.plot-card-actions .compare-check { margin-right: auto; }
.card-ds.plot-card { position: relative; }

/* Price */
.price { display: flex; align-items: baseline; gap: 6px; margin: 0; font-variant-numeric: tabular-nums; }
.price-currency { font-size: var(--fs-xs); font-weight: 600; color: var(--c-text-muted); letter-spacing: .04em; }
.price-amount { font-family: var(--font-heading); font-weight: 800; font-size: 1.35rem; color: var(--c-primary); letter-spacing: -0.01em; }
.price-lg .price-amount { font-size: 2rem; }
.price-member { font-size: var(--fs-sm); color: var(--c-text-muted); margin: 2px 0 0; }
.price-member strong { color: var(--c-heading); }

/* Compare checkbox */
.compare-check { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--c-text-muted); cursor: pointer; min-height: 44px; }
.compare-check input { width: 18px; height: 18px; accent-color: var(--c-primary); }

/* Estate card */
.estate-card .card-ds-body { display: flex; flex-direction: column; gap: var(--sp-2); }
.estate-card h3 { margin: 0; font-size: 1.25rem; }
.estate-card h3 a { color: inherit; text-decoration: none; }
.estate-card h3 a::after { content: ""; position: absolute; inset: 0; }
.estate-card { position: relative; }
.estate-card-count { font-weight: 600; color: var(--st-available-fg); font-size: var(--fs-sm); }

/* Stat tile */
.stat-tile { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: var(--sp-5); }
.stat-tile-label { font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--c-text-muted); margin: 0; }
.stat-tile-value { font-family: var(--font-heading); font-weight: 800; font-size: clamp(2rem, 1.6rem + 1.5vw, 2.75rem); color: var(--c-heading); line-height: 1.1; margin: var(--sp-2) 0 var(--sp-1); letter-spacing: -0.02em; }
.stat-tile-note { font-size: var(--fs-sm); color: var(--c-text-muted); margin: 0; }

/* Feature card */
.feature-card { padding: var(--sp-5); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); height: 100%; }
.feature-card-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius); background: var(--c-tint-1); color: var(--c-primary); font-size: 1.3rem; margin-bottom: var(--sp-4); }
.feature-card h3 { font-size: 1.1rem; margin-bottom: var(--sp-2); }
.feature-card p { margin: 0; color: var(--c-text-muted); font-size: .95rem; }

/* Steps */
.steps { display: grid; gap: var(--sp-5) var(--sp-6); grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); counter-reset: step; list-style: none; padding: 0; margin: 0; }
.step { display: flex; gap: var(--sp-4); align-items: flex-start; }
.step-num {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-heading); font-weight: 800; background: var(--c-primary); color: #fff;
}
.step h3 { font-size: 1.1rem; margin: 6px 0 var(--sp-1); }
.step p { margin: 0; color: var(--c-text-muted); font-size: .95rem; }

/* FAQ (details/summary) */
.faq { border-top: 1px solid var(--c-border-strong); }
.faq details { border-bottom: 1px solid var(--c-border-strong); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) 0; font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; color: var(--c-heading); min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "\F4FE"; font-family: "bootstrap-icons"; color: var(--c-primary); transition: transform var(--t); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 0 var(--sp-4); color: var(--c-text-muted); max-width: 70ch; }
.faq-answer p:last-child { margin-bottom: 0; }

/* Section header */
.section-header { max-width: 680px; margin-bottom: var(--sp-6); }
.section-header.center { margin-inline: auto; text-align: center; }
.section-header h2 { margin-bottom: var(--sp-3); }
.section-header p { margin: 0; }
.section-header-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.section-header-row .section-header { margin-bottom: 0; }

/* ---------- Forms ---------- */
.form-ds label, .label-ds { display: block; font-weight: 600; font-size: var(--fs-sm); color: var(--c-heading); margin-bottom: 6px; }
.form-ds .optional { font-weight: 400; color: var(--c-text-muted); }
.input-ds, .form-ds .form-control, .form-ds .form-select {
  width: 100%; min-height: 44px; padding: 10px 14px;
  font: inherit; color: var(--c-text); background-color: var(--c-surface);
  border: 1px solid var(--c-border-strong); border-radius: var(--radius);
  transition: border-color var(--t), box-shadow var(--t);
}
.input-ds:focus, .form-ds .form-control:focus, .form-ds .form-select:focus { outline: none; border-color: var(--c-primary); box-shadow: var(--focus-ring); }
.form-ds textarea { min-height: 110px; resize: vertical; }
.form-ds .field { margin-bottom: var(--sp-4); }
.form-ds .field-error { color: var(--c-primary-active); font-size: var(--fs-sm); margin-top: 4px; }
.form-ds .is-invalid { border-color: var(--c-primary-active); }
.form-ds .form-hint { font-size: var(--fs-xs); color: var(--c-text-muted); margin-top: 4px; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Breadcrumb ---------- */
.page-head { padding-block: var(--sp-6) var(--sp-5); }
.crumbs { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; padding: 0; margin: 0 0 var(--sp-3); font-size: var(--fs-sm); color: var(--c-text-muted); }
.crumbs li + li::before { content: "/"; margin-right: var(--sp-2); color: var(--c-border-strong); }
.crumbs a { color: var(--c-text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--c-primary); text-decoration: underline; }
.crumbs [aria-current] { color: var(--c-heading); font-weight: 500; }
.page-head h1 { margin: 0; }
.page-head .lead { margin: var(--sp-3) 0 0; max-width: 680px; }

/* ---------- Pagination ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); list-style: none; padding: 0; margin: var(--sp-7) 0 0; }
.pager a, .pager span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 var(--sp-3);
  border: 1px solid var(--c-border-strong); border-radius: var(--radius); background: var(--c-surface);
  color: var(--c-heading); font-weight: 600; text-decoration: none; transition: border-color var(--t), background var(--t);
}
.pager a:hover { border-color: var(--c-primary); color: var(--c-primary); }
.pager [aria-current="page"] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.pager .disabled { color: var(--c-border-strong); background: transparent; }

/* ---------- Alerts / empty ---------- */
.alert-ds { display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4); border-radius: var(--radius); border: 1px solid; font-size: .95rem; }
.alert-ds i { font-size: 1.1rem; line-height: 1.4; }
.alert-ds-success { background: var(--st-available-bg); border-color: #bfe0cc; color: var(--st-available-fg); }
.alert-ds-error { background: var(--c-tint-1); border-color: var(--c-tint-2); color: var(--c-primary-active); }
.alert-ds-info { background: var(--st-soon-bg); border-color: #c6d6ef; color: var(--st-soon-fg); }
.empty-state { text-align: center; padding: var(--sp-8) var(--sp-5); background: var(--c-surface); border: 1px dashed var(--c-border-strong); border-radius: var(--radius-lg); }
.empty-state i { font-size: 2.5rem; color: var(--c-accent-on-dark-hover); }
.empty-state h3 { margin: var(--sp-3) 0 var(--sp-2); }
.empty-state p { color: var(--c-text-muted); margin: 0 auto var(--sp-5); max-width: 46ch; }

/* ---------- Filter bar ---------- */
.filter-bar { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: var(--sp-5); box-shadow: var(--shadow-1); }
.filter-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); align-items: end; }
.filter-range { display: flex; gap: var(--sp-2); }
.filter-actions { display: flex; gap: var(--sp-2); }
.filter-bar .field { margin: 0; }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--sp-3); margin: var(--sp-5) 0; }
.results-count { margin: 0; color: var(--c-text-muted); }
.results-count strong { color: var(--c-heading); }
.sort-control { display: flex; align-items: center; gap: var(--sp-2); }
.sort-control label { margin: 0; font-size: var(--fs-sm); color: var(--c-text-muted); font-weight: 500; }
.sort-control select { width: auto; }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: var(--sp-2); grid-template-columns: repeat(4, 1fr); border-radius: var(--radius-lg); overflow: hidden; }
.gallery-item { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 0; background: var(--c-tint-1); cursor: zoom-in; overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t); }
.gallery-item:hover img { transform: scale(1.02); }
.gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
.gallery-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(43,33,35,.55); color: #fff; font-weight: 700; font-size: 1.1rem; }
@media (max-width: 767.98px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; }
.lightbox::backdrop { background: rgba(20, 14, 15, .88); }
.lightbox img { max-height: 82vh; width: auto; border-radius: var(--radius); display: block; margin: 0 auto; }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3); margin-top: var(--sp-3); color: #fff; }
.lightbox-bar button { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: var(--radius); min-width: 44px; min-height: 44px; font-size: 1.2rem; }
.lightbox-bar button:hover { background: rgba(255,255,255,.22); }

/* ---------- Plot passport ---------- */
.passport { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 0; margin: 0; border: 1px solid var(--c-border); border-radius: var(--radius-lg); overflow: hidden; background: var(--c-surface); }
.passport div { padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--c-border); border-right: 1px solid var(--c-border); margin-bottom: -1px; margin-right: -1px; }
.passport dt { font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--c-text-muted); margin: 0 0 4px; }
.passport dd { margin: 0; font-weight: 600; color: var(--c-heading); }

/* ---------- Sidebar panel ---------- */
.side-panel { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: var(--sp-5); box-shadow: var(--shadow-1); }
.side-panel + .side-panel { margin-top: var(--sp-4); }
.side-panel h2, .side-panel h3 { font-size: 1.1rem; margin-bottom: var(--sp-4); }
.sticky-side { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
.share-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* ---------- Compare bar ---------- */
.compare-bar {
  position: fixed; left: 50%; bottom: var(--sp-4); z-index: 1030; transform: translate(-50%, 150%);
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; justify-content: center;
  padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-5); max-width: calc(100vw - 2 * var(--sp-4));
  background: var(--c-deep); color: var(--c-text-on-dark); border-radius: var(--radius-lg); box-shadow: var(--shadow-3);
  transition: transform var(--t);
}
.compare-bar.is-visible { transform: translate(-50%, 0); }
.compare-bar strong { color: #fff; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.table-ds { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table-ds th, .table-ds td { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--c-border); text-align: left; vertical-align: top; }
.table-ds thead th { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--c-text-muted); background: var(--c-bg); font-weight: 600; }
.table-ds tbody tr:hover { background: var(--c-tint-1); }
.table-ds tbody tr:last-child td { border-bottom: 0; }
.compare-table th[scope="row"] { position: sticky; left: 0; background: var(--c-bg); font-weight: 600; color: var(--c-heading); min-width: 150px; }

/* ---------- Toast ---------- */
.toast-ds {
  position: fixed; right: var(--sp-4); bottom: var(--sp-4); z-index: 1060; max-width: 360px;
  background: var(--c-deep); color: #fff; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius); box-shadow: var(--shadow-3);
  opacity: 0; transform: translateY(8px); transition: opacity var(--t), transform var(--t); pointer-events: none;
}
.toast-ds.is-visible { opacity: 1; transform: none; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: var(--sp-4); bottom: var(--sp-4); z-index: 1020;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #1f7a4a; color: #fff; font-size: 1.6rem; box-shadow: var(--shadow-3); text-decoration: none;
  transition: background var(--t), transform var(--t);
}
.wa-float:hover { background: #185f3a; color: #fff; transform: translateY(-2px); }
body.has-compare .wa-float { bottom: 88px; }

/* ==========================================================================
   Reservations (checkout summary, receipt, status timeline) — Leads & Reservations agent
   ========================================================================== */
.resv-plot { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--sp-4); align-items: center; }
.resv-plot img, .resv-plot .media-placeholder { width: 120px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--c-tint-1); }
.resv-plot h2 { font-size: 1.2rem; margin: 0 0 2px; }
.resv-plot p { margin: 0; color: var(--c-text-muted); font-size: var(--fs-sm); }
@media (max-width: 420px) { .resv-plot { grid-template-columns: 1fr; } .resv-plot img, .resv-plot .media-placeholder { width: 100%; } }
.sum-list { margin: 0; }
.sum-list div { display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-border); }
.sum-list div:last-child { border-bottom: 0; }
.sum-list dt { font-weight: 500; color: var(--c-text-muted); }
.sum-list dd { margin: 0; font-weight: 600; color: var(--c-heading); text-align: right; font-variant-numeric: tabular-nums; }
.sum-list .sum-total dt, .sum-list .sum-total dd { color: var(--c-primary-active); font-size: 1.1rem; font-weight: 800; }
.pay-methods { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; padding: 0; margin: var(--sp-2) 0 0; }
.pay-methods li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--c-border); border-radius: var(--radius-pill); background: var(--c-surface); font-size: var(--fs-sm); font-weight: 600; }
.check-field { display: flex; gap: var(--sp-3); align-items: flex-start; }
.check-field input[type="checkbox"] { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--c-primary); }
.form-ds .check-field label { font-weight: 400; font-size: .95rem; color: var(--c-text); margin: 0; }
.readonly-value { padding: 10px 14px; border: 1px dashed var(--c-border-strong); border-radius: var(--radius); background: var(--c-bg); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 var(--sp-5) 40px; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--c-border); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; background: var(--c-surface); border: 2px solid var(--c-border-strong); color: var(--c-text-muted); }
.timeline .is-done .tl-dot { background: var(--st-available-bg); border-color: var(--st-available-dot); color: var(--st-available-fg); }
.timeline .is-current .tl-dot { background: var(--c-tint-1); border-color: var(--c-primary); color: var(--c-primary-active); }
.timeline .is-stopped .tl-dot { background: var(--st-sold-bg); border-color: var(--st-sold-dot); color: var(--st-sold-fg); }
.timeline h3 { font-size: 1rem; margin: 3px 0 2px; }
.timeline p { margin: 0; font-size: var(--fs-sm); color: var(--c-text-muted); }
.review-flag { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--st-reserved-fg); background: var(--st-reserved-bg); padding: 2px 8px; border-radius: var(--radius-pill); }
