/* EstateLoom customer website. Mobile first; no external fonts or images. */
:root {
  color-scheme: light;
  --accent: #2457e7;
  --accent-ink: #ffffff;
  --accent-soft: #eef3fe;
  --accent-ring: rgb(36 87 231 / 22%);
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --soft: #f8fafc;
  --soft-2: #f1f5f9;
  --paper: #ffffff;
  --saved: #e11d48;
  --ok: #15803d;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 6%);
  --shadow: 0 1px 2px rgb(15 23 42 / 5%), 0 10px 28px rgb(15 23 42 / 8%);
  --header: 64px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@supports (color: color-mix(in srgb, red 50%, white)) {
  :root {
    --accent-soft: color-mix(in srgb, var(--accent) 9%, #ffffff);
    --accent-ring: color-mix(in srgb, var(--accent) 24%, transparent);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header) + 12px); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.015em; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.6; }
input, select, textarea { min-width: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wrap { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }
.small { font-size: 0.875rem; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 0.875rem; font-weight: 500;
}
.eyebrow svg { width: 16px; height: 16px; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 18px;
  border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--paper); color: var(--ink);
  font-size: 0.95rem; font-weight: 600; line-height: 1.2; text-align: center;
  transition: background-color 0.15s, border-color 0.15s, filter 0.15s, transform 0.05s;
}
.button:hover { background: var(--soft-2); }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.primary:hover { filter: brightness(0.94); }
.button.sm { min-height: 44px; padding: 8px 14px; font-size: 0.9rem; border-radius: 11px; }
.button.lg { min-height: 52px; padding: 14px 20px; font-size: 1rem; }
.button.xl { min-height: 56px; padding: 16px 24px; font-size: 1.05rem; border-radius: 14px; }
.button.block { display: flex; width: 100%; }
.button[aria-pressed=true] { color: var(--saved); border-color: #fecdd3; background: #fff1f2; }
.button[aria-pressed=true] svg { fill: currentColor; }
.icon-button {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border: 1px solid var(--line-2); border-radius: 50%;
  background: var(--paper); color: var(--ink);
}
.icon-button:hover { background: var(--soft-2); }
.icon-button.plain { border-color: transparent; background: transparent; }
.icon-button.plain:hover { background: var(--soft-2); }
.link-button {
  border: 0; background: none; padding: 0 4px; min-height: 32px;
  color: var(--accent); font-size: 0.875rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}

/* Header and footer */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgb(255 255 255 / 92%);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--header); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 0.95rem; font-weight: 700; letter-spacing: -0.02em;
}
.logo-mark { width: 40px; height: 40px; flex: none; }
.logo-mark rect { fill: var(--accent); stroke: none; }
.logo-mark path { fill: #fff; stroke: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong, .brand-text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text strong { font-size: 1rem; font-weight: 700; line-height: 1.25; }
.brand-text small { font-size: 0.78rem; color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.saved-button .badge {
  position: absolute; top: -3px; right: -3px;
  display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px;
  border: 2px solid #fff; border-radius: 999px;
  background: var(--saved); color: #fff; font-size: 0.72rem; font-weight: 700; line-height: 1;
}
.footer { border-top: 1px solid var(--line); background: var(--soft); padding: 28px 0 32px; margin-top: 24px; }
/* Leave room for the fixed shortlist bar or property call-to-action on phones. */
body:has(.floating-saved:not([hidden])) .footer, body:has(.mobile-cta) .footer { padding-bottom: 104px; }
.footer-inner { display: flex; flex-direction: column; gap: 16px; }
.footer strong { display: block; font-size: 0.95rem; }
.footer span { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.footer p { color: var(--muted); font-size: 0.8rem; margin-top: 10px; max-width: 480px; }
.powered { color: var(--muted); font-size: 0.8rem; font-weight: 500; align-self: flex-start; padding: 6px 0; }
.powered:hover { color: var(--ink); text-decoration: underline; }

/* Landing */
.landing-hero {
  background: radial-gradient(900px 420px at 90% -10%, var(--accent-soft), transparent 65%), linear-gradient(180deg, #f8fbff, #ffffff 80%);
  border-bottom: 1px solid var(--line);
  padding: 32px 0 40px;
}
.landing-grid { display: grid; gap: 32px; }
.landing-copy h1 { margin-top: 12px; font-size: 2.15rem; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; }
.landing-lead { margin-top: 14px; max-width: 34em; color: var(--ink-2); font-size: 1.06rem; line-height: 1.6; }
.landing-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.landing-points { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 20px 0 0; }
.landing-points li { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 0.9rem; }
.landing-points svg { width: 18px; height: 18px; color: var(--ok); stroke-width: 2.4; }
.landing-preview {
  display: block; width: 100%; max-width: 420px; margin-inline: auto; padding: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 24px 60px rgb(15 23 42 / 12%);
  transition: transform 0.2s, box-shadow 0.2s;
}
.landing-preview:hover { transform: translateY(-3px); box-shadow: 0 30px 70px rgb(15 23 42 / 16%); }
.preview-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.preview-head strong { display: block; font-size: 0.98rem; }
.preview-head small { display: block; color: var(--muted); font-size: 0.8rem; }
.preview-card { display: flex; align-items: center; gap: 12px; padding: 8px 4px; }
.preview-card + .preview-card { border-top: 1px solid var(--soft-2); }
.preview-card strong { display: block; font-size: 1.05rem; }
.preview-card span { display: block; font-size: 0.9rem; color: var(--ink-2); }
.preview-card small { display: block; font-size: 0.8rem; color: var(--muted); }
.preview-cta {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 10px; min-height: 48px; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
}
.how { padding: 44px 0 8px; }
.how h2, .open-link h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.steps { list-style: none; display: grid; gap: 14px; padding: 0; margin: 20px 0 0; }
.step { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.step h3 { margin-top: 14px; font-size: 1.06rem; font-weight: 700; }
.step p { margin-top: 6px; color: var(--ink-2); font-size: 0.95rem; line-height: 1.55; }
.step-icon {
  position: relative; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
}
.step-icon svg { width: 24px; height: 24px; }
.step-number {
  position: absolute; top: -7px; right: -7px;
  display: grid; place-items: center; width: 24px; height: 24px;
  border: 2px solid #fff; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 0.75rem; font-weight: 700;
}
.open-link { padding: 36px 0 16px; }
.open-link-card { display: grid; gap: 14px; padding: 22px; background: var(--soft); border: 1px solid var(--line); border-radius: 20px; }
.open-link-card > div > p { margin-top: 6px; color: var(--ink-2); }
.link-form { display: flex; flex-direction: column; gap: 10px; }
.link-form input {
  flex: 1; min-height: 52px; padding: 0 16px;
  border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 1rem;
}
.link-form input:focus, .search-field input:focus, .field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring);
}
.open-link-card .error-message { margin: 0; }

/* Store hero */
.hero-store {
  background: linear-gradient(180deg, var(--accent-soft), #ffffff 92%);
  border-bottom: 1px solid var(--line);
  padding: 22px 0 24px;
}
.dealer-id { display: flex; align-items: center; gap: 14px; }
.dealer-avatar {
  display: grid; place-items: center; flex: none;
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em;
  box-shadow: 0 6px 16px rgb(15 23 42 / 14%);
}
.hero-store h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.dealer-id .eyebrow { margin-top: 4px; }
.hero-inner > .eyebrow + h1 { margin-top: 8px; }
.hero-headline { margin-top: 16px; font-size: 1.1rem; font-weight: 650; color: var(--ink); }
.hero-lead { margin-top: 8px; max-width: 680px; color: var(--ink-2); font-size: 0.97rem; line-height: 1.6; }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; }
.hero-actions .button.primary { flex: 1; }

/* Search and filters */
.catalog { padding-top: 18px; }
.filters { display: grid; gap: 10px; }
.search-field { position: relative; display: block; }
.search-field svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-field input {
  width: 100%; min-height: 52px; padding: 0 16px 0 46px;
  border: 1px solid var(--line-2); border-radius: 14px; background: #fff;
  font-size: 1rem; box-shadow: var(--shadow-sm);
}
.search-field input::placeholder { color: #8391a7; }
.filter-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.filter-row.has-city .control:first-child { grid-column: 1 / -1; }
.control { position: relative; display: block; min-height: 56px; }
.control-label {
  position: absolute; z-index: 1; top: 8px; left: 14px; pointer-events: none;
  color: var(--muted); font-size: 0.72rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase;
}
.control select, .sort-control select {
  appearance: none; -webkit-appearance: none;
  width: 100%; border: 1px solid var(--line-2); border-radius: 12px; background: #fff;
  color: var(--ink); font-weight: 550; text-overflow: ellipsis; cursor: pointer;
}
.control select { position: absolute; inset: 0; height: 100%; padding: 24px 36px 6px 14px; font-size: 0.95rem; }
.control > svg, .sort-control > svg {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
.control select:focus, .sort-control select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.type-chips {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity;
  margin-inline: -16px; padding: 2px 16px 4px; scrollbar-width: none;
}
.type-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; scroll-snap-align: start;
  min-height: 44px; padding: 8px 14px;
  border: 1px solid var(--line-2); border-radius: 999px; background: #fff;
  color: var(--ink-2); font-size: 0.9rem; font-weight: 550; white-space: nowrap;
}
.chip svg { width: 18px; height: 18px; }
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: #fff; }
.results-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 22px 0 14px; }
.results-summary { min-width: 0; }
.results-summary h2 { font-size: 1.12rem; font-weight: 750; }
.results-summary p { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 2px; color: var(--muted); font-size: 0.875rem; }
.results-tools { flex: none; }
.sort-control { position: relative; display: block; }
.sort-control select { min-height: 44px; padding: 8px 34px 8px 12px; font-size: 0.875rem; }

/* Property cards */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
@media (hover: hover) {
  .card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
}
.card-link { display: flex; flex-direction: column; flex: 1; }
.card-link:focus-visible { outline-offset: -3px; border-radius: var(--radius); }
.card-body { padding: 14px 16px 4px; }
.card-price { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.card-title { margin-top: 2px; font-size: 1.02rem; font-weight: 650; }
.card-place { display: flex; align-items: flex-start; gap: 5px; margin-top: 4px; color: var(--muted); font-size: 0.9rem; }
.card-place svg { width: 16px; height: 16px; margin-top: 2px; }
.card-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 0; }
.card-tags li { padding: 4px 10px; border-radius: 999px; background: var(--soft-2); color: var(--ink-2); font-size: 0.78rem; font-weight: 500; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 16px 16px; }
.save-button {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: #fff; color: var(--ink);
  box-shadow: 0 2px 10px rgb(15 23 42 / 20%);
}
.save-button.on-cover { position: absolute; top: 10px; right: 10px; z-index: 2; }
.save-button.lg { width: 48px; height: 48px; top: 12px; right: 12px; }
.save-button[aria-pressed=true] { color: var(--saved); }
.save-button[aria-pressed=true] svg { fill: currentColor; }
.hidden-card { justify-content: center; min-height: 160px; padding: 24px 20px; background: var(--soft); box-shadow: none; }
.hidden-title { display: flex; align-items: center; gap: 10px; }
.hidden-title h3 { font-size: 1rem; }
.hidden-card p { margin-top: 10px; color: var(--muted); font-size: 0.9rem; max-width: 340px; }

/* Covers: a gradient per property family stands in until real photos exist. */
.cover {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; place-items: center; aspect-ratio: 16 / 9;
  color: #fff; background-color: #475569;
}
.cover::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 88% -10%, rgb(255 255 255 / 30%), transparent 55%),
    repeating-linear-gradient(135deg, rgb(255 255 255 / 7%) 0 2px, transparent 2px 16px);
}
.cover::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(15 23 42 / 30%), transparent 45%); }
.cover-art { width: 30%; max-width: 120px; height: auto; aspect-ratio: 1; stroke: #fff; stroke-width: 2; opacity: 0.95; filter: drop-shadow(0 6px 12px rgb(0 0 0 / 18%)); }
.fam-land { background-image: linear-gradient(135deg, #14532d, #1f9d55 55%, #8bd8a6); }
.fam-home { background-image: linear-gradient(135deg, #8c2f0b, #e46f2e 55%, #fbc493); }
.fam-flat { background-image: linear-gradient(135deg, #1e3a8a, #3a74ee 55%, #9fc3ff); }
.fam-commercial { background-image: linear-gradient(135deg, #4c1d95, #8656ee 55%, #cdbbff); }
.fam-industrial { background-image: linear-gradient(135deg, #1e293b, #536379 55%, #aeb9ca); }
.fam-farm { background-image: linear-gradient(135deg, #3b450f, #76862b 55%, #cfd78e); }
.fam-other { background-image: linear-gradient(135deg, #115e59, #1c9f90 55%, #95e1d5); }
.cover-type {
  position: absolute; top: 12px; left: 12px; max-width: calc(100% - 80px);
  padding: 5px 10px; border-radius: 999px;
  background: rgb(255 255 255 / 94%); color: var(--ink);
  font-size: 0.78rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 1px 4px rgb(15 23 42 / 12%);
}
.cover-badges { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.cover-badges span {
  padding: 5px 10px; border-radius: 8px;
  background: rgb(15 23 42 / 58%); color: #fff; font-size: 0.82rem; font-weight: 650;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.cover-lg { aspect-ratio: 16 / 9; border-radius: 20px; }
.cover-lg .cover-art { width: 24%; max-width: 150px; }
.cover-lg .cover-type { top: 14px; left: 14px; font-size: 0.85rem; padding: 6px 12px; }
.cover-lg .cover-badges { left: 14px; bottom: 14px; }
.cover-lg .cover-badges span { font-size: 0.9rem; padding: 6px 12px; }
.cover-mini, .cover-thumb { flex: none; border-radius: 12px; }
.cover-mini { width: 96px; aspect-ratio: 4 / 3; }
.cover-thumb { width: 72px; height: 56px; aspect-ratio: auto; }
.cover-mini .cover-type, .cover-mini .cover-badges, .cover-thumb .cover-type { display: none; }
.cover-mini .cover-art, .cover-thumb .cover-art { width: 52%; filter: none; }
.cover-mini::after, .cover-thumb::after { display: none; }

/* States */
.load-more { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 28px; }
.load-more:empty { display: none; }
.empty {
  grid-column: 1 / -1; padding: 40px 20px; text-align: center;
  background: var(--soft); border: 1px dashed var(--line-2); border-radius: var(--radius);
}
.empty > svg { width: 30px; height: 30px; color: var(--muted); margin-bottom: 12px; }
.empty h2 { font-size: 1.15rem; }
.empty p { max-width: 420px; margin: 8px auto 18px; color: var(--muted); font-size: 0.95rem; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.empty.compact { border-style: solid; padding: 28px 18px; }
.notice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 12px 14px; margin-bottom: 16px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; color: #78350f; font-size: 0.9rem;
}
.error-message { margin: 4px 0 12px; color: #b42318; font-size: 0.9rem; font-weight: 500; }
.skeleton { overflow: hidden; height: 340px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.skeleton span { display: block; aspect-ratio: 16 / 9; background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton.tall { height: auto; margin-top: 8px; border: 0; }
.skeleton.tall span { border-radius: 20px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.floating-saved {
  position: fixed; z-index: 20; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: min(440px, calc(100% - 32px)); min-height: 56px; padding: 0 18px;
  border: 0; border-radius: 16px; background: var(--ink); color: #fff;
  font-size: 0.95rem; font-weight: 650; box-shadow: 0 12px 32px rgb(15 23 42 / 30%);
}
.floating-saved span { display: inline-flex; align-items: center; gap: 8px; }
.floating-count svg { color: #fb7185; fill: currentColor; }
.floating-go { font-weight: 600; opacity: 0.92; }
.floating-go svg { width: 18px; height: 18px; }
#toast {
  position: fixed; z-index: 100; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translate(-50%, 10px); width: max-content; max-width: calc(100% - 32px);
  padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff;
  font-size: 0.9rem; font-weight: 500; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity 0.15s, transform 0.15s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Property detail */
.detail { padding: 8px 0 24px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 6px; color: var(--ink-2); font-size: 0.95rem; font-weight: 550; }
.back-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.detail-grid { display: grid; gap: 24px; }
.detail-main { min-width: 0; }
.detail-cover { position: relative; }
.photo-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 0.85rem; }
.photo-note svg { width: 16px; height: 16px; }
.detail-head { margin-top: 18px; }
.detail-head h1 { margin-top: 4px; font-size: 1.55rem; font-weight: 800; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.detail-place { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); }
.detail-place svg { width: 18px; height: 18px; }
.detail-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 14px; }
.detail-price strong { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; }
.detail-price span { color: var(--muted); font-size: 0.92rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 20px 0 0; }
.facts div { padding: 12px 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; }
.facts dt { color: var(--muted); font-size: 0.75rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.facts dd { margin: 2px 0 0; font-size: 1rem; font-weight: 650; overflow-wrap: anywhere; }
.detail-section { margin-top: 28px; }
.detail-section h2 { margin-bottom: 12px; font-size: 1.12rem; font-weight: 750; }
.feature-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding: 0; margin: 0; }
.feature-list li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 0.95rem; }
.feature-list svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: #dcfce7; color: var(--ok); stroke-width: 2.6; }
.description { color: var(--ink-2); line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.map-card { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px; background: var(--soft); border: 1px solid var(--line); border-radius: 16px; }
.map-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.map-text { flex: 1; min-width: 180px; }
.map-text strong { display: block; }
.map-text p { margin-top: 2px; color: var(--muted); font-size: 0.9rem; }
.map-card .button { flex: 1 1 100%; }
.enquiry-card { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.enquiry-summary { display: none; }
.enquiry-price { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.enquiry-title { font-size: 1.15rem; font-weight: 750; }
.enquiry-text { margin-top: 4px; }
.enquiry-card .button { margin-top: 12px; }
.enquiry-card .button.primary { margin-top: 16px; }
.dealer-mini { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.dealer-mini strong { display: block; }
.dealer-mini span:not(.brand-mark) { display: block; color: var(--muted); font-size: 0.85rem; }
.enquiry-card > .small { margin-top: 14px; }
.mobile-cta {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgb(255 255 255 / 96%); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.mobile-cta div { min-width: 0; }
.mobile-cta strong { display: block; font-size: 1.15rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-cta span { display: block; color: var(--muted); font-size: 0.82rem; }
.mobile-cta .button { min-width: 140px; }

/* Errors and loading */
.full-error { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 60vh; padding: 48px 0; text-align: center; }
.full-error h1 { font-size: 1.6rem; font-weight: 800; }
.full-error p { max-width: 440px; color: var(--ink-2); }
.error-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--soft-2); color: var(--ink-2); }
.error-icon svg { width: 28px; height: 28px; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.initial { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 70vh; padding: 40px 24px; text-align: center; }
.initial h1 { margin-top: 10px; font-size: 1.3rem; }
.initial p { color: var(--muted); }
.noscript { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 30px; background: #fff; }

/* Dialogs */
dialog {
  width: min(520px, calc(100% - 32px)); max-height: 90dvh; padding: 0;
  border: 0; border-radius: 20px; background: #fff; color: var(--ink);
  box-shadow: 0 30px 80px rgb(15 23 42 / 30%); overflow: auto; overscroll-behavior: contain;
}
dialog[open] { animation: rise 0.2s ease-out; }
dialog::backdrop { background: rgb(15 23 42 / 48%); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.dialog-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 20px; background: #fff; border-bottom: 1px solid var(--line);
}
.dialog-head h2 { font-size: 1.12rem; font-weight: 750; }
.dialog-body { padding: 20px; }
.dialog-footer { position: sticky; bottom: 0; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.dialog-footer p { margin-top: 8px; color: var(--muted); font-size: 0.8rem; text-align: center; }
.saved-list { list-style: none; padding: 0; margin: 10px 0 0; }
.saved-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.saved-row:last-child { border-bottom: 0; }
.saved-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.saved-text strong { font-size: 0.97rem; }
.saved-text span { color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.saved-text .saved-price { color: var(--ink); font-weight: 650; }
.saved-text:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.contact-intro { margin-bottom: 16px; color: var(--ink-2); font-size: 0.97rem; line-height: 1.55; }
.contact-summary { margin-bottom: 16px; padding: 12px 14px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; font-size: 0.875rem; }
.contact-summary ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 0.92rem; font-weight: 650; }
.field-label small { color: var(--muted); font-size: 0.8rem; font-weight: 500; }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 1rem;
}
.field textarea { min-height: 96px; resize: vertical; }
.form-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.form-note svg { width: 16px; height: 16px; margin-top: 2px; }
.enquiry-success { text-align: center; }
.success-mark { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #dcfce7; color: var(--ok); }
.success-mark svg { width: 30px; height: 30px; stroke-width: 2.6; }
.enquiry-success h3 { margin: 14px 0 8px; font-size: 1.35rem; font-weight: 800; }
.enquiry-success > p { color: var(--ink-2); line-height: 1.6; }
.success-sub { margin-top: 20px; color: var(--ink) !important; font-weight: 650; }
.contact-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 14px; }
.button.whatsapp { background: #25d366; border-color: #25d366; color: #052e16; }
.button.whatsapp:hover { filter: brightness(0.95); background: #25d366; }

/* Tablet */
@media (min-width: 640px) {
  .wrap { width: min(1200px, calc(100% - 48px)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .landing-actions, .link-form { flex-direction: row; }
  .link-form .button { flex: none; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-actions .button.primary { flex: none; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .filter-row { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .filter-row.has-city { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .filter-row.has-city .control:first-child { grid-column: auto; }
  .type-chips { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; overflow: visible; }
  .map-card .button { flex: none; }
  .footer-inner { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .powered { align-self: auto; }
  .open-link-card { padding: 28px; }
  dialog .contact-actions .button { min-height: 52px; }
}

/* Desktop */
@media (min-width: 960px) {
  :root { --header: 72px; }
  .wrap { width: min(1200px, calc(100% - 64px)); }
  .brand-mark, .logo-mark { width: 44px; height: 44px; }
  .brand-text strong { font-size: 1.08rem; }
  .landing-hero { padding: 72px 0 80px; }
  .landing-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: 56px; }
  .landing-copy h1 { font-size: 3.4rem; }
  .landing-lead { font-size: 1.15rem; }
  .how { padding-top: 64px; }
  .how h2, .open-link h2 { font-size: 1.8rem; }
  .step { padding: 24px; }
  .open-link { padding: 48px 0 24px; }
  .open-link-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); column-gap: 40px; padding: 32px 36px; }
  .open-link-card > .error-message, .open-link-card > .small { grid-column: 2; }
  .hero-store { padding: 36px 0 34px; }
  .dealer-avatar { width: 68px; height: 68px; font-size: 1.45rem; border-radius: 20px; }
  .hero-store h1 { font-size: 2.2rem; }
  .hero-headline { font-size: 1.25rem; }
  .hero-lead { font-size: 1.02rem; }
  .catalog { padding-top: 26px; }
  .filters { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; gap: 12px; }
  .filters .type-chips { grid-column: 1 / -1; }
  .search-field input { min-height: 56px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .detail { padding-top: 16px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
  .cover-lg { aspect-ratio: 2 / 1; }
  .detail-head h1 { font-size: 2.1rem; }
  .detail-price strong { font-size: 2rem; }
  .enquiry-card { position: sticky; top: calc(var(--header) + 20px); padding: 24px; }
  .enquiry-summary { display: block; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  .mobile-cta { display: none; }
  body:has(.mobile-cta) .footer { padding-bottom: 40px; }
  .floating-saved { bottom: 24px; }
  #toast { bottom: 96px; }
}
@media (max-width: 959px) {
  .detail-main + .enquiry-card .button.primary { display: none; }
}
@media (max-width: 380px) {
  .brand-text small { display: none; }
  .header-actions .button.sm { padding-inline: 12px; }
  .card-price { font-size: 1.3rem; }
  .hero-store h1 { font-size: 1.45rem; }
}
@media (max-width: 639px) {
  dialog {
    width: 100%; max-width: 100%; max-height: 92dvh;
    margin: auto 0 0; border-radius: 20px 20px 0 0;
  }
  @keyframes rise { from { transform: translateY(40px); opacity: 0.4; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
