/* ===== Manfra Imóveis — estilos base ===== */

:root {
  --navy: #172D42;
  --navy-light: #24425f;
  --bronze: #896A53;
  --bronze-dark: #6f5341;
  --beige: #DACBB1;
  --ivory: #FFFFF0;
  --white: #ffffff;

  /* Cinzas com papeis distintos: nunca usar o mesmo tom para texto e decoracao.
     --text-secondary passa em contraste AA (5:1) sobre branco/marfim; --gray (mais
     claro) e so para uso decorativo (pontos, icones inativos), nunca para texto. */
  --gray: #ADADAD;
  --text-secondary: #6E6E6E;
  --border-color: #D9D3C8;
  --border-light: #EEE6D8;

  --radius: 10px;
  --shadow: 0 6px 24px rgba(23, 45, 66, 0.10);
  --shadow-sm: 0 2px 8px rgba(23, 45, 66, 0.08);
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Montserrat', Arial, sans-serif;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

/* Link "pular para o conteudo": invisivel ate receber foco por teclado, pra
   nao precisar tabular pelos 8 itens do menu em toda pagina. Nao aparece
   visualmente pra quem usa mouse/touch. */
.skip-link {
  position: absolute; top: -50px; left: 12px; z-index: 1000;
  background: var(--navy); color: var(--white);
  padding: 10px 18px; border-radius: 6px; font-weight: 600; font-size: 0.9rem;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--ivory);
  color: var(--navy);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  color: var(--navy);
  margin: 0 0 0.5em;
  line-height: 1.2;
}

/* Playfair Display fica reservada para títulos grandes (h1/h2); em textos
   menores como subtítulos de seção ela perde legibilidade, então h3/h4
   usam a fonte secundária da marca (Montserrat), como o manual recomenda
   para "subtítulos, tópicos e chamadas". */
h1, h2 { font-family: var(--font-serif); }
h3, h4 { font-family: var(--font-sans); font-weight: 700; }

h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }

/* Algumas secoes usavam <h3> logo depois do <h1> da pagina (pulando o h2 na
   hierarquia de headings — problema real de acessibilidade, nao so estetico).
   Agora sao <h2 class="subsection-heading">: nivel de heading correto, com o
   MESMO estilo visual que o h3 já tinha (fonte, peso e tamanho identicos). */
.subsection-heading { font-family: var(--font-sans); font-weight: 700; font-size: 1.2rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

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

.section { padding-top: 64px; padding-bottom: 64px; }
.section-sm { padding-top: 32px; padding-bottom: 32px; }
.text-center { text-align: center; }
.eyebrow {
  font-family: var(--font-sans);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--bronze);
  font-weight: 600;
}

/* ===== Botões ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--bronze); color: var(--white); }
.btn-primary:hover { background: var(--bronze-dark); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-whatsapp { background: #25D366; color: var(--white); }
.btn-whatsapp:hover { background: #1ebe5b; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-danger { background: #b3413a; color: var(--white); }

/* ===== Header / navegação ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  /* Forca o header (position:sticky) para sua propria camada de composicao.
     Sem isso, o Chrome as vezes deixa filhos com border-radius (o botao
     "Area do corretor") com um repaint incompleto/borda cortada ate algum
     evento forcar um novo paint (ex.: :hover) - bug conhecido de sticky +
     border-radius. */
  transform: translateZ(0);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.site-logo .logo-icon { height: 68px; width: auto; flex: none; }
