/* Base comum a todos os temas da vitrine. Tudo vem de variáveis definidas no <body> (--accent, --bg, --text, --card,
   --header, --footer, --radius, --font e os --on-*). Cada tema só acrescenta o layout dele. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font, system-ui, sans-serif); line-height: 1.55; color: var(--text, #1c1f23); background: var(--bg, #fff);
  --muted: color-mix(in srgb, var(--text) 62%, var(--bg));
  --line: color-mix(in srgb, var(--text) 13%, var(--bg));
  --soft: color-mix(in srgb, var(--text) 6%, var(--bg));
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
ul { margin: 0; }
.wrap { max-width: 70rem; margin: 0 auto; padding: 0 1rem; }
.icon { flex: none; vertical-align: -0.2em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, #fff); outline-offset: 2px; }

.photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); border-radius: var(--radius); }
.photo-empty { display: grid; place-content: center; justify-items: center; gap: 0.25rem; color: var(--muted); font-size: 0.85rem; background: var(--soft); }

.brand { text-decoration: none; color: inherit; display: inline-flex; align-items: center; }
.brand-name { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand-logo { max-height: 3rem; width: auto; }

.wa-button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.7rem 1.2rem; border-radius: 999px; background: #1fa855; color: #fff; font-weight: 700; text-decoration: none; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: background .15s, transform .15s; }
.wa-button:hover { background: #178a45; transform: translateY(-1px); }
.wa-button.wide { display: flex; width: 100%; }

.regions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1rem 0; }
.chip { padding: 0.4rem 0.95rem; border: 1px solid var(--line); border-radius: 999px; color: inherit; text-decoration: none; font-size: 0.9rem; background: var(--card, #fff); transition: border-color .15s; }
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-count { opacity: 0.7; font-size: 0.8rem; }

.badge-launch { display: inline-block; padding: 0.15rem 0.65rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

.facts { list-style: none; padding: 0; margin: 0.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; color: var(--muted); font-size: 0.88rem; }
.facts li { display: inline-flex; align-items: center; gap: 0.3rem; }

.pager { display: flex; justify-content: space-between; align-items: center; margin: 1.75rem 0; color: var(--muted); }
.empty { padding: 3rem 0; color: var(--muted); display: grid; justify-items: center; gap: 0.5rem; text-align: center; }

.section-title { font-size: 1.35rem; margin-bottom: 0.75rem; }

/* Galeria */
.gallery { display: grid; gap: 0.5rem; }
.gallery-main-link { display: block; cursor: zoom-in; text-decoration: none; color: inherit; }
.gallery-main { aspect-ratio: 16 / 10; }
.gallery-thumbs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 0.4rem; }
.gallery-thumbs .photo { aspect-ratio: 4 / 3; border-radius: calc(var(--radius) * 0.6); opacity: 0.8; transition: opacity .15s; }
.gallery-thumbs a:hover .photo, .gallery-thumbs a.on .photo { opacity: 1; }
.gallery-thumbs a.on .photo { outline: 2px solid var(--accent); outline-offset: 1px; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: grid; place-items: center; }
.lightbox img { max-width: 94vw; max-height: 88vh; object-fit: contain; border-radius: 4px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0; font-size: 1.8rem; width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.28); }
.lightbox .lb-close { top: 1rem; right: 1rem; }
.lightbox .lb-prev { left: 1rem; top: 50%; }
.lightbox .lb-next { right: 1rem; top: 50%; }

.description { white-space: pre-line; margin: 1.5rem 0; }
.detail-table { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin: 1rem 0 0; }
.detail-table dt { color: var(--muted); }
.detail-table dd { margin: 0; font-weight: 600; }

