/**
 * Tema `tema03` — Clássico, marinho e dourado.
 *
 * Desenho de um designer: topo branco, capa em duas metades (texto sobre marinho + foto), caixa de busca
 * sobreposta, cartões brancos de borda fina, faixa "Quer anunciar seu imóvel?" e rodapé claro — e as páginas
 * internas (imóveis, ficha, blog, contato, Sobre) no mesmo desenho. Folha única, sem Bootstrap e sem herdar CSS
 * de outro tema. Tipografia: DM Sans (texto) e Playfair Display (títulos), servidas daqui (pasta `fonts/`).
 *
 * Cores: o tema nasce com a paleta do desenho e a imobiliária pode trocá-la no painel (color picker).
 *   --cor-principal   botões e realces                  (padrão #edbc67, dourado)
 *   --cor-secundaria  faixas escuras: capa e anúncio    (padrão #11182e, marinho)
 *   --cor-topo-fundo  fundo do topo e do rodapé         (padrão #ffffff)
 *   --cor-font-topo   letra do topo e do rodapé         (padrão #11182e)
 * Sem cor escolhida o `var()` cai nestes padrões — as mesmas cores declaradas em `theme.json`.
 */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/dm-sans.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 500; font-display: swap; src: url(fonts/playfair-italic.woff2) format('woff2'); }
@font-face { font-family: 'Playfair Display'; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/playfair.woff2) format('woff2'); }