.site-logo .logo-text { font-family: var(--font-serif); font-size: 1.65rem; font-weight: 700; color: var(--navy); line-height: 1.15; white-space: nowrap; }
.site-logo .logo-text small { display: block; font-family: var(--font-sans); font-size: 0.68rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--bronze); }
.main-nav { display: flex; align-items: center; gap: 20px; flex-wrap: nowrap; }
.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { border-color: var(--bronze); color: var(--bronze); }
.main-nav .btn {
  white-space: nowrap; flex: none; padding: 0 26px;
  /* Altura fixa em pixel inteiro (em vez de deixar padding+line-height
     resultar numa altura fracionaria, tipo 47.5625px) - com border-radius:999px
     (do .btn base), uma altura fracionaria fazia o Chrome nao fechar direito a
     borda onde a curva do "bico" da pilula encontra a linha reta debaixo,
     deixando uma pequena abertura visivel so nesse botao. .btn ja e
     display:inline-flex + align-items:center, entao o texto continua
     centralizado verticalmente sem precisar de line-height. */
  height: 44px;
}
/* .main-nav a define border-bottom:2px solid transparent (para o sublinhado dos
   links de texto tipo "Início"/"Imóveis" no hover). Esse botao TAMBEM e um <a>
   dentro de .main-nav, entao tambem e atingido por aquela regra - e como
   border-bottom (longhand) tem mais especificidade que o border-color de
   .btn-outline (que so mexe no shorthand geral), a borda de baixo do botao
   ficava sempre transparente, nunca a cor navy do resto do contorno. */
.main-nav .btn-outline { border-bottom-color: var(--navy); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--navy); }
.nav-fav-link { position: relative; display: flex; align-items: center; color: var(--navy); flex: none; margin-right: 10px; }
.nav-fav-link svg { width: 22px; height: 22px; }
.nav-fav-link.active svg { color: #c0392b; fill: #c0392b; }
.nav-fav-link .fav-count {
  /* Contido dentro da largura do proprio icone (nao usa right negativo) para
     nunca invadir visualmente o botao "Area do corretor" logo ao lado na fila
     do menu - um badge com count visivel sobrepondo a borda fina do botao
     (fundo transparente) fazia parecer que o botao estava com um pedaco cortado. */
  position: absolute; top: -6px; right: -2px; background: var(--bronze); color: var(--white);
  font-size: 0.62rem; font-weight: 700; border-radius: 999px; padding: 1px 5px; min-width: 15px; text-align: center;
}

@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 20px 20px;
    box-shadow: var(--shadow-sm);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { width: 100%; padding: 10px 0; }
}

/* ===== Hero / busca rápida ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ivory);
  padding-bottom: 56px;
}

.hero-media { position: relative; height: clamp(480px, 82vh, 780px); overflow: hidden; }
.hero-media__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 38%;
  transform: scale(1.06);
  animation: heroZoom 7s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(23,45,66,0.82) 0%,
    rgba(23,45,66,0.66) 38%,
    rgba(23,45,66,0.32) 68%,
    rgba(255,255,240,0.96) 100%);
  opacity: 0;
  animation: heroFadeIn 0.9s ease-out 0.1s forwards;
}

.hero-content {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2;
  padding-top: clamp(70px, 16vh, 140px);
  opacity: 0;
  animation: heroTextIn 0.7s ease-out 0.35s forwards;
}
.hero-eyebrow {
  color: var(--beige); font-weight: 700; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 2.5px; margin: 0 0 12px;
}
.hero-title { color: var(--white); text-align: left; max-width: 640px; margin: 0 0 14px; }
.hero-subtitle { color: rgba(255,255,255,0.9); text-align: left; max-width: 540px; font-size: 1.08rem; margin: 0; }

@keyframes heroFadeIn { to { opacity: 1; } }
@keyframes heroTextIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .hero-media__img, .hero-overlay, .hero-content, .search-card { animation: none !important; opacity: 1 !important; transform: none !important; }
}

.search-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin: -64px auto 0;
  max-width: 980px;
  position: relative;
  z-index: 5;
  opacity: 0;
  animation: heroTextIn 0.7s ease-out 0.55s forwards;
}
.hero-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border-light); }
.hero-tab {
  border: none; background: transparent; color: var(--text-secondary);
  font-family: var(--font-sans); font-weight: 700; font-size: 0.95rem;
  padding: 8px 4px 12px; cursor: pointer; border-bottom: 3px solid transparent;
  margin-bottom: -1px; transition: color 0.15s ease, border-color 0.2s ease;
}
.hero-tab.active { color: var(--navy); border-color: var(--bronze); }
.search-card form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}
.search-card .field-group { display: flex; flex-direction: column; gap: 6px; text-align: left; position: relative; }
.search-card label { font-size: 0.78rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }
.search-card .btn svg { width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px; }

/* Autocomplete agrupado (cidade / bairro / codigo) do campo "Onde" */
.autocomplete { position: relative; }
.autocomplete-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  background: var(--white); border: 1px solid var(--border-light); border-radius: 8px;
  box-shadow: var(--shadow); list-style: none; margin: 0; padding: 6px 0;
  max-height: 320px; overflow-y: auto;
}
.autocomplete-group {
  padding: 8px 14px 4px; font-size: 0.7rem; font-weight: 700; color: var(--bronze);
  text-transform: uppercase; letter-spacing: 1px;
}
.autocomplete-option { padding: 9px 14px; font-size: 0.9rem; color: var(--navy); cursor: pointer; }
.autocomplete-option:hover, .autocomplete-option.active { background: var(--beige); }