/* Banners */
.banners { position: relative; overflow: hidden; background: var(--header); }
.banner-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.banner-track::-webkit-scrollbar { display: none; }
.banner-slide { flex: 0 0 100%; scroll-snap-align: start; position: relative; }
.banner-link { display: block; color: inherit; text-decoration: none; }
.banner-img { width: 100%; height: clamp(14rem, 38vw, 28rem); object-fit: cover; }
.banner-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem max(1rem, calc((100% - 70rem) / 2 + 1rem)) 1.75rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.62)); }
.banner-title { font-size: clamp(1.4rem, 4vw, 2.4rem); font-weight: 800; line-height: 1.15; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.banner-sub { margin-top: 0.3rem; font-size: clamp(0.95rem, 2vw, 1.15rem); opacity: 0.95; }
.banner-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.banner-nav:hover { background: rgba(0,0,0,.6); }
.banner-nav.prev { left: 0.75rem; }
.banner-nav.next { right: 0.75rem; }
.banner-dots { position: absolute; bottom: 0.6rem; right: 1rem; display: flex; gap: 0.35rem; }
.banner-dots i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: rgba(255,255,255,.5); display: block; }
.banner-dots i.on { background: #fff; }
@media (max-width: 40rem) { .banner-nav { display: none; } }

/* Mapas */
.map-section { margin: 2rem 0; }
.map-address { display: flex; align-items: flex-start; gap: 0.4rem; margin-bottom: 0.75rem; color: var(--muted); }
.vmap { height: 22rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--soft); z-index: 0; }
.vmap-home { height: 26rem; }
@media (max-width: 40rem) { .vmap, .vmap-home { height: 18rem; } }
.map-link { margin-top: 0.5rem; font-size: 0.85rem; }
.map-fallback { padding: 1rem; color: var(--muted); }
.map-pop { width: 13rem; }
.map-pop img { width: 100%; height: 7rem; object-fit: cover; border-radius: 6px; margin-bottom: 0.4rem; }
.map-pop strong { display: block; line-height: 1.25; }
.map-pop span { display: block; margin: 0.2rem 0; color: #444; }
.map-pop a { font-weight: 700; }
.leaflet-popup-content { margin: 0.7rem 0.8rem; font-family: var(--font); }

/* Sobre e rodapé */
.about { margin: 2.5rem 0; max-width: 46rem; }
.about-text { white-space: pre-line; color: var(--text); }
.site-footer { background: var(--footer); color: var(--on-footer); margin-top: 3rem; padding: 2rem 0 1rem; }
.site-footer a { color: inherit; }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem; }
.footer-name { font-weight: 800; font-size: 1.15rem; }
.footer-text, .footer-creci { opacity: 0.8; margin-top: 0.3rem; font-size: 0.92rem; }
.footer-links { display: grid; gap: 0.5rem; align-content: start; }
.footer-links a { display: inline-flex; gap: 0.5rem; align-items: center; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-credit { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.55rem; margin-top: 1.5rem; padding-top: 0.9rem; border-top: 1px solid rgba(255,255,255,.14); font-size: 0.8rem; opacity: 0.7; }
/* Selo da Imovitrine (decisões 0062 e 0063): o nome com o telhado sobre "imo", na cor do texto em volta. */
.credit-logo { font-weight: 800; font-size: 1rem; letter-spacing: -0.035em; line-height: 1; padding-top: 0.3em; text-decoration: none; }
.credit-imo { position: relative; }
.credit-imo::before {
  content: ""; position: absolute; left: -2%; right: 4%; top: -0.36em; height: 0.34em; background: currentColor;
  -webkit-mask: var(--roof) no-repeat center / 100% 100%; mask: var(--roof) no-repeat center / 100% 100%;
  --roof: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpath d='M4 26 50 5l46 21' fill='none' stroke='%23000' stroke-width='8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Prévia do painel e barra do dono */
/* Faixa da Imovitrine no topo (decisão 0063): cores fixas da marca, para não depender das cores do corretor. */
.iv-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.2rem 0.45rem; min-height: 2rem; padding: 0.35rem 1rem; background: #0d1b2a; border-bottom: 1px solid rgba(52,192,142,.35); color: #c9d4df; font: 500 0.82rem/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-decoration: none; }
.iv-bar:hover { color: #fff; }
.iv-bar-logo { color: #fff; font-weight: 800; font-size: 0.95rem; letter-spacing: -0.035em; line-height: 1; padding-top: 0.3em; }
.iv-bar-logo .credit-imo::before { background: #34c08e; }
.iv-bar-cta { color: #34c08e; font-weight: 700; }
.iv-bar:hover .iv-bar-cta { text-decoration: underline; }
.preview-banner { position: sticky; top: 0; z-index: 50; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; padding: 0.6rem 1rem; background: #1c1f23; color: #fff; font-size: 0.9rem; }
.preview-banner a { color: #fff; }
.owner-bar { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; padding: 0.5rem 1rem; background: #111827; color: #fff; font: 600 0.9rem/1.2 system-ui, sans-serif; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.owner-bar .ob-label { opacity: 0.75; font-weight: 500; margin-right: auto; }
.owner-bar a, .owner-bar button { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.45rem 0.8rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; text-decoration: none; font: inherit; cursor: pointer; }
.owner-bar a.primary { background: #fff; color: #111827; border-color: #fff; }
.owner-bar a:hover, .owner-bar button:hover { background: rgba(255,255,255,.18); }
.owner-bar a.primary:hover { background: #e5e7eb; }
/* Barra do dono no celular: uma linha só, com rolagem lateral (decisão 0054). */
@media (max-width: 40rem) {
  .owner-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 0.4rem; padding: 0.45rem 0.75rem; }
  .owner-bar::-webkit-scrollbar { display: none; }
  .owner-bar .ob-label { flex: none; font-size: 0.78rem; margin-right: 0.25rem; }
  .owner-bar a, .owner-bar button { flex: none; white-space: nowrap; padding: 0.4rem 0.7rem; font-size: 0.85rem; }
}