body#template {
  --ouro: var(--cor-principal, #edbc67);
  --ouro-forte: color-mix(in srgb, var(--ouro) 88%, #000);
  --sobre-ouro: #11182e;
  --ink: #11182e;
  --floresta: var(--cor-secundaria, #11182e);
  /* Letra sobre a faixa escura: branca, ou preta se a imobiliária escolher uma cor clara. */
  --sobre-floresta: #ffffff;
  --muted: #5e626a;
  --papel: #f8f6f1;
  --branco: #ffffff;
  --linha: #e6e0d6;
  --cobre: #805c27;
  --destaque-texto: #946416;
  --serif: "Playfair Display", Georgia, serif;
  margin: 0;
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  font-synthesis: none;
  color: var(--ink);
  background: var(--papel);
}
@supports (color: oklch(from red l c h)) {
  body#template {
    --sobre-ouro: oklch(from var(--ouro) clamp(0, (0.62 - l) * 1000, 1) 0 0);
    --sobre-floresta: oklch(from var(--floresta) clamp(0, (0.62 - l) * 1000, 1) 0 0);
  }
}
body#template *, body#template *::before, body#template *::after { box-sizing: border-box; }
body#template .raiz { min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
body#template .principal { width: 100%; flex: 1; }
body#template a { color: inherit; text-decoration: none; }
body#template a:hover { text-decoration: underline; text-underline-offset: 4px; }
body#template button, body#template input, body#template select, body#template textarea { font: inherit; }
body#template button, body#template select, body#template summary { cursor: pointer; }
body#template h1, body#template h2, body#template h3, body#template p { margin: 0; }
body#template h1, body#template h2, body#template h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; }
body#template h1, body#template h2 { letter-spacing: -.045em; }
body#template img { display: block; max-width: 100%; }
body#template [hidden], body#template [x-cloak] { display: none !important; }
body#template a:focus-visible, body#template button:focus-visible, body#template summary:focus-visible, body#template select:focus-visible, body#template input:focus-visible, body#template textarea:focus-visible { outline: 2px solid #946416; outline-offset: 4px; }
body#template .sangra { width: 100vw; margin-left: calc(50% - 50vw); }
body#template svg.icon { display: inline-block; width: 19px; height: 19px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; flex: none; }
body#template .soLeitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body#template .t03-pular { position: absolute; top: -100px; left: 16px; z-index: 200; padding: 10px; background: #fff; }
body#template .t03-pular:focus { top: 10px; }

/* ====== botões ====== */
body#template .t03-botao, body#template .btn { display: inline-flex; gap: 9px; align-items: center; justify-content: center; width: fit-content; min-height: 46px; padding: 9px 17px; border: 1px solid transparent; border-radius: 6px; font-weight: 700; font-size: 15px; line-height: 1.25; white-space: nowrap; cursor: pointer; }
body#template .t03-botao:hover, body#template .btn:hover { text-decoration: none; filter: brightness(.94); }
body#template .t03-contorno, body#template .btn { border-color: #d3c8b8; color: var(--ink); background: transparent; }
body#template .t03-primario, body#template .btn.primary { background: var(--ouro); border-color: var(--ouro); color: var(--sobre-ouro); }
body#template .t03-escuro, body#template .btn.dark { background: var(--floresta); border-color: var(--floresta); color: var(--sobre-floresta); }
body#template .btn.sm { min-height: 38px; padding: 6px 12px; font-size: 13px; }
body#template .btn:disabled { opacity: .45; cursor: default; }
body#template .btn.larguraTotal, body#template .larguraTotal { width: 100%; }

/* ====== peças comuns ====== */
body#template .t03-sobretitulo, body#template .eyebrow { display: flex; gap: 11px; align-items: center; margin: 0 0 17px; font-weight: 700; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
body#template .t03-sobretitulo::before, body#template .eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
body#template .eyebrow { color: #805c27; margin-bottom: 9px; }
body#template .page-head h1 { font-size: clamp(34px, 4vw, 53px); }

/* ====== topo ====== */
body#template .t03-topo, body#template .t03-rodape { background: var(--cor-topo-fundo, var(--branco)); color: var(--cor-font-topo, var(--ink)); }
body#template .t03-miolo { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
body#template .t03-topo-miolo { display: flex; min-height: 89px; align-items: center; justify-content: space-between; gap: 30px; position: relative; }
body#template .t03-marca { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
body#template .t03-marca:hover { text-decoration: none; }
body#template .t03-marca img { display: block; max-height: 56px; max-width: 200px; width: auto; height: auto; object-fit: contain; }
body#template .t03-marca strong { display: block; font: 500 22px/1.15 var(--serif); letter-spacing: -.03em; }
body#template .t03-marca small { display: block; margin-top: 4px; font-size: 9px; text-transform: uppercase; font-weight: 700; letter-spacing: .15em; }
body#template .t03-menu { display: flex; align-items: center; gap: 29px; font-size: 14px; font-weight: 600; }
body#template .t03-topo-acoes { display: flex; align-items: center; gap: 10px; flex: none; }
body#template .t03-menu-botao, body#template .t03-menu-fundo, body#template .t03-gaveta-menu { display: none; }
/* WhatsApp: SEMPRE no verde do WhatsApp, em qualquer tema de cor e em qualquer lugar do site. Letra escura porque
   branco sobre este verde não passa no contraste de leitura. */
body#template .t03-whatsapp, body#template a.btn.t03-whatsapp { background: #25d366; border-color: #25d366; color: #052e16; }
body#template .t03-whatsapp:hover { background: #1fbd5a; border-color: #1fbd5a; filter: none; }
body#template .t03-menu a[aria-current] { border-bottom: 2px solid #c38d36; padding-block: 7px; }

/* ====== capa: texto sobre marinho + foto na metade direita ====== */
body#template .public-main.t03-main-home { max-width: none; padding: 0; width: 100%; }
body#template .t03-hero { position: relative; background: var(--floresta); color: var(--sobre-floresta); isolation: isolate; }
body#template .t03-hero-foto { position: absolute; inset: 0 0 0 50%; overflow: hidden; background: color-mix(in srgb, var(--floresta) 78%, #5d7a92); }
/* Junção foto/fundo: a foto nasce do fundo escuro com um degradê suave (sem corte seco). No computador a foto é a metade
   direita e se dissolve para a esquerda; no celular não há degradê (a foto fica embaixo do texto, inteira). */
body#template .t03-hero-foto::after { content: ""; position: absolute; inset: 0 0 0 -1px; pointer-events: none; background: linear-gradient(90deg, var(--floresta) 0%, color-mix(in srgb, var(--floresta) 99%, transparent) 4%, color-mix(in srgb, var(--floresta) 95%, transparent) 9%, color-mix(in srgb, var(--floresta) 87%, transparent) 14%, color-mix(in srgb, var(--floresta) 75%, transparent) 19%, color-mix(in srgb, var(--floresta) 60%, transparent) 25%, color-mix(in srgb, var(--floresta) 44%, transparent) 31%, color-mix(in srgb, var(--floresta) 28%, transparent) 37%, color-mix(in srgb, var(--floresta) 14%, transparent) 42%, color-mix(in srgb, var(--floresta) 5%, transparent) 46%, transparent 50%), linear-gradient(0deg, color-mix(in srgb, var(--floresta) 47%, transparent), transparent 32%); }
body#template .t03-hero-trilho { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
body#template .t03-hero-trilho::-webkit-scrollbar { display: none; }
body#template .t03-hero-slide { position: relative; flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; }
body#template .t03-hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; user-select: none; -webkit-user-drag: none; }
body#template .t03-hero-seta { position: absolute; z-index: 2; top: 42%; width: 42px; height: 42px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--floresta) 70%, transparent); color: #fff; }
body#template .t03-hero-seta:hover { background: var(--floresta); }
body#template .t03-hero-seta.volta { left: 14px; }
body#template .t03-hero-seta.proxima { right: 14px; }
body#template .t03-hero-seta.volta svg { transform: scaleX(-1); }
body#template .t03-hero-legenda { position: absolute; z-index: 2; bottom: 92px; right: max(30px, calc((100vw - 1200px) / 2)); display: flex; align-items: center; gap: 14px; max-width: min(340px, calc(50vw - 40px)); padding: 9px 13px; background: color-mix(in srgb, var(--floresta) 86%, transparent); border-radius: 5px; color: #fff; font-size: 12px; line-height: 1.35; }
body#template .t03-hero-legenda:hover { text-decoration: none; background: var(--floresta); }
body#template .t03-hero-legenda > span { flex: 1; min-width: 0; }
body#template .t03-hero-legenda svg { flex: none; }
body#template .t03-hero-legenda small { display: block; margin-bottom: 2px; color: var(--ouro); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
body#template .t03-hero-legenda strong { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body#template .t03-hero-pontos { position: absolute; z-index: 2; bottom: 66px; right: max(30px, calc((100vw - 1200px) / 2)); display: flex; gap: 4px; }
body#template .t03-hero-pontos button { position: relative; width: 24px; height: 24px; padding: 0; border: 0; background: none; }
body#template .t03-hero-pontos button::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: #ffffff8c; transition: background .2s, transform .2s; }
body#template .t03-hero-pontos button[aria-current="true"]::before { background: var(--ouro); transform: scale(1.3); }
body#template .t03-hero-inner { position: relative; pointer-events: none; min-height: 506px; padding-block: 74px 118px; }
body#template .t03-hero-texto { max-width: 49%; pointer-events: auto; }
body#template .t03-hero .t03-sobretitulo { color: var(--ouro); }
body#template .t03-hero h1 { font-size: clamp(44px, 5.25vw, 76px); letter-spacing: -.045em; color: var(--sobre-floresta); }
body#template .t03-hero h1 em { color: var(--ouro); font-weight: 500; }
body#template .t03-hero-texto > p:last-child { max-width: 410px; margin-top: 24px; font-size: 17px; color: color-mix(in srgb, var(--sobre-floresta) 88%, transparent); }

/* ====== busca da home (caixa sobreposta à capa) ====== */
body#template .t03-busca { position: relative; margin-top: -62px; background: var(--branco); border: 1px solid var(--linha); border-radius: 10px; padding: 20px 24px 16px; box-shadow: 0 12px 32px #17203612; }
body#template .t03-busca h2 { font: 700 16px/1.3 "DM Sans", Arial, sans-serif; letter-spacing: 0; margin: 0 0 13px; }
body#template .t03-busca-linha { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); align-items: end; gap: 13px; }
body#template .t03-busca .busca-campo-pesquisa { grid-column: span 2; }
body#template .t03-busca .field { display: grid; gap: 5px; font-size: 12px; font-weight: 700; }
body#template .t03-busca input, body#template .t03-busca select,
body#template .field input:not([type="checkbox"]):not([type="radio"]), body#template .field select, body#template .field textarea { display: block; width: 100%; min-width: 0; min-height: 46px; padding: 0 11px; background: #faf9f6; border: 1px solid var(--linha); border-radius: 5px; color: var(--ink); font-size: 14px; font-weight: 400; }
body#template .field textarea { min-height: 110px; padding: 10px 11px; resize: vertical; }
body#template .t03-busca input::placeholder, body#template .field input::placeholder { color: #62666f; }
body#template label.field, body#template .field label { font-size: 13px; font-weight: 700; }

/* ====== imóveis em destaque ====== */
body#template .t03-destaques { padding-block: 64px 72px; }
body#template .t03-secao-topo { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 25px; }
body#template .t03-secao-topo h2 { font-size: clamp(34px, 4vw, 53px); }
body#template .t03-vazio-destaques { color: var(--muted); }
body#template .property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
body#template .property-card { position: relative; min-width: 0; background: var(--branco); border: 1px solid var(--linha); border-radius: 9px; overflow: hidden; }
body#template .property-card > a { display: flex; height: 100%; flex-direction: column; }
body#template .property-card > a:hover { text-decoration: none; }
body#template .property-card > a:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
body#template .card-image { position: relative; overflow: hidden; background: #e8e1d6; }
body#template .card-image img { width: 100%; height: auto; aspect-ratio: 1.62; object-fit: cover; object-position: center 48%; transition: transform .3s ease; }
body#template .property-card:hover .card-image img { transform: scale(1.035); }
body#template .card-badge { position: absolute; top: 13px; left: 13px; background: #fff; color: var(--ink); border-radius: 4px; padding: 4px 10px; font-size: 11px; font-weight: 700; }
body#template .card-badge.negociado { background: #6b7280; color: #fff; }
body#template .card-body { padding: 18px; display: flex; flex: 1; flex-direction: column; }
body#template .location { margin: 0 0 6px; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; }
body#template .location svg, body#template .facts svg { width: 15px; height: 15px; }
body#template .property-card h3 { font-size: 24px; }
body#template .facts { display: flex; flex-wrap: wrap; gap: 10px 15px; margin: 14px 0; font-size: 12px; color: var(--muted); }
body#template .facts span { display: inline-flex; align-items: center; gap: 4px; }
body#template .card-bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--linha); padding-top: 12px; }
body#template .price { font-size: 19px; font-weight: 700; }
body#template .price small { font-size: 12px; font-weight: 400; color: var(--muted); }
body#template .reference { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
body#template .card-arrow { display: grid; place-items: center; background: #f4eee3; color: #5e4726; width: 37px; height: 37px; border-radius: 50%; flex: none; }
body#template .photo-fallback { background: linear-gradient(135deg, #ddd5c6, #f1ebe0); }

/* ====== faixa "Quer anunciar seu imóvel?" ====== */
body#template .t03-anuncie { display: flex; justify-content: space-between; gap: 25px; align-items: center; padding: 39px 43px; background: var(--floresta); color: var(--sobre-floresta); border-radius: 9px; margin-bottom: 68px; }
body#template .t03-anuncie h2 { font-size: clamp(30px, 3.3vw, 43px); color: var(--sobre-floresta); }
body#template .t03-anuncie p { margin: 10px 0 0; color: color-mix(in srgb, var(--sobre-floresta) 88%, transparent); }

/* ====== rodapé ====== */
body#template .t03-rodape { border-top: 1px solid var(--linha); }
body#template .t03-rodape-miolo { padding-block: 25px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
body#template .t03-rodape-links { display: flex; flex-wrap: wrap; gap: 10px 20px; font-size: 14px; }
body#template .t03-rodape-links a { display: inline-flex; align-items: center; gap: 6px; }
body#template .t03-rodape small { color: var(--muted); }
body#template .t03-rodape-base { padding: 0 0 70px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
body#template .t03-rodape-base span { display: flex; gap: 16px; flex-wrap: wrap; }
body#template .t03-flutuante { position: fixed; right: 16px; bottom: 17px; width: 55px; height: 55px; border-radius: 50%; background: #27cc7a; color: #fff; display: grid; place-items: center; z-index: 100; box-shadow: 0 4px 12px #0003; }
body#template .t03-flutuante:hover { background: #21b76c; text-decoration: none; }
body#template .t03-flutuante::before, body#template .t03-flutuante::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid #27cc7a; opacity: 0; pointer-events: none; animation: t03-onda 2.6s ease-out infinite; }
body#template .t03-flutuante::after { animation-delay: 1.3s; }
@keyframes t03-onda { 0% { transform: scale(1); opacity: .75; } 100% { transform: scale(2.2); opacity: 0; } }

/* ====== responsivo da home (pontos de quebra do desenho: 1010 / 790 / 560) ====== */
@media (max-width: 1010px) {
  body#template .t03-miolo { width: calc(100% - 48px); }
  body#template .t03-menu { gap: 16px; }
  body#template .t03-topo-miolo { gap: 15px; }
  body#template .t03-hero-inner { min-height: 460px; }
  body#template .t03-hero-legenda, body#template .t03-hero-pontos { right: 24px; }
  body#template .property-grid { gap: 14px; }
  body#template .card-body { padding: 14px; }
}
@media (max-width: 790px) {
  body#template .t03-topo-miolo { min-height: 72px; }
  body#template .t03-marca img { max-height: 46px; max-width: 150px; }
  body#template .t03-busca-linha { grid-template-columns: repeat(3, 1fr); }
  body#template .t03-busca .busca-campo-pesquisa { grid-column: 1 / -1; }
  body#template .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body#template .t03-destaques { padding-block: 49px; }
  body#template .t03-anuncie { margin-bottom: 48px; }
}
@media (max-width: 560px) {
  body#template .t03-miolo { width: calc(100% - 32px); }
  body#template .t03-hero { display: flex; flex-direction: column-reverse; }
  body#template .t03-hero-foto { position: relative; inset: auto; height: 245px; }
  body#template .t03-hero-foto::after { display: none; }
  body#template .t03-hero-slide img { object-position: 50% 45%; }
  body#template .t03-hero-seta { width: 38px; height: 38px; top: 38%; }
  body#template .t03-hero-legenda { bottom: 26px; right: 16px; left: 16px; max-width: none; }
  body#template .t03-hero-pontos { bottom: 78px; right: 8px; }
  body#template .t03-hero-inner { min-height: auto; padding-block: 34px 29px; }
  body#template .t03-hero-texto { max-width: 100%; }
  body#template .t03-hero h1 { font-size: clamp(42px, 10.5vw, 57px); }
  body#template .t03-hero-texto > p:last-child { font-size: 15px; margin-top: 16px; }
  body#template .t03-busca { margin-top: -14px; padding: 16px; }
  body#template .t03-busca-linha { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body#template .t03-busca-linha > button { grid-column: 1 / -1; }
  body#template .t03-busca input, body#template .t03-busca select { font-size: 16px; }
  body#template .t03-secao-topo { align-items: start; flex-direction: column; }
  body#template .property-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  body#template .t03-anuncie { align-items: start; flex-direction: column; padding: 24px; }
  body#template .t03-rodape-miolo { align-items: start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  body#template .card-image img { transition: none; }
  body#template .t03-gaveta-menu, body#template .t03-gaveta-menu.aberto, body#template .t03-menu-fundo, body#template .t03-menu-fundo.aberto, body#template .property-card { transition: none; }
  body#template .t03-flutuante::before, body#template .t03-flutuante::after { animation: none; display: none; }
}

/* ====== páginas internas (mesmo desenho) ====== */
body#template .public-main { width: min(100% - 80px, 1200px); margin-inline: auto; padding: 44px 0 70px; }
body#template .page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
body#template .subtitle { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 560px; }
body#template .actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
body#template .panel { background: var(--branco); border: 1px solid var(--linha); border-radius: 12px; margin-bottom: 20px; overflow: hidden; }
body#template .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 22px 24px 8px; }
body#template .panel-head h2 { font-size: 26px; letter-spacing: -.04em; }
body#template .panel-head small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
body#template .panel-body { padding: 10px 24px 26px; }
body#template .muted { color: var(--muted); }
body#template .link { border: 0; background: none; color: var(--cobre); font-weight: 700; padding: 0; display: inline-flex; align-items: center; gap: 5px; text-decoration: underline; text-underline-offset: 5px; }
body#template .grid { display: grid; gap: 20px; }
body#template .grid.two { grid-template-columns: 1fr 1fr; }
body#template .list-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--linha); }
body#template .list-row:last-child { border: 0; }
body#template .badge { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 4px; background: #f4eee3; color: #805c27; display: inline-block; white-space: nowrap; }
body#template .badge.blue { background: #e6eee9; color: #345446; }
body#template .empty { padding: 50px 20px; text-align: center; color: var(--muted); }
body#template .empty .icon { width: 32px; height: 32px; margin-bottom: 12px; }
body#template .empty p { margin: 10px 0 18px; }
body#template .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
body#template .field { display: flex; flex-direction: column; min-width: 0; }
body#template .field.full { grid-column: 1/-1; }
body#template .check { display: flex; align-items: center; gap: 9px; font-size: 14px; line-height: 1.6; }
body#template .check input { accent-color: var(--floresta); height: 16px; width: 16px; flex-shrink: 0; }
body#template .checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
body#template .formulario { display: grid; gap: 16px; }
body#template .isca { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
body#template .erro { background: #fbeceb; color: #a1473d; border: 1px solid #f0cfcb; border-radius: 6px; padding: 10px 12px; font-size: 13px; line-height: 1.6; }
body#template .sucesso { background: #eaf3ec; color: #2c5a3d; border: 1px solid #cfe2d6; border-radius: 8px; padding: 18px; line-height: 1.7; }
body#template .sucesso b { display: block; font-size: 16px; margin-bottom: 4px; }
body#template .avisoWhatsapp { font-size: 13px; color: var(--muted); }
body#template .corpo { font-size: 16px; line-height: 1.85; color: #3a4152; max-width: 860px; overflow-wrap: anywhere; }
body#template .corpo p, body#template .corpo div { margin: 0 0 14px; }
body#template .corpo h2, body#template .corpo h3 { color: var(--ink); margin: 26px 0 10px; font-size: 28px; }
body#template .corpo ul, body#template .corpo ol { padding-left: 22px; margin: 0 0 14px; }
body#template .acao { margin-top: 20px; }
body#template .postagem { display: grid; gap: 8px; }
body#template .postagem time { font-size: 12px; color: var(--muted); }

/* listagem: filtro e cartões */
body#template .public-search { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-items: end; margin: 0 0 30px; }
body#template .public-search .field { min-width: 0; }
body#template .public-search .busca-campo-pesquisa { grid-column: span 2; }
body#template .t03-botao-ouro { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border: 1px solid var(--ouro); background: var(--ouro); color: var(--sobre-ouro); border-radius: 7px; font-weight: 700; }
body#template .property-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
body#template .photo-fallback { background: linear-gradient(135deg, #ddd5c6, #f1ebe0); }
body#template .paginacao { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 30px; font-size: 13px; color: var(--muted); }
body#template .pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; }
body#template .pagination .btn { min-width: 40px; min-height: 40px; padding: 6px 10px; }
body#template .pagination .gap { min-width: 20px; text-align: center; }
body#template .pagination .current { background: var(--floresta); border-color: var(--floresta); color: var(--branco); }

/* ficha do imóvel */
body#template .detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
body#template .detail-layout > * { min-width: 0; }
body#template .side-card { padding: 24px; }
body#template .side-card .price { font-family: var(--serif); font-size: 38px; letter-spacing: -.05em; margin: 8px 0 18px; }
body#template .side-card .btn { width: 100%; margin-top: 8px; }
body#template .side-card h3 { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--linha); font-size: 18px; }
body#template .metricas { display: flex; flex-wrap: wrap; gap: 28px; padding: 6px 0 22px; margin-bottom: 22px; border-bottom: 1px solid var(--linha); }
body#template .metrica, body#template .caracteristica { display: flex; align-items: center; gap: 10px; }
body#template .metricaIcone, body#template .caracteristicaIcone { color: var(--cobre); flex-shrink: 0; stroke-width: 2; }
body#template .metricas b { font-size: 22px; display: block; }
body#template .metricas small { font-size: 12px; color: var(--muted); }
body#template .description { font-size: 16px; line-height: 1.85; color: #3a4152; }
body#template .data-pairs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
body#template .data-pairs dt { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
body#template .data-pairs dd { margin: 0; font-size: 15px; }
body#template .video { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: 9px; overflow: hidden; background: #0f1c18; margin-top: 20px; }
body#template .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
body#template .midia-imovel iframe, body#template .midia-imovel img, body#template .midia-imovel embed, body#template .midia-imovel object, body#template .midia-imovel video, body#template .midia-imovel table { max-width: 100%; }
body#template .galeria { margin-bottom: 20px; }
body#template .galeria-principal { position: relative; aspect-ratio: 4 / 3; max-height: 520px; width: 100%; border-radius: 9px; overflow: hidden; background: #e8e1d6; }
/* Carrossel: a foto acompanha o dedo e encaixa na próxima (rolagem horizontal nativa + scroll-snap). */
body#template .galeria-trilho, body#template .lb-trilho { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
body#template .galeria-trilho::-webkit-scrollbar, body#template .lb-trilho::-webkit-scrollbar { display: none; }
body#template .galeria-trilho { height: 100%; }
body#template .galeria-slide { all: unset; box-sizing: border-box; flex: 0 0 100%; width: 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; cursor: zoom-in; }
body#template .galeria-slide:disabled { cursor: default; }
body#template .galeria-slide:focus-visible { outline: 3px solid var(--cobre); outline-offset: -3px; }
body#template .galeria-slide img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }
body#template .galeria-seta { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: #000a; color: #fff; font-size: 26px; line-height: 1; }
body#template .galeria-seta.volta { left: 10px; }
body#template .galeria-seta.proxima { right: 10px; }
body#template .galeria-contador { position: absolute; left: 10px; bottom: 10px; background: #000a; color: #fff; border-radius: 20px; padding: 4px 10px; font-size: 12px; }
body#template .galeria-todas { position: absolute; right: 10px; bottom: 10px; background: var(--branco); border-color: var(--linha); }
body#template .galeria-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
body#template .galeria-mini button { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 7px; overflow: hidden; background: #e8e1d6; }
body#template .galeria-mini button.ativa { border-color: var(--cobre); }
body#template .galeria-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
body#template .galeria-mais { position: absolute; inset: 0; display: grid; place-items: center; background: #000b; color: #fff; font-size: 20px; font-weight: 700; }
body#template .galeria-acoes { margin-top: 8px; display: flex; justify-content: flex-end; }
/* galeria em tela cheia (sem biblioteca externa) */
/* A linha da foto é `minmax(0, 1fr)` e não `1fr`: `1fr` não encolhe abaixo do tamanho natural da foto, e numa janela baixa a foto vertical
   empurrava o conteúdo e ficava cortada por baixo das miniaturas. */
body#template .lb { position: fixed; inset: 0; z-index: 1000; background: #000e; display: grid; grid-template-columns: 56px 1fr 56px; grid-template-rows: minmax(0, 1fr) auto; align-items: center; }
body#template .lb-trilho { grid-column: 2; grid-row: 1; height: 100%; min-height: 0; min-width: 0; padding-top: 48px; padding-bottom: 8px; }
/* Flex e não grid: numa grade, a linha interna crescia até o tamanho natural da foto e o `max-height: 100%` da imagem não tinha de onde partir. */
body#template .lb-slide { flex: 0 0 100%; width: 100%; height: 100%; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; scroll-snap-stop: always; }
body#template .lb-slide img { max-width: 100%; max-height: 100%; min-width: 0; min-height: 0; object-fit: contain; user-select: none; -webkit-user-drag: none; }
body#template .lb-contador { position: absolute; top: 12px; left: 16px; color: #fff; font-size: 13px; }
body#template .lb-fechar { position: absolute; top: 6px; right: 12px; background: none; border: 0; color: #fff; font-size: 34px; line-height: 1; padding: 6px 10px; z-index: 2; }
body#template .lb-seta { background: none; border: 0; color: #fff; font-size: 44px; line-height: 1; height: 100%; width: 100%; opacity: .85; }
body#template .lb-seta:hover { opacity: 1; }
body#template .lb-seta.volta { grid-column: 1; grid-row: 1; }
body#template .lb-seta.proxima { grid-column: 3; grid-row: 1; }
body#template .lb-minis { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 8px; justify-content: safe center; overflow-x: auto; padding: 10px 14px 14px; }
body#template .lb-minis button { flex: 0 0 auto; width: 90px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 4px; overflow: hidden; background: #222; opacity: .6; }
body#template .lb-minis button.ativa { border-color: #fff; opacity: 1; }
body#template .lb-minis img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Gaveta do filtro (só celular) */
body#template .t03-fundo, body#template .t03-gaveta-fechar, body#template .t03-gaveta-cab, body#template .t03-gatilho-lista { display: none; }

@media (max-width: 1060px) {
  body#template .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body#template .detail-layout { grid-template-columns: minmax(0, 1fr) 290px; }
}
@media (max-width: 960px) {
  body#template .detail-layout { grid-template-columns: minmax(0, 1fr); }
  body#template .checks { grid-template-columns: repeat(2, 1fr); }
}
@media (hover: none) { body#template .galeria-seta { display: none; } }
@media (max-width: 680px) {
  body#template .page-head .actions { margin-top: 14px; }
  body#template .public-main { padding: 28px 0 46px; }
  body#template .property-grid, body#template .form-grid, body#template .grid.two { grid-template-columns: 1fr; }
  body#template .checks { grid-template-columns: 1fr 1fr; gap: 12px; }
  body#template .data-pairs { gap: 18px; }
  body#template .metricas { gap: 20px; }
  body#template .galeria-mini { gap: 6px; }
  body#template .lb { grid-template-columns: 1fr; }
  body#template .lb-seta { display: none; }
  body#template .lb-trilho { grid-column: 1; }

  /* Filtro da listagem: botão "Filtrar imóveis"; a caixa vira gaveta pela direita. */
  body#template .t03-fundo { display: block; position: fixed; inset: 0; z-index: 140; background: rgba(0, 0, 0, .6); opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s linear .25s; }
  body#template .t03-fundo.aberto { opacity: 1; visibility: visible; transition: opacity .25s, visibility 0s; }
  body#template .t03-gaveta-fechar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 42px; height: 42px; padding: 0; background: transparent; color: var(--ink); border: 1px solid var(--linha); border-radius: 10px; font-size: 28px; line-height: 1; }
  body#template .t03-gaveta-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; z-index: 1; padding: 14px 0; margin-bottom: 12px; background: var(--branco); border-bottom: 1px solid var(--linha); font-size: 18px; }
  body#template .t03-gatilho-lista { display: inline-flex; width: 100%; min-height: 48px; }
  body#template .t03-filtro-lista { margin: 0 0 22px; }
  body#template .t03-filtro-lista .public-search { display: flex; position: fixed; top: 0; right: 0; bottom: 0; z-index: 150; width: min(88vw, 380px); margin: 0; padding: 0 16px 24px; flex-direction: column; flex-wrap: nowrap; align-items: stretch; align-content: flex-start; gap: 14px; border: 0; border-radius: 0; box-shadow: -8px 0 24px #0006; overflow-y: auto; transform: translateX(102%); visibility: hidden; transition: transform .28s ease, visibility 0s linear .28s; }
  body#template .t03-filtro-lista .public-search.aberto { transform: none; visibility: visible; transition: transform .28s ease, visibility 0s; }
  body#template .t03-filtro-lista .public-search .field { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  body#template .t03-filtro-lista .public-search, body#template .t03-filtro-lista .public-search.aberto,
  body#template .t03-fundo, body#template .t03-fundo.aberto, body#template .t03-botao, body#template .btn { transition: none; }
}

/* ====== celular: cara de aplicativo (≤ 790 px) ====== */
@media (max-width: 790px) {
  body#template { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
  body#template a, body#template button, body#template select, body#template summary { touch-action: manipulation; }
  /* Barra fixa no topo, como a de um app. */
  body#template .t03-topo { position: sticky; top: 0; z-index: 60; padding-top: env(safe-area-inset-top); box-shadow: 0 1px 0 var(--linha), 0 4px 14px #1718300d; }
  body#template .t03-topo-miolo { min-height: 64px; gap: 10px; }
  body#template .t03-marca img { max-height: 42px; max-width: 150px; }
  body#template .t03-menu { display: none; }
  body#template .t03-topo-whats { min-height: 44px; padding: 8px 14px; font-size: 14px; border-radius: 22px; }
  body#template .t03-menu-botao { display: inline-grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid var(--linha); border-radius: 14px; background: var(--branco); color: var(--ink); }
  body#template .t03-menu-botao svg { width: 24px; height: 24px; }
  body#template .t03-menu-botao:active { background: #f4eee3; transform: scale(.94); }
  /* Bandeja lateral: desliza da esquerda, com o fundo escurecendo. */
  body#template .t03-menu-fundo { display: block; position: fixed; inset: 0; z-index: 190; background: rgba(8, 12, 28, .55); opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility 0s linear .28s; }
  body#template .t03-menu-fundo.aberto { opacity: 1; visibility: visible; transition: opacity .28s ease, visibility 0s; }
  body#template .t03-gaveta-menu { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 200; width: min(86vw, 340px); padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); background: var(--branco); color: var(--ink); box-shadow: 8px 0 30px #0000004d; border-radius: 0 22px 22px 0; transform: translateX(-104%); visibility: hidden; transition: transform .3s cubic-bezier(.22, .9, .3, 1), visibility 0s linear .3s; overflow-y: auto; overscroll-behavior: contain; }
  body#template .t03-gaveta-menu.aberto { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.22, .9, .3, 1), visibility 0s; }
  body#template .t03-gaveta-menu-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--linha); }
  body#template .t03-gaveta-menu-fechar { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--linha); border-radius: 14px; background: var(--branco); color: var(--ink); }
  body#template .t03-gaveta-menu-lista { display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; flex: 1; }
  body#template .t03-gaveta-menu-lista a { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 12px; border-radius: 14px; font-size: 17px; font-weight: 600; transition: background-color .15s, transform .15s; }
  body#template .t03-gaveta-menu-lista a:active { background: #f4eee3; transform: scale(.98); }
  body#template .t03-gaveta-menu-lista a[aria-current] { background: color-mix(in srgb, var(--ouro) 22%, #fff); }
  body#template .t03-gaveta-icone { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: #f4eee3; color: #805c27; }
  body#template .t03-gaveta-menu-lista a[aria-current] .t03-gaveta-icone { background: var(--ouro); color: var(--sobre-ouro); }
  body#template .t03-gaveta-menu-rodape { padding: 14px 16px 18px; border-top: 1px solid var(--linha); }
  body#template .t03-gaveta-menu-rodape .t03-botao { min-height: 52px; font-size: 16px; border-radius: 14px; }
  body#template.t03-menu-aberto { overflow: hidden; }
  /* Toque com resposta, como num app. */
  body#template .t03-botao:active, body#template .btn:active { transform: scale(.97); }
  body#template .property-card:active { transform: scale(.985); }
  body#template .property-card { transition: transform .15s ease; }
  body#template .t03-flutuante { right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  body#template .t03-rodape-base { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ====== caixa de filtro da listagem + ajustes das páginas internas no celular ====== */
body#template .public-search { background: var(--branco); border: 1px solid var(--linha); border-radius: 10px; padding: 20px 24px; box-shadow: 0 12px 32px #17203612; }
@media (max-width: 680px) {
  body#template .public-main { width: calc(100% - 32px); }
  body#template .page-head { display: block; margin-bottom: 16px; }
  body#template .page-head .actions { margin-top: 14px; }
  body#template .public-search { padding: 14px; }
  body#template .field input, body#template .field select, body#template .field textarea { font-size: 16px; }
}

/* ====== celular estreito: a barra do topo precisa caber (360 px) ====== */
@media (max-width: 400px) {
  body#template .t03-marca img { max-width: 124px; }
  body#template .t03-topo-whats { width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 50%; }
  body#template .t03-topo-whats span { display: none; }
}

/* Menos movimento (vem por último de propósito: o bloco do celular acima redefine `transition` com o mesmo peso). */
@media (prefers-reduced-motion: reduce) {
  body#template .t03-gaveta-menu, body#template .t03-gaveta-menu.aberto, body#template .t03-menu-fundo, body#template .t03-menu-fundo.aberto,
  body#template .t03-gaveta-menu-lista a, body#template .property-card, body#template .t03-botao, body#template .t03-menu-botao { transition: none; transform: none; }
}