/* Faixa de confianca discreta abaixo da busca */
.trust-strip {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 30px;
}
.trust-strip li { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: var(--navy); }
.trust-strip svg { width: 17px; height: 17px; flex: none; color: var(--bronze); }

@media (max-width: 640px) {
  .hero-media { height: clamp(340px, 60vh, 520px); }
  .hero-content { padding-top: 52px; }
  .hero-title { font-size: 1.65rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .search-card { margin-top: -40px; padding: 18px; }
  .search-card form { grid-template-columns: 1fr; }
  .trust-strip { justify-content: flex-start; gap: 10px 20px; }
}

/* ===== Formulários ===== */
input, select, textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 11px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--white);
  color: var(--navy);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--bronze);
  box-shadow: 0 0 0 3px rgba(137, 106, 83, 0.15);
}
label { font-weight: 600; font-size: 0.88rem; margin-bottom: 4px; display: block; }
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.checkbox-grid label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.checkbox-grid input { width: auto; }

/* ===== Cards de imóvel ===== */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
  margin-top: 32px;
}
.property-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.property-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--beige); }
.property-card .thumb-track { position: relative; width: 100%; height: 100%; }
.property-card .thumb-track img { display: none; width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.property-card .thumb-track img.active { display: block; }
.property-card .thumb-prev, .property-card .thumb-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  background: rgba(255,255,255,0.85); color: var(--navy); border: none;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; line-height: 1; opacity: 0; transition: opacity 0.15s ease, background 0.15s ease;
}
.property-card .thumb-prev:hover, .property-card .thumb-next:hover { background: var(--white); }
.property-card .thumb:hover .thumb-prev, .property-card .thumb:hover .thumb-next { opacity: 1; }
@media (hover: none) {
  /* telas touch nao tem hover: setas ficam sempre visiveis quando ha mais de 1 foto */
  .property-card .thumb-prev, .property-card .thumb-next { opacity: 1; }
}
.property-card .thumb-prev { left: 8px; }
.property-card .thumb-next { right: 8px; }
.property-card .thumb-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; z-index: 5; }
.property-card .thumb-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.6); }
.property-card .thumb-dots span.active { background: var(--white); }
.property-card .badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--navy); color: var(--white);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 1px;
  padding: 5px 10px; border-radius: 999px; text-transform: uppercase;
}
.property-card .badge.destaque { background: var(--bronze); }
.property-card .badge.badge-drop { top: 46px; background: #a3352c; }
.property-card .badge-card-code {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  background: rgba(23,45,66,0.72); color: var(--white);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.5px;
  padding: 4px 9px; border-radius: 999px;
}
.property-card .fav-btn {
  position: absolute; bottom: 10px; right: 10px; z-index: 6;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.92); color: var(--navy);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.property-card .fav-btn:hover { background: var(--white); transform: scale(1.06); }
.property-card .fav-btn svg { width: 18px; height: 18px; }
.fav-btn.active { color: #c0392b; }
.fav-btn.active svg { fill: currentColor; }

.property-card .body { padding: 18px; }

.property-card .price-old { text-decoration: line-through; color: var(--text-secondary); font-size: 0.85rem; }
.property-card .price { font-family: var(--font-sans); font-weight: 800; font-size: 1.55rem; color: var(--bronze); margin-bottom: 4px; }
.property-card .title { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.property-card .location { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 12px; }

/* Caracteristicas do imovel: uma unica linha divisoria discreta acima, respiro
   maior antes do rodape de acoes (evita o efeito "espremido" das duas linhas
   horizontais que existiam antes acima/abaixo da faixa de caracteristicas). */
.property-card .meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 7px 18px;
  border-top: 1px solid var(--border-light);
  padding-top: 14px;
}

/* Componente reutilizavel icone + valor + rotulo (cards e pagina de imovel). */
.property-feature {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 22px; color: var(--navy); line-height: 1;
}
.property-feature svg { width: 19px; height: 19px; flex: none; color: var(--navy); }
.property-feature__value { font-size: 0.93rem; font-weight: 700; }
.property-feature__label { font-size: 0.79rem; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }

/* Controle "Comparar": botao de selecao com estado claro, nao mais checkbox simples. */
.card-compare {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 16px; padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  font-size: 0.83rem; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.card-compare:hover { border-color: var(--navy); background: var(--beige); }
.card-compare:has(input:focus-visible) { outline: 2px solid var(--bronze); outline-offset: 2px; }
.card-compare input {
  position: absolute; width: 1px; height: 1px; margin: 0; padding: 0;
  opacity: 0; pointer-events: none; border: 0;
}
.card-compare__icon { display: inline-flex; width: 16px; height: 16px; flex: none; }
.card-compare__icon svg { width: 16px; height: 16px; }
.card-compare__icon svg:last-child { display: none; }
.card-compare.is-selected {
  background: var(--navy); border-color: var(--navy); color: var(--white);
}
.card-compare.is-selected .card-compare__icon svg:first-child { display: none; }
.card-compare.is-selected .card-compare__icon svg:last-child { display: inline; }

/* ===== Filtros de listagem ===== */
.filters-bar {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 8px;
}
.filters-bar form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
}
.save-search { margin-top: 20px; }
.save-search-form {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius);
  padding: 14px 18px;
}
.save-search-form label { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; font-weight: 600; color: var(--navy); margin: 0; }
.save-search-form label svg { width: 18px; height: 18px; color: var(--bronze); flex: none; }
.save-search-form input[type="email"] { width: auto; flex: 1; min-width: 180px; }

.results-summary { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 4px; flex-wrap: wrap; gap: 10px; }

.view-toggle { display: flex; border: 1px solid var(--border-color); border-radius: 999px; overflow: hidden; }
.view-toggle button { border: none; background: var(--white); color: var(--navy); font-size: 0.82rem; font-weight: 600; padding: 8px 18px; cursor: pointer; }
.view-toggle button.active { background: var(--navy); color: var(--white); }

.split-view { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; align-items: start; }
.split-list { display: flex; flex-direction: column; gap: 20px; max-height: 720px; overflow-y: auto; padding-right: 6px; }
.split-map { position: sticky; top: 90px; }
.split-map .map-canvas { width: 100%; height: 720px; border-radius: var(--radius); }
@media (max-width: 900px) {
  .split-view { grid-template-columns: 1fr; }
  .split-list { max-height: none; overflow-y: visible; }
  .split-map { position: static; }
  .split-map .map-canvas { height: 360px; }
}

.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  border: 1px solid var(--border-color); background: var(--white); color: var(--navy);
  font-size: 0.82rem; font-weight: 600; padding: 7px 16px; border-radius: 999px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip:hover { border-color: var(--bronze); }
.chip.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

.empty-state { text-align: center; padding: 56px 20px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-top: 24px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); max-width: 460px; margin: 0 auto; }

