/* Site Novo Rio — identidade a partir da logomarca: dourado da casa/chave e grafite do nome. */
:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --line: #e7e2d8;
  --fg: #26282c;
  --muted: #676a70;
  --brand: #2b2d31;
  --brand-2: #3a3d43;
  --accent: #b08d4a;
  --accent-soft: #f7efd9;
  --accent-ink: #7a5c0f;
  --wa: #128c4a;
  --wa-hover: #0f7a40;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok: #067647;
  --ok-soft: #e6f6ee;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(30 25 15 / 6%), 0 6px 20px rgb(30 25 15 / 6%);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 650; }
h2 { font-size: clamp(1.2rem, 2.6vw, 1.5rem); font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.i { width: 18px; height: 18px; flex: none; }

/* --------------------------------------------------------------- botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-hover); }
.btn-block { width: 100%; }
.btn-broker { background: var(--accent-soft); color: var(--accent-ink); border-color: #ecdcae; font-size: .875rem; min-height: 40px; }
.btn-broker:hover { border-color: var(--accent); }
.linklike { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; }

/* ------------------------------------------------------------ cabeçalho */
.top { position: sticky; top: 0; z-index: 30; background: rgb(255 255 255 / 96%); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; text-decoration: none; flex: none; }
.brand-logo { height: 56px; width: auto; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 550; font-size: .93rem; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--fg); background: var(--accent-soft); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.mnav { display: none; position: relative; }
.mnav summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; background: var(--surface); }
.mnav summary::-webkit-details-marker { display: none; }
.mnav-panel { position: absolute; right: 0; top: 52px; width: min(300px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; display: grid; }
.mnav-panel a, .mnav-panel button { padding: 12px; border-radius: 8px; text-decoration: none; text-align: left; }
.mnav-panel a:hover { background: var(--accent-soft); }
.broker-bar { background: var(--brand); color: #f3e7c4; font-size: .875rem; }
.broker-bar .wrap { display: flex; align-items: center; gap: 8px; min-height: 34px; }
.broker-bar .i { width: 15px; height: 15px; }
@media (max-width: 560px) { .hide-sm { display: none; } }
.broker-bar form { margin-left: auto; }

@media (max-width: 1060px) {
  .nav { display: none; }
  .mnav { display: block; }
  .top-actions { margin-left: auto; }
}
@media (max-width: 560px) {
  .btn-broker span { display: none; }
  .btn-broker { width: 44px; padding: 0; }
  .brand-logo { height: 50px; }
}

/* ----------------------------------------------------------------- hero */
.hero { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-in { padding: 48px 16px 36px; text-align: center; }
.hero h1 { max-width: 760px; margin: 0 auto 10px; }
.hero-sub { color: var(--muted); max-width: 620px; margin: 0 auto 24px; font-size: 1.05rem; }
.search { display: grid; grid-template-columns: 1fr 200px auto; gap: 8px; max-width: 820px; margin: 0 auto; background: var(--surface); padding: 8px; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.search-field { display: flex; align-items: center; gap: 8px; padding: 0 12px; color: var(--muted); }
.search-field input { border: 0; outline: 0; width: 100%; min-height: 44px; background: transparent; color: var(--fg); }
.search-type select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--surface); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.chip { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: .9rem; }
.chip:hover { border-color: var(--accent); }
.quicks { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.quick { display: flex; align-items: baseline; gap: 6px; padding: 10px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); text-decoration: none; }
.quick strong { font-size: 1.25rem; }
@media (max-width: 640px) {
  .hero-in { padding: 28px 16px 24px; text-align: left; }
  .hero h1, .hero-sub { margin-left: 0; }
  .search { grid-template-columns: 1fr; }
  .search-field { border: 1px solid var(--line); border-radius: 10px; }
  .chips, .quicks { justify-content: flex-start; }
}

/* ------------------------------------------------------------- seções */
.section { padding: 32px 16px; }
.narrow { max-width: 760px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.more { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.page-head { padding-top: 28px; padding-bottom: 4px; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 720px; }
.crumbs { padding-top: 16px; font-size: .875rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }

/* --------------------------------------------------------------- cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; background: #efebe3; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.ph-empty { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 6px; color: #b8a77a; font-size: .875rem; background: #f3efe6; }
.ph-empty .logo-mark { width: 54px; height: 54px; color: var(--accent); }
.badge-status, .badge-count { position: absolute; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge-status { top: 10px; left: 10px; background: var(--brand); color: #fff; }
.badge-count { bottom: 10px; right: 10px; background: rgb(0 0 0 / 60%); color: #fff; }
.badge-inline { padding: 2px 8px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .78rem; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-kicker { display: flex; gap: 10px; align-items: center; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.code { color: var(--accent-ink); }
.card-title { font-size: 1.05rem; margin: 0; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-loc { display: flex; gap: 6px; align-items: flex-start; color: var(--muted); font-size: .9rem; margin: 0; }
.card-loc .i { margin-top: 2px; width: 16px; height: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tag { padding: 3px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--accent-soft); color: var(--accent-ink); }
.tag-preco_reduzido { background: var(--danger-soft); color: var(--danger); }
.tag-possui_avaliacao { background: #e8eef9; color: #234a8a; }
.tag-aceita_financiamento { background: var(--ok-soft); color: var(--ok); }
.price { display: flex; flex-direction: column; margin-top: 2px; }
.price-old { color: var(--muted); font-size: .88rem; }
.price-now { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; }
.price-big .price-now { font-size: 1.8rem; }
.specs { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: .88rem; }
.specs li { display: flex; align-items: center; gap: 5px; }
.specs .i { width: 17px; height: 17px; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; padding-top: 6px; }
.card-actions .btn { min-height: 42px; padding: 0 10px; }

/* ------------------------------------------------------------- catálogo */
.catalog { display: grid; grid-template-columns: 290px 1fr; gap: 24px; align-items: start; padding-top: 16px; padding-bottom: 32px; }
.filters { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.filters-toggle { display: none; }
.filters-form { display: grid; gap: 12px; }
.f { display: grid; gap: 4px; font-size: .88rem; }
.f > span, .f > legend { font-weight: 600; color: var(--muted); }
.f input, .f select, .f textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); }
.f textarea { min-height: 84px; resize: vertical; }
fieldset.f { border: 0; padding: 0; margin: 0; }
.checks { display: grid; gap: 6px; max-height: 220px; overflow: auto; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.f-actions { display: grid; gap: 8px; }
.count { color: var(--muted); margin-bottom: 12px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 24px; color: var(--muted); }
@media (min-width: 901px) {
  .filters > summary { display: none; }
}
@media (max-width: 900px) {
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; padding: 0; border: 0; background: transparent; }
  .filters-toggle { display: inline-flex; list-style: none; }
  .filters-toggle::-webkit-details-marker { display: none; }
  .filters[open] .filters-form { margin-top: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
}

/* ------------------------------------------------------------ estado vazio */
.empty { text-align: center; padding: 40px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-ico { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.empty p { color: var(--muted); max-width: 480px; margin: 0 auto 16px; }

/* --------------------------------------------------------------- ficha */
.gallery { padding-top: 12px; }
.g-main { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius); gap: 8px; }
.g-item { scroll-snap-align: start; display: block; aspect-ratio: 16 / 10; background: #efebe3; }
.g-item img, .g-single .ph-empty { width: 100%; height: 100%; object-fit: cover; }
.g-single { aspect-ratio: 16 / 9; }
.g-hint { font-size: .85rem; margin-top: 6px; }
@media (min-width: 900px) {
  .g-main { grid-auto-flow: row; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; overflow: hidden; }
  .g-item { aspect-ratio: auto; }
  .g-item:first-child { grid-row: span 2; }
  .g-item:nth-child(n + 6) { display: none; }
  .g-main:has(.g-item:only-child) { grid-template-columns: 1fr; grid-template-rows: 460px; }
}
.detail { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; padding-top: 24px; padding-bottom: 24px; }
.detail-title { margin: 6px 0; }
.detail-main > .tags, .detail-main > .specs { margin: 12px 0; }
.detail-main > .specs { font-size: 1rem; gap: 10px 20px; }
.block { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; }
.prose p { margin-bottom: .9rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 0 0 16px; }
.facts div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.facts dt { color: var(--muted); font-size: .8rem; }
.facts dd { margin: 0; font-weight: 600; }
.features { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.features li { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; }
.features li::before { content: '✓ '; color: var(--accent-ink); }
.campaign-note { background: var(--accent-soft); color: var(--accent-ink); padding: 10px 14px; border-radius: 10px; }
.detail-side { position: sticky; top: 88px; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.saving { color: var(--danger); font-weight: 600; margin: -6px 0 0; font-size: .9rem; }
.lead-form { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.lead-form h2 { font-size: 1.1rem; margin: 0; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.consent { font-size: .82rem; color: var(--muted); }
.alert { padding: 10px 12px; border-radius: 10px; font-size: .9rem; margin: 0; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.err { background: var(--danger-soft); color: var(--danger); }
.mobile-cta { display: none; }
@media (max-width: 900px) {
  .detail { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .mobile-cta { display: flex; position: sticky; bottom: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgb(0 0 0 / 6%); }
  .mobile-cta .price-now { font-size: 1.15rem; }
  .wa-float { display: none; }
}

/* ---------------------------------------------------- área do corretor */
.broker-cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 28px; padding: 16px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent-ink); }
.broker-cta div { flex: 1 1 260px; }
.broker-cta p { margin: 4px 0 0; font-size: .92rem; }
.broker { margin-top: 32px; padding: 20px; border: 2px solid var(--accent); border-radius: var(--radius); background: #fffdf7; display: grid; gap: 16px; }
.broker-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.broker-head p { margin: 4px 0 0; }
.broker-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.broker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .broker-grid { grid-template-columns: 1fr; } .broker-actions .btn { width: 100%; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.panel h3 { margin-top: 14px; }
.panel h3:first-child { margin-top: 0; }
.kvs { margin: 0; display: grid; gap: 6px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.answer { font-weight: 700; margin: 0 0 6px; }
.answer.yes { color: var(--ok); }
.answer.no { color: var(--muted); }
.files { display: grid; gap: 8px; }
.file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; margin-top: 8px; }
.file:hover { border-color: var(--accent); }
.file span { flex: 1; }
.file small { color: var(--muted); }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.videos video { width: 100%; border-radius: 10px; background: #000; aspect-ratio: 16 / 9; }
.videos figure { margin: 0; }
.videos figcaption { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
.list th, .list td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.list th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.list .num { text-align: right; white-space: nowrap; }
.copied { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; }

/* ------------------------------------------------------- acesso corretor */
.auth { display: grid; place-items: center; padding: 48px 16px; }
.auth-box { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); text-align: center; }
.auth-ico { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.auth-form { display: grid; gap: 12px; text-align: left; margin: 16px 0; }

/* ----------------------------------------------------------- campanhas */
.campaigns { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.camp { display: block; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 18px; text-decoration: none; box-shadow: var(--shadow); }
.camp:hover { border-color: var(--accent); }

/* ---------------------------------------------------------------- mapa */
.map { height: min(70vh, 620px); border-radius: var(--radius); border: 1px solid var(--line); background: #e9e5dc; }
.map-pop { display: grid; gap: 4px; min-width: 190px; font: 14px/1.4 system-ui, sans-serif; }
.map-pop img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; }
.map-pop strong { font-size: 15px; }

/* -------------------------------------------------------------- rodapé */
.foot { margin-top: 40px; background: var(--brand); color: #d9d6cf; }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; padding-top: 32px; padding-bottom: 24px; }
.foot a { display: block; color: #d9d6cf; text-decoration: none; padding: 4px 0; }
.foot a:hover { color: #fff; }
.foot .muted { color: #aaa69c; }
.foot-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 8px; }
.brand-foot { background: #fff; border-radius: 12px; padding: 8px 12px; display: inline-flex !important; margin-bottom: 10px; }
.foot-legal { border-top: 1px solid #45484e; padding-top: 14px; padding-bottom: 20px; font-size: .8rem; color: #aaa69c; }
@media (max-width: 700px) { .foot-in { grid-template-columns: 1fr; } }

.wa-float { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgb(0 0 0 / 22%); z-index: 25; }
.wa-float .i { width: 30px; height: 30px; }

/* Galeria ampliada */
.lb { position: fixed; inset: 0; z-index: 80; background: rgb(10 10 10 / 92%); display: grid; grid-template-rows: auto 1fr auto; color: #fff; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; }
.lb-img { display: grid; place-items: center; min-height: 0; padding: 0 8px; }
.lb-img img { max-height: 100%; max-width: 100%; object-fit: contain; }
.lb-nav { display: flex; justify-content: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.lb button { min-width: 48px; min-height: 48px; border-radius: 10px; border: 1px solid #555; background: #222; color: #fff; cursor: pointer; font-size: 1.1rem; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Na ficha, no celular, a barra fixa de contato substitui o botão flutuante. */
@media (max-width: 900px) { body:has(.mobile-cta) .wa-float { display: none; } }
