/* Estilos comuns às páginas do site. As cores principais vêm do imobiliaria.json → "tema" → "cores". */
:root {
  --topo: #23383F;        /* fundo do topo */
  --topo-fg: #FFFFFF;
  --barra: #E39A6B;       /* barra Comprar/Alugar e botão principal */
  --barra-fg: #1B1A17;
  --barra-hover: #EAAE87;
  --botao: #B5502E;       /* botões e preços */
  --botao-fg: #FFFFFF;
  --botao-hover: #9B4427;
  --bloco: #FFF1C7;       /* bloco de destaque (amarelo-manteiga) */
  --bloco-fg: #1B1A17;
  --bg: #FBF9F5;          /* fundo da página */
  --surface: #FFFFFF;
  --fg: #1F1D1A;          /* texto */
  --muted: #625A50;       /* texto secundário */
  --line: #E9E3D8;
  --chip: #F2EDE4;
  --ok: #1D7A46;
  --danger: #B3261E;
  --wa: #157F3B;
  --wa-hover: #106B31;

  --f-titulo: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-texto: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 8px;
  --r-md: 12px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.5 var(--f-texto); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--topo); }
:focus-visible { outline: 3px solid var(--botao); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--f-titulo); margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.wa { width: 22px; height: 22px; flex: none; }

/* ---------- Topo ---------- */
.topo { background: var(--topo); color: var(--topo-fg); }
.topo .wrap {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "logo info";
  align-items: center; column-gap: 14px; padding-block: 16px 18px;
}
.marca { grid-area: logo; margin: 0; line-height: 0; }
.marca a { display: inline-block; }
.marca img { display: block; width: 100%; max-width: 250px; height: auto; }
.logo-redondo .marca img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; max-width: 140px; }
.info { grid-area: info; display: grid; gap: 10px; min-width: 0; justify-items: start; }
.fatos { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; font-size: .74rem; font-weight: 600; line-height: 1.35; }
.fatos li { display: flex; align-items: flex-start; gap: 5px; }
.fatos svg.i { width: 13px; height: 13px; margin-top: 1px; opacity: .85; }
.fatos .creci { opacity: .8; font-weight: 500; }
.topo .placa { grid-area: placa; display: none; }
.info .placa-mini { display: inline-flex; }

.redes { display: flex; gap: 10px; }
.redonda {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #FFFFFF; text-decoration: none;
  transition: transform .15s var(--ease-out), filter .15s;
}
.redonda:hover { filter: brightness(.92); }
.redonda:active { transform: scale(.95); }
.redonda svg.i { width: 20px; height: 20px; stroke-width: 2.1; }
.r-wa { background: #157F3B; }
.r-ig { background: #B42F72; }
.r-maps { background: #C5372C; }
@media (max-width: 359.98px) { .redes { gap: 7px; } .redonda { width: 36px; height: 36px; } .redonda svg.i { width: 18px; height: 18px; } }

@media (min-width: 760px) {
  .topo .wrap { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "logo info placa"; column-gap: 36px; padding-block: 22px 26px; }
  .marca img { width: 280px; max-width: none; }
  .fatos { font-size: .95rem; gap: 7px; }
  .fatos svg.i { width: 18px; height: 18px; margin-top: 1px; }
  .fatos li { gap: 8px; }
  .redonda { width: 44px; height: 44px; }
  .topo .placa { display: grid; margin-top: -22px; }
  .info .placa-mini { display: none; }
}

/* Placa "Aberto / Fechado" */
.placa { display: grid; justify-items: center; transform-origin: 50% 0; }
.placa-fio { width: 96px; height: 22px; display: block; fill: #D9CDB8; stroke: #D9CDB8; stroke-width: 1.6; }
.placa-fio path { fill: none; }
.placa-quadro { display: grid; justify-items: center; min-width: 140px; margin-top: -1px; padding: 10px 18px 11px; border-radius: 10px; background: #FFF6DF; color: #231F1A; box-shadow: 0 10px 18px -10px rgba(0, 0, 0, .7); }
.placa-palavra { font-family: var(--f-titulo); font-weight: 800; font-size: 1.9rem; line-height: 1; letter-spacing: -0.01em; color: #1D7A46; }
.placa.is-fechado .placa-palavra { color: #B3261E; }
.placa.is-aberto { animation: balanca 1.6s var(--ease-out) .2s both; }
@keyframes balanca { 0% { transform: rotate(-7deg); } 35% { transform: rotate(4deg); } 65% { transform: rotate(-1.5deg); } 100% { transform: rotate(0); } }
.placa-mini { align-items: center; padding: 3px 10px; border-radius: 6px; background: #FFF6DF; font-family: var(--f-titulo); font-weight: 800; font-size: .82rem; line-height: 1.3; color: #1D7A46; }
.placa-mini.is-fechado { color: #B3261E; }
@media (prefers-reduced-motion: reduce) { .placa.is-aberto { animation: none; } }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 18px; border-radius: 999px;
  border: 0; cursor: pointer; font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, transform .15s var(--ease-out), box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn-principal { background: var(--botao); color: var(--botao-fg); }
.btn-principal:hover { background: var(--botao-hover); }
.btn-wa { background: var(--wa); color: #FFFFFF; }
.btn-wa:hover { background: var(--wa-hover); }
.btn-contorno { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 2px var(--fg); }
.btn-contorno:hover { background: var(--fg); color: var(--bg); }
.btn-leve { background: var(--chip); color: var(--fg); }
.btn-leve:hover { background: var(--line); }

/* ---------- Etiquetas ---------- */
.etq { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.etq-venda { background: #23383F; color: #FFFFFF; }
.etq-aluguel { background: #2F6B4F; color: #FFFFFF; }
.etq-codigo { background: var(--chip); color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Rodapé ---------- */
.rodape { margin-top: 48px; padding-block: 32px calc(40px + env(safe-area-inset-bottom, 0px)); background: var(--topo); color: var(--topo-fg); font-size: .9rem; }
.rodape p { margin: 0 0 4px; opacity: .9; }
.rodape a { color: inherit; font-weight: 700; }
.rodape-grade { display: grid; gap: 22px; }
.rodape-nome { font-family: var(--f-titulo); font-weight: 800; font-size: 1.15rem; opacity: 1 !important; }
.rodape-titulo { font-weight: 800; opacity: 1 !important; margin-bottom: 6px !important; }
@media (min-width: 760px) { .rodape-grade { grid-template-columns: 1.4fr 1fr 1fr; } }

.carregando, .erro-carga { padding: 48px 0; color: var(--muted); text-align: center; }
