:root {
  --bg: #f5ede0;
  --paper: #fffdfa;
  --ink: #1a1208;
  --muted: #7a6e64;
  --brand: #0d3b2e;
  --brand-2: #e8a438;
  --line: #e5ddd0;
  --ok: #25d366;
  --shadow: 0 20px 45px rgba(26, 18, 8, 0.12);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "DM Sans", "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, #efe4d4 0, transparent 35%),
    radial-gradient(circle at 100% 10%, #e4f5f2 0, transparent 30%),
    var(--bg);
}
.container { width: min(1080px, 92vw); margin: 0 auto; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.94rem;
}
.brand { color: var(--brand); font-weight: 800; text-decoration: none; letter-spacing: 0.02em; }
.hero {
  background: linear-gradient(115deg, #0d3b2e 0%, #0f9b85 56%, #1a6f60 100%);
  color: #ecfffa;
  border-radius: 24px;
  padding: clamp(1.2rem, 2.8vw, 2.2rem);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -180px;
  top: -180px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}
.hero h1 { margin: 0 0 0.6rem; font-size: clamp(1.7rem, 3.2vw, 3rem); line-height: 1.08; }
.hero p { margin: 0; max-width: 64ch; color: #e3f8f3; }
.hero-meta { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255,255,255,0.26);
  background: rgba(255,255,255,0.1);
  color: #f0fffb;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.84rem;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 1rem; margin: 1.2rem 0 2.2rem; }
.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 12px 28px rgba(10, 14, 12, 0.07);
  transform: translateY(0);
  transition: 180ms ease;
}
.card:hover { transform: translateY(-4px); border-color: #aacdc8; box-shadow: 0 16px 34px rgba(10, 14, 12, 0.11); }
.pill { display: inline-block; font-size: 0.75rem; background: #e4f5f2; color: #0d3b2e; padding: 0.22rem 0.55rem; border-radius: 999px; font-weight: 700; }
.price { font-weight: 800; font-size: 1.14rem; margin-top: 0.45rem; }
.meta { color: var(--muted); font-size: 0.93rem; margin-top: 0.33rem; }
.property-main {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1rem;
  margin: 1rem 0 2rem;
  box-shadow: var(--shadow);
}
.gallery { display: grid; grid-template-columns: 1fr; gap: 0.7rem; }
.gallery img { width: 100%; border-radius: 14px; border: 1px solid var(--line); object-fit: cover; max-height: 460px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 0.6rem; margin: 1rem 0; }
.fact { background: #f7faf8; border: 1px solid var(--line); border-radius: 12px; padding: 0.72rem; }
.fact b { display: block; margin-bottom: 0.15rem; }
.notes { color: var(--muted); line-height: 1.5; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.cta {
  display: inline-block;
  text-decoration: none;
  border-radius: 11px;
  padding: 0.76rem 0.95rem;
  font-weight: 800;
}
.cta-primary { background: var(--brand); color: #f5ede0; }
.cta-secondary { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.warn { background: #fff7e8; border: 1px solid #efd9b4; border-radius: 10px; padding: 0.68rem 0.82rem; color: #66481e; font-size: 0.9rem; }
.whatsapp-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  background: #22c55e;
  color: #03220f;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(18, 94, 50, 0.32);
}
.cx {
  background: #0f172a;
  color: #d7deed;
  border-radius: 18px;
  padding: 1rem;
  margin: 0.8rem 0 2.4rem;
}
.cx h3 { color: #f6f9ff; margin-top: 0; }
.cx ul { margin: 0.5rem 0 0; padding-left: 1.1rem; }
@media (min-width: 920px) {
  .property-layout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem; align-items: start; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery img:first-child { grid-column: span 2; }
}
@media (prefers-reduced-motion: no-preference) {
  .card, .hero, .property-main { animation: rise 420ms ease both; }
  @keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
}

/* ── "Viver nesta área" card grid ───────────────────────────────────── */
.area-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.area-head h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.01em; }
.area-head .area-count { color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.area-intro { color: var(--muted); line-height: 1.55; font-size: 0.92rem; margin: 0 0 1.1rem; max-width: 56ch; }

.area-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}
@media (min-width: 620px) { .area-grid { grid-template-columns: repeat(2, 1fr); } }

.area-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 0.95rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}
.area-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15,118,110,0.32);
  box-shadow: 0 12px 26px rgba(13,59,46,0.07);
}
.area-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  background: #f0f7f5;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
}
.area-icon svg { width: 20px; height: 20px; }

.area-body { min-width: 0; flex: 1; }
.area-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  margin: 0 0 0.25rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.area-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.area-cat {
  background: #f5ede0;
  color: #66481e;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}
.area-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  color: var(--ink);
  font-weight: 600;
}
.area-rating::before {
  content: '★';
  color: #e8a438;
  font-size: 0.85rem;
  line-height: 1;
}
.area-rating .ct { color: var(--muted); font-weight: 400; margin-left: 0.15rem; }
.area-dist {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}
.area-dist::before {
  content: '';
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.55;
}

/* ── Mobile gallery carousel (property pages) ───────────────────────── */
@media (max-width: 640px) {
  .gallery {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.5rem;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding: 0 0.25rem 0.5rem;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery img {
    flex: 0 0 82vw;
    max-height: 260px;
    scroll-snap-align: start;
    border-radius: 14px;
    object-fit: cover;
  }
}