/* ===== Paginação ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 40px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-weight: 600; font-size: 0.9rem;
  background: var(--white); box-shadow: var(--shadow-sm);
}
.pagination a:hover { background: var(--beige); }
.pagination .current { background: var(--navy); color: var(--white); }

/* ===== Página de imóvel ===== */
.breadcrumb { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--bronze); }
.breadcrumb span { margin: 0 4px; }

.status-banner { background: var(--navy); color: var(--white); padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 600; font-size: 0.92rem; }

.property-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.badge-outline {
  border: 1px solid var(--border-color); color: var(--text-secondary);
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 5px 12px; border-radius: 999px;
}
.badge-outline.badge-code { border-color: var(--bronze); color: var(--bronze); }
.badge-tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 5px 12px; border-radius: 999px; color: var(--white); }
.badge-tag-new { background: var(--navy); }
.badge-tag-drop { background: #a3352c; }

.property-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; }
.property-location { display: flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 0.95rem; margin: 4px 0 0; }
.property-location svg { width: 16px; height: 16px; flex: none; color: var(--navy); }
.property-price-old { text-decoration: line-through; color: var(--text-secondary); font-size: 1rem; text-align: right; }
.property-price { font-family: var(--font-sans); font-weight: 800; font-size: 2.2rem; color: var(--bronze); text-align: right; }

.cost-breakdown { background: var(--white); border: 1px solid var(--border-light); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px; }
.cost-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.92rem; }
.cost-row.cost-total { border-top: 1px solid var(--border-light); margin-top: 6px; padding-top: 12px; font-size: 1rem; color: var(--navy); }

.condition-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.condition-tag { background: #e3f3e6; color: #256a34; font-size: 0.82rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; }

.share-row { display: flex; align-items: center; gap: 10px; margin: 24px 0; font-size: 0.88rem; color: var(--text-secondary); }
.share-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-color);
  background: var(--white); display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--navy); transition: background 0.15s ease, border-color 0.15s ease;
}
.share-btn:hover { background: var(--beige); border-color: var(--bronze); }

.gallery-mosaic { margin-bottom: 12px; }
.gallery-main { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: var(--beige); margin-bottom: 12px; position: relative; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery-counter { position: absolute; bottom: 12px; right: 12px; background: rgba(23,45,66,0.72); color: var(--white); font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.gallery-thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.gallery-thumbs img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: 0.65; flex: none; }
.gallery-thumbs img.active, .gallery-thumbs img:hover { opacity: 1; outline: 2px solid var(--bronze); }

@media (min-width: 900px) {
  .gallery-mosaic { display: grid; grid-template-columns: 3fr 1fr; gap: 10px; align-items: stretch; }
  .gallery-mosaic .gallery-main { margin-bottom: 0; aspect-ratio: auto; height: 460px; }
  .gallery-mosaic .gallery-thumbs {
    flex-direction: column; overflow-x: visible; overflow-y: auto; height: 460px; padding-bottom: 0; padding-right: 2px;
  }
  .gallery-mosaic .gallery-thumbs img { width: 100%; height: 108px; }
}

.mobile-cta-bar { display: none; }
@media (max-width: 700px) {
  .mobile-cta-bar {
    display: flex; gap: 10px; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
    background: var(--white); padding: 10px 14px; box-shadow: 0 -4px 16px rgba(23,45,66,0.12);
  }
  .mobile-cta-bar .btn { flex: 1; }
  body { padding-bottom: 66px; }
}

.lightbox {
  position: fixed; inset: 0; background: rgba(23,45,66,0.92);
  display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: var(--white); font-size: 2rem; cursor: pointer; background: none; border: none; }

.property-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .property-layout { grid-template-columns: 1fr; } }

.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; }
.feature-list li::before { content: '✓'; color: var(--bronze); font-weight: 700; }

.stat-row { display: flex; gap: 26px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--border-light); margin: 20px 0; }
.stat-row .stat { text-align: center; }
.stat-row .stat svg { display: block; margin: 0 auto 8px; width: 26px; height: 26px; color: var(--navy); }
.stat-row .stat strong { display: block; font-family: var(--font-sans); font-weight: 700; font-size: 1.3rem; color: var(--navy); }
.stat-row .stat span { font-size: 0.78rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }

.sidebar-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; margin-bottom: 20px; }
.agent-card { display: flex; align-items: center; gap: 14px; }
.agent-card .avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--beige); }

.map-canvas { width: 100%; height: 280px; border-radius: var(--radius); overflow: hidden; background: var(--beige); }

/* ===== Widget flutuante WhatsApp ===== */
.wa-widget { position: fixed; bottom: 22px; right: 22px; z-index: 100; }
.whatsapp-float {
  background: #25D366; color: var(--white); border: none; cursor: pointer;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  font-size: 1.6rem; margin-left: auto; transition: transform 0.15s ease;
}
.whatsapp-float:hover { transform: scale(1.06); }

.wa-panel {
  position: absolute; bottom: 72px; right: 0; width: 300px;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; opacity: 0; transform: translateY(12px) scale(0.98);
  pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
}
.wa-widget.open .wa-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.wa-panel-header {
  background: var(--navy); color: var(--white); padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
}
.wa-panel-header img { height: 34px; width: auto; flex: none; }
.wa-panel-header-text { display: flex; flex-direction: column; line-height: 1.3; flex: 1; }
.wa-panel-header-text span { font-size: 0.72rem; color: var(--beige); }
.wa-panel-close { background: none; border: none; color: var(--white); font-size: 1.3rem; cursor: pointer; line-height: 1; padding: 0 4px; }
.wa-panel-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #ece5d8; }
.wa-bubble {
  background: var(--white); border-radius: 12px 12px 12px 2px; padding: 10px 14px;
  font-size: 0.88rem; color: var(--navy); box-shadow: var(--shadow-sm); align-self: flex-start;
}
.wa-option {
  background: var(--white); border: 1px solid var(--border-color); border-radius: 999px;
  padding: 10px 16px; font-size: 0.85rem; font-weight: 600; color: var(--navy);
  cursor: pointer; text-align: left; transition: background 0.15s ease, border-color 0.15s ease;
}
.wa-option:hover { background: var(--beige); border-color: var(--bronze); }

@media (max-width: 480px) {
  .wa-panel { width: calc(100vw - 44px); right: -6px; }
}

/* ===== Footer ===== */
.site-footer { background: var(--navy); color: var(--ivory); padding: 56px 0 24px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
/* .footer-heading (nao ".site-footer h4"): os titulos do rodape agora sao
   <h2>, pra fechar a hierarquia de headings da pagina sem pular nivel (h1 do
   conteudo -> ... -> h2 do rodape). O estilo visual e independente da tag. */
.footer-heading { color: var(--white); font-size: 1rem; font-family: var(--font-sans); }
.site-footer a { color: var(--beige); }
.site-footer a:hover { color: var(--white); }
.footer-bottom { text-align: center; padding-top: 30px; margin-top: 30px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.82rem; color: var(--gray); }

/* ===== Páginas institucionais ===== */
.page-header { background: var(--navy); color: var(--white); padding: 50px 0; text-align: center; }
.page-header h1 { color: var(--white); }

/* ===== Mensagens flash ===== */
.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 0.92rem; }
.alert-success { background: #e3f3e6; color: #256a34; }
.alert-error { background: #fbe6e4; color: #a3352c; }

/* ===== Área administrativa ===== */
.admin-body { background: #f4f1ea; }
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; background: var(--navy); color: var(--white);
  flex: none; padding: 24px 18px; display: flex; flex-direction: column; gap: 4px;
}
.admin-sidebar .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.admin-sidebar .brand img { height: 34px; }
.admin-sidebar a {
  padding: 10px 12px; border-radius: 8px; font-size: 0.92rem; font-weight: 600;
  color: var(--beige); display: flex; align-items: center; gap: 10px;
}
.admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,0.1); color: var(--white); }
.admin-sidebar .divider { height: 1px; background: rgba(255,255,255,0.12); margin: 14px 0; }
.admin-main { flex: 1; padding: 26px 32px; max-width: 100%; overflow-x: auto; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-topbar .user-chip { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }

@media (max-width: 860px) {
  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; padding: 14px; }
  .admin-sidebar .brand { margin-bottom: 0; margin-right: auto; }
  .admin-main { padding: 20px; }
}

.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; margin-bottom: 24px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-cards .card { padding: 18px 20px; margin-bottom: 0; }
.stat-cards .num { font-family: var(--font-sans); font-weight: 800; font-size: 2rem; color: var(--bronze); }
.stat-cards .label { font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table th, table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border-light); }
table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); }
table tr:hover td { background: #faf8f2; }
.table-actions { display: flex; gap: 8px; }

.status-pill { padding: 4px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.status-disponivel { background: #e3f3e6; color: #256a34; }
.status-vendido, .status-alugado { background: #eee; color: #666; }
.status-inativo { background: #fbe6e4; color: #a3352c; }

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--navy), #0f1e2d); padding: 20px;
}
.login-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; max-width: 380px; width: 100%; text-align: center; }
.login-card img { height: 46px; margin: 0 auto 18px; }

.form-steps-nav { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 28px; flex-wrap: wrap; }
.form-step-dot {
  display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600;
  color: var(--text-secondary); flex: 1; min-width: 90px; cursor: default;
}
.form-step-dot span {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border-color);
  display: flex; align-items: center; justify-content: center; flex: none; font-size: 0.78rem;
  color: var(--text-secondary); background: var(--white);
}
.form-step-dot.active { color: var(--navy); }
.form-step-dot.active span { border-color: var(--bronze); color: var(--bronze); }
.form-step-dot.done { color: var(--navy); cursor: pointer; }
.form-step-dot.done span { border-color: var(--bronze); background: var(--bronze); color: var(--white); }
.form-step-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.form-step-actions #btnStepBack:not([hidden]) { margin-right: auto; }

.photo-upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin: 14px 0; }
.photo-upload-grid .photo-item { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--beige); }
.photo-upload-grid .photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-upload-grid .cover-badge { position: absolute; top: 6px; left: 6px; background: var(--bronze); color: #fff; font-size: 0.65rem; padding: 3px 7px; border-radius: 999px; }
.photo-upload-grid .remove-btn { position: absolute; top: 6px; right: 6px; background: rgba(163,53,44,0.9); color: #fff; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; }

@media (max-width: 640px) {
  .section { padding-top: 40px; padding-bottom: 40px; }
}

/* ===== Blog ===== */
.blog-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease; display: block;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.blog-card-thumb { aspect-ratio: 16/10; background: var(--beige); overflow: hidden; }
.blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-card .body { padding: 18px; }
.blog-card .location { color: var(--text-secondary); font-size: 0.78rem; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.blog-card .title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.blog-post-content { font-size: 1.02rem; line-height: 1.8; white-space: pre-line; }
.blog-post-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; }

/* ===== Comparador de imóveis ===== */
.compare-table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.compare-table { min-width: 560px; }
.compare-table th, .compare-table td { text-align: center; vertical-align: top; padding: 14px 16px; }
.compare-table thead th { padding: 18px 16px; vertical-align: top; }
.compare-table thead th img { width: 100%; max-width: 180px; height: 110px; object-fit: cover; border-radius: 8px; margin: 0 auto 10px; }
.compare-table .compare-title { font-weight: 700; font-size: 0.92rem; margin-bottom: 10px; min-height: 42px; }
.compare-table tbody th { text-align: left; white-space: nowrap; color: var(--text-secondary); font-size: 0.85rem; }
.compare-table tbody tr:nth-child(even) { background: #faf8f2; }

/* ===== Vistos recentemente ===== */
.vistos-track { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; margin-top: 20px; }
.vistos-item {
  flex: none; width: 160px; background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column;
}
.vistos-item img { width: 100%; height: 100px; object-fit: cover; background: var(--beige); }
.vistos-item .vistos-price { font-weight: 800; color: var(--bronze); font-size: 0.9rem; padding: 8px 10px 0; }
.vistos-item .vistos-title { font-size: 0.78rem; color: var(--text-secondary); padding: 2px 10px 10px; }

/* ===== Barra de comparação flutuante ===== */
.compare-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 95;
  background: var(--navy); box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.compare-bar-inner { display: flex; align-items: center; gap: 14px; padding: 12px 20px; flex-wrap: wrap; }
.compare-bar-count { color: var(--white); font-size: 0.85rem; flex: none; }
.compare-bar-items { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.compare-bar-item {
  background: rgba(255,255,255,0.12); color: var(--white); font-size: 0.8rem;
  padding: 5px 8px 5px 12px; border-radius: 999px; display: flex; align-items: center; gap: 6px;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.compare-bar-remove { background: none; border: none; color: var(--beige); cursor: pointer; font-size: 1rem; line-height: 1; flex: none; }
.compare-bar-go.disabled { pointer-events: none; opacity: 0.5; }

/* Quando a barra de comparacao esta visivel, evita sobrepor o botao do
   WhatsApp e a barra fixa de CTA do celular — desloca ambos para cima. */
body:has(.compare-bar:not([hidden])) .wa-widget {
  bottom: calc(22px + 56px + env(safe-area-inset-bottom, 0));
  transition: bottom 0.2s ease;
}
@media (max-width: 700px) {
  .compare-bar-items { display: none; }
  body:has(.compare-bar:not([hidden])) .mobile-cta-bar { bottom: calc(54px + env(safe-area-inset-bottom, 0)); }
  body:has(.compare-bar:not([hidden])) .wa-widget { bottom: calc(54px + 56px + env(safe-area-inset-bottom, 0)); }
}

/* Aviso discreto do limite de comparacao (substitui alert()). */
.compare-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 150;
  transform: translate(-50%, 12px);
  background: var(--navy); color: var(--white);
  font-size: 0.86rem; font-weight: 600;
  padding: 12px 20px; border-radius: 999px;
  box-shadow: var(--shadow);
  max-width: calc(100vw - 40px); text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.compare-toast.show { opacity: 1; transform: translate(-50%, 0); }
body:has(.compare-bar:not([hidden])) .compare-toast { bottom: calc(24px + 62px + env(safe-area-inset-bottom, 0)); }
@media (max-width: 700px) {
  .compare-toast { bottom: calc(70px + env(safe-area-inset-bottom, 0)); }
  body:has(.compare-bar:not([hidden])) .compare-toast { bottom: calc(70px + 54px + env(safe-area-inset-bottom, 0)); }
}

/* ===== Modal de imóvel (janela flutuante) ===== */
.imovel-modal { position: fixed; inset: 0; z-index: 300; display: none; }
.imovel-modal.open { display: block; }
.imovel-modal-backdrop { position: absolute; inset: 0; background: rgba(23, 45, 66, 0.75); }
.imovel-modal-panel {
  position: relative; z-index: 1;
  max-width: 1560px; width: 96%; margin: 24px auto; background: var(--ivory);
  border-radius: var(--radius); max-height: calc(100vh - 48px); overflow-y: auto;
  padding: 34px 44px; box-shadow: var(--shadow);
}
.imovel-modal-close {
  position: sticky; top: 0; float: right; margin-left: 12px;
  background: var(--white); border: none; width: 38px; height: 38px; border-radius: 50%;
  font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-sm); z-index: 2;
}
.imovel-modal-close:hover { background: var(--beige); }
.imovel-modal-body { clear: both; }
.imovel-modal-loading, .imovel-modal-error { text-align: center; padding: 80px 20px; color: var(--text-secondary); }
body.modal-open { overflow: hidden; }

@media (max-width: 700px) {
  .imovel-modal-panel { margin: 0; max-width: 100%; max-height: 100vh; border-radius: 0; padding: 16px; }
}
