@font-face {
  font-family: "Helvetica";
  src:
    url("/fonts/Helvetica.ttf") format("truetype"),
    url("/fonts/Helvetica-Bold.ttf") format("truetype"),
    url("/fonts/Helvetica-BoldOblique.ttf") format("truetype"),
    url("/fonts/helvetica-compressed-5871d14b6903a.otf") format("opentype"),
    url("/fonts/helvetica-light-587ebe5a59211.ttf") format("truetype"),
    url("/fonts/Helvetica-Oblique.ttf") format("truetype"),
    url("/fonts/helvetica-rounded-bold-5871d05ead8de.otf") format("opentype");
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #333333;
  --muted: #666666;
  --line: #cccccc;
  --brand: #e30613;
  --brand-dark: #bd0010;
  --accent: #e30613;
  --header: #ffffff;
  --soft: #f4f4f4;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: 'Helvetica', sans-serif;
  font-size: 15px;
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, span, a, label, li, td, th, input, select, textarea, button {
  line-height: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
}

.app-header {
  background: #262626;
  color: #fff;
  border-top: 3px solid var(--brand);
  border-bottom: 1px solid #1d1d1d;
}

.navbar-brand,
.nav-link,
.navbar-text {
  color: #fff;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0;
}

.nav-link:hover,
.navbar-brand:hover {
  color: #fff;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, .35);
}

.main-shell {
  min-height: calc(100vh - 250px);
}

.footer {
  background: #fff;
  border-top: 1px solid var(--line);
}

.footer-portals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px 46px;
  padding: 30px 0 28px;
}

.footer-portals a {
  display: grid;
  place-items: center;
  transition: transform .15s ease;
}

.footer-portals a:hover {
  transform: translateY(-1px);
}

.footer-portals img {
  max-width: 130px;
  max-height: 34px;
  object-fit: contain;
}

/* Logo do Litoral é bem mais largo: sem limites maiores ele encolhe demais (original 360x76) */
.footer-portals img[alt="Litoral SP Imóvel"] {
  max-width: 200px;
  max-height: 40px;
}

/* Container xl (1140px): gap menor para as 7 logos caberem numa linha */
@media (max-width: 1399.98px) {
  .footer-portals {
    gap: 20px 26px;
  }
}

.footer-bar {
  padding: 8px 12px;
  color: #fff;
  background: #1d1d1d;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}

/* Tela de login sem scroll: o body vira flex e o main estica exatamente entre header e rodapé,
   independente de zoom/DPI (o calc abaixo fica só como fallback p/ navegadores sem :has) */
body:has(.login-view) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body:has(.login-view) .main-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body:has(.login-view) .login-view {
  flex: 1;
  min-height: 0;
}

.login-view {
  /* Fallback: 100vh menos header (~54px) e rodapé de logos + barra (~90px) */
  min-height: calc(100vh - 144px);
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    linear-gradient(120deg, rgba(18, 52, 59, .92), rgba(15, 118, 110, .82)),
    url("/img/semana-corretor.jpg");
  background-size: cover;
  background-position: center;
}

.login-panel {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  align-items: center;
  color: #fff;
}

.login-panel h1,
.page-title h1,
.list-header h1 {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0;
}

.login-panel h1 {
  max-width: 640px;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  line-height: 1;
}

.lead {
  max-width: 520px;
  margin-top: 18px;
  color: #dce8ea;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.login-view .eyebrow {
  color: #b9fff4;
}

.login-form {
  display: grid;
  gap: 12px;
  padding: 28px;
  color: var(--ink);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-disabled-bg: #f0a0a6;
  --bs-btn-disabled-border-color: #f0a0a6;
  --bs-btn-border-radius: 4px;
  --bs-btn-font-weight: 700;
}

.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
}

.page-band,
.detail-view,
.content-section {
  padding: 32px 0;
}

.legacy-hero {
  min-height: 310px;
  padding: 48px 38px 70px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .84) 42%, rgba(255, 255, 255, .2) 100%),
    url("/img/bg-topo-captacao.jpg") right center / cover no-repeat;
  border-top: 1px solid #d4d4d4;
}

.legacy-search {
  width: min(854px, 100%);
  padding: 10px 10px 48px;
  background: rgba(238, 238, 238, .94);
  border: 1px solid #bfc5cb;
  border-radius: 4px;
}

.legacy-search-header {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 18px;
  align-items: center;
  margin-bottom: 8px;
}

.legacy-search-header h1 {
  margin: 0 0 0 4px;
  font-size: 1.35rem;
  font-weight: 800;
  color: #2e3740;
}

.captados-button {
  height: 30px;
  color: #fff;
  background: #878e96;
  border: 0;
  border-radius: 4px;
  font-weight: 800;
}

.legacy-search-grid {
  display: grid;
  grid-template-columns: 250px 250px 250px;
  gap: 16px 32px;
}

.legacy-search .form-select {
  height: 35px;
  color: #000;
  border: 1px solid #c8cdd2;
  border-radius: 5px;
  font-size: .88rem;
}

.legacy-search .form-select:focus {
  border-color: #000;
  box-shadow: none;
}

.legacy-search .combo-required:not(:disabled):invalid,
.legacy-search #Finalidade:not(:disabled) {
  border-color: #86b7fe;
}

.legacy-search .btn {
  height: 35px;
  background: #2f3b46;
  border-color: #2f3b46;
  font-weight: 800;
}

.legacy-search .btn:disabled {
  background: #7d858d;
  border-color: #7d858d;
}

.brand-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 60px;
  padding: 8px 4px;
  background: #f4f4f4;
}

.brand-strip img {
  max-width: 112px;
  max-height: 34px;
  object-fit: contain;
}

.logged-warning {
  margin-left: 26px;
  color: #f00;
  font-size: .86rem;
}

.legacy-list-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: calc(100% - 8px);
  margin: 5px 0 0 3px;
  padding: 6px 8px;
  background: #f6f7f8;
  border: 1px solid #cfd6dd;
  color: #000;
  font-size: .9rem;
}

.capture-hero {
  padding: 36px 0 34px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .92) 56%, rgba(255, 255, 255, .62) 100%),
    url("/img/bg-topo-captacao.jpg") right center / cover no-repeat;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.capture-hero-compact {
  padding: 28px 0 24px;
}

.capture-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  max-width: 1296px;
  margin: 0 auto 26px;
}

.capture-title h1 {
  max-width: 660px;
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.08;
}

.capture-subtitle {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.captured-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  height: 38px;
  padding: 0 16px;
  color: #fff;
  background: #4a4a4a;
  border: 0;
  border-radius: 4px;
  font-weight: 700;
}

.captured-chip:hover {
  color: #fff;
  background: var(--brand);
}

.capture-search {
  max-width: 1296px;
  margin: 0 auto;
  padding: 18px 20px 20px;
  background: rgba(255, 255, 255, .96);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .05);
}

.capture-search-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ececec;
}

.capture-search-heading strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
}

.capture-search-heading span {
  color: var(--muted);
  font-size: .9rem;
}

.capture-search-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Faixa de valor: dois selects dentro de uma única célula do grid */
.field-valor-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
}

.field-valor-range .form-select {
  width: 100%;
  min-width: 0;
}

.valor-sep {
  color: #8792a0;
  font-size: 13px;
  user-select: none;
}

/* Botão: col 4 cobrindo as 2 linhas do grid */
.search-button-field {
  grid-row: span 2;
  display: flex;
  align-items: center;
}

.capture-search .field {
  min-width: 0;
}

.capture-search .form-select {
  height: 42px;
  color: var(--ink);
  border-color: #cfd3d7;
  border-radius: 6px;
  background-color: #fff;
}

.capture-search .form-select:disabled {
  color: #8792a0;
  background-color: #edf1f5;
}

    .capture-search .combo-required:focus,
    .capture-search .form-select.select-active {
        border-color: #86b7fe;
        box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, .25);
    }

.form-select:focus {
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, .25);
}

.search-button-field .btn {
    width: 85%;
    height: 53px;
    margin: auto;
    border-radius: 6px;
}

.search-button-field .btn:disabled {
  pointer-events: auto;
  cursor: no-drop;
}

.portal-network {
  padding: 12px 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.portal-network-slim {
  padding: 12px 0;
  background: var(--surface);
}

.results-shell {
  padding: 24px 0 34px;
}

.results-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.filter-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.filter-panel.is-loading::after {
  content: "Carregando filtros...";
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, .78);
  font-weight: 700;
}

.filter-panel.is-loading::before {
  content: "";
  position: absolute;
  top: calc(50% - 38px);
  left: calc(50% - 13px);
  z-index: 4;
  width: 26px;
  height: 26px;
  border: 3px solid #ddd;
  border-top-color: var(--brand);
  border-radius: 999px;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.filter-head h1 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
}

.filter-toggle-icon {
  display: none;
}

.filter-head a {
  color: var(--brand);
  font-size: .9rem;
  font-weight: 700;
}

.filter-active {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.filter-active-link {
  color: var(--ink);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: underline;
}

.filter-active-link:hover,
.filter-active-link:focus {
  color: var(--brand);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 5px 5px 12px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-size: .85rem;
  font-weight: 700;
}

.filter-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip-remove {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background .15s ease;
}

.filter-chip-remove:hover,
.filter-chip-remove:focus {
  background: var(--brand-dark);
  color: #fff;
}

.filter-section {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.filter-two {
  grid-template-columns: 1fr 1fr;
}

.filter-section-title {
  color: var(--ink);
  font-size: .95rem;
  font-weight: 700;
}

.filter-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Atalho "Imóveis captados" da lista geral: no desktop fica inline na linha do "Busca atual";
   a faixa própria (.filter-active-atalho) só existe no mobile, onde o form recolhido
   esconderia o link inline. */
.filter-active.filter-active-atalho {
  display: none;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .filter-active.filter-active-atalho {
    display: flex;
  }

  .filter-link-desktop {
    display: none;
  }
}

.filter-panel .form-select,
.filter-panel .form-control {
  min-height: 42px;
  border-color: #d1d5db;
  border-radius: 4px;
  font-size: .95rem;
}

.filter-panel .btn {
  margin: 18px 20px 20px;
  width: calc(100% - 40px) !important;
  min-height: 42px;
}

.results-main {
  min-width: 0;
}

.results-main.is-loading {
  opacity: .45;
  pointer-events: none;
  transition: opacity .18s ease;
}

.results-top {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.results-top h2 {
  margin: 0 0 4px;
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  font-weight: 700;
  letter-spacing: 0;
}

.results-top span,
.crumb {
  color: var(--muted);
  font-size: .92rem;
}

.crumb {
  margin: 0 0 6px;
}

.view-tools {
  display: flex;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.view-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 82px;
  padding: 10px 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  font-weight: 700;
  cursor: pointer;
}

.view-mode:last-child {
  border-right: 0;
}

.view-mode.active {
  color: #fff;
  background: var(--brand);
}

.view-pane {
  display: none;
}

.view-pane.active {
  display: block;
}

/* ===== Modo lista (base: grid do ListaOfereca.aspx legado) ===== */
/* No modo lista a página usa a largura da tela, para caber mais colunas sem scroll horizontal;
   a grade continua na largura normal do container. A classe html.view-list entra pelo script
   inline do topo da Lista (antes da primeira pintura) e pelo applyView. */
html.view-list .results-shell .results-layout {
  max-width: 1800px;
  padding-left: 24px;
  padding-right: 24px;
}

/* Com a preferência "lista" aplicada no <html>, o painel e os botões já nascem no modo certo,
   mesmo que o HTML do servidor venha com a grade marcada como ativa (evita o flash grade→lista,
   inclusive nas recargas parciais via AJAX da paginação/ordenação). */
html.view-list .view-pane[data-pane="photo"] {
  display: none;
}

html.view-list .view-pane[data-pane="list"] {
  display: block;
}

html.view-list .view-mode[data-view="photo"] {
  color: var(--muted);
  background: transparent;
}

html.view-list .view-mode[data-view="list"] {
  color: #fff;
  background: var(--brand);
}

.list-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Tabela ocupa o quadro inteiro; a folga é distribuída entre todas as colunas
   (layout automático), e o texto centralizado deixa a distribuição natural. */
.list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .94rem;
  white-space: nowrap;
}

.list-table th,
.list-table td {
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.list-table th {
  color: var(--ink);
  background: var(--soft);
  font-weight: 700;
}

/* Títulos e registros centralizados (inclusive as colunas numéricas). */
.list-table th.num,
.list-table td.num {
  text-align: center;
}


/* Bairro/cidade longos quebram em duas linhas em vez de empurrar a tabela para o scroll.
   O limite fica no span (e não na célula) porque max-width em <td> não é respeitado no layout automático. */
.list-table .list-col-text {
  white-space: normal;
}

/* width: max-content faz a coluna nascer do MAIOR nome da página (e não da maior palavra);
   o max-width segura o teto, e só nomes acima dele quebram em duas linhas. */
.list-table .list-col-text span {
  display: inline-block;
  width: max-content;
  max-width: 250px;
}

.list-table th.sortable a {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}

.list-table th.sortable a::after {
  content: "\2195";
  margin-left: 5px;
  color: #aaa;
  font-size: .9em;
}

.list-table th.sortable:hover a,
.list-table th.is-asc a,
.list-table th.is-desc a {
  color: var(--brand);
}

.list-table th.is-asc a::after {
  content: "\2191";
  color: var(--brand);
}

.list-table th.is-desc a::after {
  content: "\2193";
  color: var(--brand);
}

.list-table tbody tr:last-child td {
  border-bottom: 0;
}

.list-row {
  cursor: pointer;
}

.list-row:hover td {
  background: #fafafa;
}

.list-col-photo {
  width: 78px;
  padding-right: 0;
}

.list-col-photo img {
  display: block;
  width: 68px;
  height: 50px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--soft);
}

.list-table .commission-value {
  color: var(--ink);
  font-weight: 700;
}

.list-col-action {
  text-align: center;
}

.list-table .badge-captado {
  padding: 3px 9px;
  font-size: .72rem;
}

.photo-list {
  display: grid;
  gap: 14px;
}

.photo-row {
  position: relative;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: none;
}

.photo-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
  border-color: #999999;
}

/* Anúncio já aberto (localStorage "captacaoVistos"): borda cinza-escura destacando o card
   (bem mais forte que o #ccc padrão) + fundo levemente acinzentado. Convive com o selo "Captado". */
.photo-row.is-visto {
  background: #f8f8f8;
  border-color: #5f5f5f;
}

.photo-row.is-visto:hover {
  border-color: #333333;
}

.list-row.is-visto td {
  background: #efefef;
}

/* No modo lista, um filete escuro à esquerda reforça a linha já aberta. */
.list-row.is-visto td:first-child {
  box-shadow: inset 3px 0 0 #5f5f5f;
}

.photo-row-media {
  position: relative;
  min-height: 240px;
  background: var(--soft);
}

.photo-row-media img,
.list-photo-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-photo-slider {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 240px;
}

.list-photo-slider img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

.list-photo-slider img.active {
  opacity: 1;
  pointer-events: auto;
}

.list-photo-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 34px;
  height: 46px;
  color: #fff;
  background: rgba(0, 0, 0, .32);
  border: 0;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
}

.list-photo-nav .nav-label {
  display: none;
}

.list-photo-nav.is-final {
  right: 10px;
  width: auto;
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  border-radius: 4px;
  font-size: .86rem;
  font-weight: 700;
}

.list-photo-nav.is-final .nav-arrow {
  font-size: 1.35rem;
  line-height: 1;
}

.list-photo-nav.is-final .nav-label {
  display: inline;
  white-space: nowrap;
}

.list-photo-nav.prev {
  left: 0;
  display: none;
}

.list-photo-nav.next {
  right: 0;
}

.list-photo-nav:hover {
  background: rgba(0, 0, 0, .48);
}

.list-photo-nav.is-final:hover {
  background: #cc0010;
}

.list-photo-count {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 2;
  padding: 4px 8px;
  color: #fff;
  background: rgba(0, 0, 0, .5);
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 700;
}

.photo-row-body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 22px 24px;
  min-width: 0;
}

.photo-row-kicker {
  color: var(--muted);
  font-size: .95rem;
}

.photo-row-body h3 {
  margin: 0;
  /*font-size: 1.2rem;*/
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 4px;
  padding-right: 150px;
}

.photo-row-body p {
  margin: 0;
  color: var(--muted);
  /*font-size: 0.9rem;*/
  font-size: 16px;
  font-weight: 500;
}

.photo-row-description {
  display: -webkit-box;
  max-width: 640px;
  overflow: hidden;
  color: var(--muted) !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
  font-size: 0.88rem;
  margin-top: 6px;
}

/* Mesmo verde do "Deixar de Captar" no anúncio, para o corretor reconhecer o estado na lista. */
.badge-captado {
  justify-self: end;
  padding: 4px 12px;
  border-radius: 999px;
  background: #2e8c08;
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.photo-row-action {
  position: absolute;
  top: 22px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding: 0;
  min-width: 0;
  z-index: 10;
}

.main-price-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.photo-row-action strong {
  color: var(--ink);
  /*font-size: 1.50rem;*/
  font-size: 28px;
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
  line-height: 1.15;
}

.photo-row-action .main-price {
  max-width: 100%;
}

.price-commission-label {
  font-size: 0.72rem;
  color: #854d0e;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 1px;
}

.price-no-commission {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

.photo-row-action .btn {
  width: 100%;
}

.compact-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 24px;
  margin: 4px 0 0;
}

.compact-values div {
  padding-top: 6px;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.compact-values dt {
  color: var(--muted);
  /*font-size: .72rem;*/
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.compact-values dd {
  margin: 2px 0 0;
  color: var(--ink);
  /*font-size: .92rem;*/
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.compact-values .commission-value dd,
.commission-cell {
  color: #854d0e;
}

.classic-table td {
  white-space: nowrap;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.clean-card {
  display: grid;
  grid-template-columns: 1fr;
}

.clean-card .property-media {
  min-height: 190px;
}

.classic-table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.classic-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: .9rem;
}

.classic-table th,
.classic-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eceff2;
  vertical-align: middle;
}

.classic-table th {
  color: var(--ink);
  background: #f4f4f4;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.classic-table tbody tr:hover {
  background: #fafafa;
}

.compact-result-list {
  display: grid;
  gap: 10px;
}

.compact-result-row {
  display: grid;
  grid-template-columns: minmax(176px, 1.3fr) minmax(164px, .8fr) minmax(210px, 1fr) minmax(116px, .62fr) 96px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.compact-result-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.compact-result-main {
  min-width: 0;
}

.compact-result-main h3 {
  margin: 8px 0 3px;
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-result-main p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: .9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-result-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.compact-result-facts span {
  padding: 7px 6px;
  color: #43566a;
  background: #f3f5f7;
  border: 1px solid #e3e7eb;
  border-radius: 4px;
  font-size: .82rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.compact-result-values,
.compact-result-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.compact-result-values div,
.compact-result-dates div {
  min-width: 0;
}

.compact-result-values dt,
.compact-result-dates dt {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
}

.compact-result-values dd,
.compact-result-dates dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}

.compact-result-values .commission-value dd {
  color: #6b5b00;
}

.compact-result-action {
  width: 100%;
  min-width: 0;
}

.portal-network .container {
  display: flex;
  align-items: center;
  gap: 18px;
}

.portal-logos {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.portal-logos img {
  width: auto;
  max-width: 126px;
  max-height: 36px;
  object-fit: contain;
  filter: saturate(.92);
}

.home-support {
  padding: 24px 0 38px;
}

.home-support .container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.home-support article {
  display: grid;
  gap: 5px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.home-support strong {
  color: var(--ink);
  font-size: 1rem;
}

.home-support span {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.4;
}

.rows-select {
  height: 25px;
  border: 1px solid #c4cbd1;
}

.page-title,
.list-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.search-surface {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

.field-wide {
  grid-column: span 3;
}

.btn-search {
  align-self: end;
  min-height: 38px;
}

.result-grid {
  display: grid;
  gap: 16px;
}

.result-band {
  padding-top: 24px;
}

.result-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.result-toolbar h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 850;
  letter-spacing: 0;
}

.result-toolbar span {
  color: var(--muted);
  font-weight: 700;
}

.result-grid-modern {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.property-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.property-card-modern {
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 250px;
  box-shadow: none;
}

.property-media {
  position: relative;
  min-height: 180px;
  background: #dbe4ea;
}

.property-media img,
.gallery-main,
.gallery-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-placeholder,
.gallery-empty {
  display: grid;
  min-height: 100%;
  place-items: center;
  color: var(--muted);
}

.property-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.property-card-modern .property-body {
  align-content: start;
}

.property-body h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.property-body p {
  margin: 0;
  color: var(--muted);
}

.property-meta,
.property-facts,
.property-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.property-meta span,
.property-facts span,
.facts-grid span {
  padding: 5px 9px;
  color: #555;
  background: #f4f4f4;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  /*font-size: .86rem;*/
  font-size: 13px;
  font-weight: 700;
}

.property-actions {
  justify-content: space-between;
}

.property-actions strong,
.price {
  color: var(--accent);
  font-size: 1.28rem;
  font-weight: 700;
}

.photo-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 4px;
  color: #fff;
  background: #4a4a4a;
  font-size: .76rem;
  font-weight: 800;
}

.photo-badge.no-photo {
  color: var(--muted);
  background: rgba(255, 255, 255, .88);
}

.property-values,
.detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.property-values {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.property-values div,
.detail-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid #edf1f4;
}

.property-values dt,
.detail-list dt {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
}

.property-values dd,
.detail-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  text-align: right;
}

.pager-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 28px;
}

.pager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 50px;
}

.pager-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0 4px;
}

.pager .btn,
.pager .disabled {
  border-radius: 20px;
  height: 34px;
  padding: 0 16px;
  font-size: 0.88rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  transition: all 0.2s ease;
  text-decoration: none;
}

.pager .btn:hover {
  background: var(--soft);
  border-color: #999999;
  color: var(--ink);
}

.pager .disabled {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  opacity: 0.5;
  pointer-events: none;
}

.pager #txtPageGo {
  border-radius: 20px;
  border: 1px solid var(--line);
  font-size: 0.88rem;
  padding: 0 8px;
  text-align: center;
  height: 34px;
  width: 60px;
  background: #ffffff;
  box-shadow: none;
}

.pager #txtPageGo:focus {
  border-color: #86b7fe;
  outline: 0;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, .25);
}

@media (max-width: 575.98px) {
  .pager {
    padding: 6px 12px;
    gap: 16px;
  }
  .pager-mobile-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink);
    user-select: none;
  }
}

.pager-mobile-loadmore {
  padding: 0 16px;
  width: 100%;
}

.btn-load-more {
  background-color: #3b1fb3 !important;
  border-color: #3b1fb3 !important;
  color: #ffffff !important;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  width: 100%;
  height: 48px;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s ease;
  border: none;
  box-shadow: 0 4px 6px rgba(59, 31, 179, 0.15);
}

.btn-load-more:active {
  opacity: 0.9;
}

.btn-load-more.loading {
  opacity: 0.8;
  pointer-events: none;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

/* Fundo cinza na faixa da galeria: anúncios com 1-2 fotos não ficam com o vazio branco ao lado. */
.detail-gallery-hero {
  padding: 0;
  background: var(--soft);
}

.detail-gallery-strip {
  position: relative;
  overflow: hidden;
}

.portal-gallery {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.portal-gallery-item {
  flex: 0 0 clamp(260px, 23vw, 430px);
  height: clamp(250px, 28vw, 360px);
  padding: 0;
  overflow: hidden;
  background: #e5e5e5;
  border: 0;
  scroll-snap-align: start;
}

.portal-gallery-item.featured {
  min-height: 0;
}

.portal-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;
}

.portal-gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-strip-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 74px;
  color: #fff;
  background: rgba(0, 0, 0, .36);
  border: 0;
  font-size: 2.6rem;
  line-height: 1;
  transform: translateY(-50%);
}

.gallery-strip-nav:hover {
  background: rgba(0, 0, 0, .56);
}

.gallery-strip-nav.prev {
  left: 0;
}

.gallery-strip-nav.next {
  right: 0;
}

.portal-gallery-empty {
  display: grid;
  min-height: 280px;
  place-items: center;
  color: var(--muted);
  background: #e7eaed;
  border-radius: 4px;
}

/* ========================================
   Anúncio da captação (layout novo)
   ======================================== */
/* Wrapper 0x0 flutuante: o chip fica sobreposto sem deslocar o conteúdo */
.voltar-lista {
  float: left;
  position: sticky;
  top: 10px;
  z-index: 20;
  width: 0;
  height: 0;
  overflow: visible;
}

.voltar-lista .ico-voltar-lista {
  display: block;
  width: 87px;
  /* Puxa o chip para a faixa de 122px reservada no padding-left do container */
  margin: 10px 0 0 -122px;
  padding: 8px 4px 8px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 10px 20px -10px #aaa;
  color: #575757;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}

.voltar-lista .ico {
  float: left;
  width: 18px;
  height: 17px;
  margin: 3px 6px 0 0;
  background: url("/img/icon/ico-voltar-lista.png") no-repeat;
  background-size: 18px;
}

.anuncio-container {
  padding-top: 22px;
  padding-bottom: 46px;
  color: var(--ink);
}

/* Corpo do anúncio mais largo, como o container-anuncio (1480px) dos Portais.
   Só a página do anúncio: a lista e o mobile ficam nas larguras padrão do container. */
@media (min-width: 992px) {
  .container.anuncio-container {
    max-width: min(1480px, 100%);
  }
}

/* Faixa reservada à esquerda para o chip "Voltar para lista" (como no layout de referência) */
@media (min-width: 901px) {
  .anuncio-container {
    padding-left: 122px;
  }
}

@media (max-width: 900px) {
  .voltar-lista {
    display: none;
  }
}

.anuncio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 32px;
  align-items: start;
}

/* Margem inferior curta: os valores vêm logo abaixo (o título "Valor do imóvel:" foi removido). */
.anuncio-titulo {
  margin: 4px 0 16px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 400;
}

.anuncio-secao-titulo {
  margin: 30px 0 12px;
  color: var(--ink);
  font-size: 23px;
  font-weight: 700;
}

.anuncio-main > .anuncio-secao-titulo:first-of-type {
  margin-top: 0;
}

.anuncio-valores p {
  margin: 0 0 8px;
}

.valor-principal {
  font-size: 17px;
}

.valor-destaque {
  margin-left: 4px;
  font-size: 32px;
  font-weight: 700;
}

.valor-secundario {
  font-size: 16px;
}

.valor-linha-extra {
  margin-top: 12px !important;
  font-size: 16px;
}

.valor-linha-extra span:not(:last-child)::after {
  content: " \2013 ";
  margin: 0 4px;
  color: var(--muted);
}

.anuncio-especificacoes {
  display: flex;
  flex-wrap: wrap;
  margin: 22px 0 6px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Conteúdo centralizado dentro de cada "quadrado" (ícone + texto juntos no meio). */
.anuncio-especificacoes .col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  font-size: 17px;
  font-weight: 700;
}

.anuncio-especificacoes .col:last-child {
  border-right: 0;
}

.ico-espec {
  width: 33px;
  height: 32px;
  margin-right: 14px;
  flex: 0 0 33px;
  background-repeat: no-repeat;
}

.ico-quartos {
  background-image: url("/img/icon/quartos.png");
}

.ico-suites {
  background-image: url("/img/icon/suites.png");
}

.ico-vagas {
  background-image: url("/img/icon/vagas.png");
}

.ico-area {
  background-image: url("/img/icon/area.png");
}

.anuncio-codigo {
  margin: 8px 0 2px;
  font-size: 16px;
  text-align: right;
}

.anuncio-descricao {
  font-size: 19px;
  line-height: 1.5;
}

/* Mesmo tamanho da descrição (.anuncio-descricao): endereço e datas não ficam "encolhidos". */
.anuncio-endereco p,
.anuncio-datas p {
  margin: 0 0 7px;
  font-size: 19px;
}

.anuncio-datas {
  margin-top: 30px;
}

/* Placeholder do mapa (mesma ideia do Portais.Responsivo): imagem estática, clique abre o modal */
.anuncio-mapa {
  position: relative;
  height: 130px;
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: url("/img/layout/bg-map.jpg") center / cover no-repeat;
  cursor: pointer;
}

.anuncio-mapa:hover {
  background-image: url("/img/layout/bg-map-houver.jpg");
}

.quadro-mapa {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 2;
  max-width: min(340px, calc(100% - 32px));
  padding: 12px 16px 12px 46px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .22);
  transform: translateY(-50%);
}

.quadro-mapa .ico-map {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 21px;
  height: 28px;
  background: url("/img/icon/icon-map.png") no-repeat;
  transform: translateY(-50%);
}

.quadro-mapa .logradouro-map {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.quadro-mapa .regiao-map {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.anuncio-permuta {
  margin: 32px 0 12px;
  padding: 14px 28px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.permuta-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-bottom: 18px;
  font-size: 20px;
}

.permuta-header img {
  width: 26px;
  height: 26px;
}

/* 1ª coluna pelo conteúdo; a 2ª (Região/Cidade/Bairros) usa o restante e QUEBRA LINHA quando a
   lista de bairros é longa (minmax(0, 1fr) permite o conteúdo quebrar em vez de estourar o
   quadro). Observações, quando preenchida, vira uma linha própria embaixo. */
.permuta-grid {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 36px;
}

.permuta-grid dd {
  overflow-wrap: anywhere;
}

/* Cada coluna vira uma "tabelinha": labels à esquerda, valores alinhados na mesma posição */
.permuta-grid dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 10px;
  align-content: start;
  margin: 0;
  font-size: 17px;
}

.permuta-grid dl > div {
  display: contents;
}

.permuta-grid dt {
  font-weight: 400;
  white-space: nowrap;
}

.permuta-grid dd {
  margin: 0;
  font-weight: 700;
}

/* Observações (renderizada só quando preenchida): linha própria abaixo das colunas,
   ocupando a largura toda do quadro — label em cima, texto embaixo */
.permuta-grid .permuta-obs {
  display: block;
  grid-column: 1 / -1;
}

.permuta-grid .permuta-obs dd {
  margin-top: 4px;
  line-height: 1.35;
}

.anuncio-video {
  margin-top: 26px;
}

.anuncio-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 8px;
}

/* Sidebar - Ações da Captação */
.acoes-captacao {
  padding: 20px 16px 22px;
  background: #f1f1f1;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
}

.acoes-header {
  margin-bottom: 16px;
  text-align: center;
}

.acoes-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.acoes-header span {
  color: #555;
  font-size: 13px;
}

.acoes-lista {
  display: grid;
  gap: 10px;
}

.acoes-lista form {
  margin: 0;
}

/* Sem mensagem de captação, não ocupa espaço entre os botões */
.acoes-lista .form-message {
  min-height: 0;
  text-align: center;
}

.acoes-lista .form-message:empty {
  display: none;
}

.acao-btn {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 52px;
  padding: 7px 12px;
  color: var(--ink);
  background: #fff;
  border: 2px solid #b9b9b9;
  border-radius: 8px;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.acao-btn:hover {
  color: var(--ink);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .12);
  transform: translateY(-1px);
}

.acao-icone,
.acao-icone.material-symbols-outlined {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  font-size: 28px;
  line-height: 1;
}

.acao-texto {
  line-height: 1.18;
}

.acao-texto small {
  display: block;
  color: #555;
  font-size: 11.5px;
  font-weight: 400;
}

.acao-whatsapp {
  border-color: #25b356;
}

.acao-email {
  border-color: #38a3dc;
}

.acao-email .acao-icone {
  color: #38a3dc;
}

.acao-portal {
  border-color: #7c3aed;
}

.acao-portal .acao-icone {
  color: #7c3aed;
}

.acao-captar {
  border-color: #3a3a3a;
}

.acao-captar.captado {
  color: #2e8c08;
  border-color: #2e8c08;
}

.acao-captar.captado .acao-icone {
  color: #2e8c08;
}

.captar-ajuda {
  cursor: pointer;
  text-decoration: underline dotted;
}

.acao-denuncia {
  border-color: #e30613;
}

.acao-denuncia .acao-icone {
  color: #e30613;
}

.acao-proprietario {
  border-color: var(--brand);
}

.acao-proprietario .acao-icone {
  color: var(--brand);
}

.acoes-utilitarias .acao-btn {
  min-height: 48px;
  border-width: 1px;
  border-color: #b9b9b9;
}

.acoes-utilitarias .acao-icone {
  color: #444;
}

.contato-proprietario {
  margin: 16px 0;
  padding: 20px 16px 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-align: center;
}

/* Especificidade dupla: vence a classe .material-symbols-outlined do Google Fonts (carregada depois) */
.contato-avatar.material-symbols-outlined {
  display: inline-grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin-bottom: 12px;
  color: #fff;
  background: #2c3540;
  border-radius: 14px;
  font-size: 42px;
  line-height: 1;
}

.contato-proprietario h3 {
  margin: 0 0 14px;
  font-size: 16.5px;
  font-weight: 700;
}

.contato-linha {
  margin: 0 0 12px;
  font-size: 14.5px;
}

.contato-email {
  padding: 0;
  color: var(--ink);
  background: none;
  border: 0;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.contato-aviso {
  margin: 14px 4px 14px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.video-captar-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.mapa-modal-frame {
  display: block;
  width: 100%;
  height: min(70vh, 560px);
  border: 0;
}

/* Mapa interativo do modal (Maps JS API); o iframe de fallback herda .mapa-modal-frame. */
.mapa-modal-canvas {
  position: relative;
  width: 100%;
  height: min(70vh, 560px);
}

.mapa-modal-canvas #mapaCanvas {
  width: 100%;
  height: 100%;
}

/* Quadro da "fachada" (miniatura do Street View) sobre o mapa, como no site do Google Maps. */
.fachada-card {
  position: absolute;
  left: 14px;
  bottom: 26px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 8px;
  background: #262626;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .4);
  cursor: pointer;
  transition: transform .15s ease;
}

.fachada-card:hover {
  transform: scale(1.04);
}

.fachada-card img {
  display: block;
  width: 150px;
  height: 96px;
  object-fit: cover;
}

.fachada-card span {
  padding: 4px 8px;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
}

@media (max-width: 575px) {
  .fachada-card img {
    width: 110px;
    height: 72px;
  }
}

.capture-modal .modal-content {
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .25);
}

.capture-modal .modal-header {
  align-items: flex-start;
  padding: 20px 22px 16px;
  color: #fff;
  background: #262626;
  border-bottom: 0;
}

.capture-modal .modal-header span {
  display: block;
  margin-bottom: 4px;
  color: #f7b0b6;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.capture-modal .modal-header h2 {
  margin: 0;
  color: #fff;
  font-size: 1.28rem;
  font-weight: 700;
}

.capture-modal .btn-close {
  filter: invert(1) grayscale(1);
  opacity: .8;
}

.capture-modal .modal-body {
  padding: 20px 22px;
}

.capture-modal .modal-footer {
  padding: 16px 22px 20px;
  background: #f7f8f9;
  border-top: 1px solid var(--line);
}

.modal-helper {
  margin: 0 0 16px;
  color: var(--muted);
}

.capture-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.capture-form-grid label {
  display: grid;
  gap: 6px;
  color: #4b4f55;
  font-size: .88rem;
  font-weight: 700;
}

.capture-form-grid .form-control {
  min-height: 42px;
  border-color: #cfd5dc;
  border-radius: 4px;
}

.form-wide {
  grid-column: 1 / -1;
}

.form-check-line {
  display: flex !important;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  background: #f7f8f9;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 42px;
  background: rgba(0, 0, 0, .86);
}

.gallery-lightbox.open {
  display: flex;
}

.gallery-lightbox img {
  max-width: min(1180px, 92vw);
  max-height: 86vh;
  object-fit: contain;
}

/* Mobile: foto ocupa a tela inteira, como o álbum dos Portais (PhotoSwipe) — foto larga
   preenche a horizontal, foto "em pé" preenche a vertical; object-fit mantém a proporção. */
@media (max-width: 900px) {
  .gallery-lightbox {
    padding: 0;
  }

  .gallery-lightbox img {
    max-width: 100vw;
    max-height: 100dvh;
    width: auto;
    height: auto;
  }
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 42px;
  height: 42px;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 0;
  border-radius: 4px;
  font-size: 2rem;
  line-height: 1;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 58px;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, .34);
  border: 0;
  font-size: 2.6rem;
  line-height: 1;
  transform: translateY(-50%);
}

.gallery-nav:hover {
  background: rgba(0, 0, 0, .52);
}

.gallery-nav.prev {
  left: 0;
}

.gallery-nav.next {
  right: 0;
}

.rich-text {
  color: var(--ink);
  line-height: 1.55;
}

.form-message {
  min-height: 24px;
  color: var(--muted);
  font-weight: 700;
}

.form-message.success {
  color: var(--brand);
}

.form-message.error {
  color: var(--accent);
}

@media (max-width: 900px) {
  .login-panel,
  .detail-grid,
  .anuncio-grid {
    grid-template-columns: 1fr;
  }

  .result-grid-modern {
    grid-template-columns: 1fr;
  }

  .results-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .filter-head {
    cursor: pointer;
    user-select: none;
  }

  .filter-toggle-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    margin-left: 6px;
    font-size: 0.9em;
    color: var(--muted);
  }

  .filter-panel form {
    display: none;
  }

  .filter-panel.is-expanded form {
    display: block;
  }

  .filter-panel.is-expanded .filter-toggle-icon {
    transform: rotate(180deg);
  }

  .photo-row {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .photo-row-action {
    position: static;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: var(--soft);
    border-top: 1px solid var(--line);
    gap: 8px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-result-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(190px, .8fr);
  }

  .compact-result-values,
  .compact-result-dates {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .compact-result-action {
    grid-column: 2;
    justify-self: end;
    max-width: 180px;
  }

  .portal-gallery-item {
    flex-basis: clamp(230px, 42vw, 340px);
    height: 240px;
  }

  .anuncio-grid {
    gap: 28px;
  }

  .search-surface {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-wide {
    grid-column: span 2;
  }

  .legacy-search-grid,
  .legacy-search-header {
    grid-template-columns: 1fr 1fr;
  }

  .legacy-search {
    width: 100%;
  }

  .capture-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-support .container {
    grid-template-columns: 1fr;
  }

  .footer-portals {
    gap: 16px 30px;
  }

  .portal-logos {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .page-title,
  .list-header,
  .result-toolbar,
  .property-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search-surface,
  .property-card {
    grid-template-columns: 1fr;
  }

  .property-card-modern {
    min-height: auto;
  }

  .results-top,
  .photo-row,
  .photo-row-action {
    grid-template-columns: 1fr;
  }

  .results-top {
    align-items: stretch;
    flex-direction: column;
  }

  .view-tools {
    width: 100%;
  }

  .view-mode {
    flex: 1;
  }

  .photo-row-media {
    min-height: 210px;
  }

  .list-photo-slider {
    min-height: 210px;
  }

  .photo-row-body {
    padding: 16px 16px 20px 16px;
    gap: 8px;
  }

  .photo-row-body h3 {
    padding-right: 0;
    font-size: 1.15rem;
  }

  .photo-row .property-meta {
    padding-right: 0;
  }

  .photo-row .property-facts {
    gap: 4px 6px;
  }

  .photo-row .property-facts span {
    padding: 3px 6px;
    font-size: 0.8rem;
  }

  .compact-values {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
  }

  .compact-values dt {
    font-size: 0.65rem;
  }

  .compact-values dd {
    font-size: 0.8rem;
  }

  .photo-row-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2px;
    padding: 12px;
  }

  .main-price-wrap {
    align-items: center;
    text-align: center;
  }

  .photo-row-action strong {
    text-align: center;
  }

  .card-grid,
  .filter-two {
    grid-template-columns: 1fr;
  }

  .compact-result-row,
  .compact-result-values,
  .compact-result-dates {
    grid-template-columns: 1fr;
  }

  .compact-result-action {
    grid-column: auto;
    max-width: none;
  }

  .property-values {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .property-media {
    min-height: 220px;
  }

  .legacy-hero {
    padding: 20px 12px 34px;
  }

  .legacy-search-grid,
  .legacy-search-header {
    grid-template-columns: 1fr;
  }

  .brand-strip {
    flex-wrap: wrap;
  }

  .legacy-list-tools {
    width: auto;
  }

  .capture-title,
  .portal-network .container {
    align-items: stretch;
    flex-direction: column;
  }

  .capture-title h1 {
    font-size: 1.5rem;
  }

  .capture-search-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-gallery-item {
    flex-basis: 78vw;
    height: 230px;
  }

  .gallery-strip-nav {
    width: 36px;
    height: 58px;
    font-size: 2rem;
  }

  .anuncio-especificacoes .col {
    flex: 1 1 50%;
    padding: 12px 10px;
  }

  .anuncio-especificacoes .col:nth-child(2n) {
    border-right: 0;
  }

  .permuta-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .capture-form-grid {
    grid-template-columns: 1fr;
  }

  .footer-portals {
    gap: 14px 22px;
    padding: 22px 0 20px;
  }

  .footer-portals img {
    max-width: 104px;
    max-height: 28px;
  }

  .capture-search-grid {
    grid-template-columns: 1fr;
  }

  /* Oculta os campos opcionais por padrão no mobile */
  .capture-search-grid .field-optional {
    display: none !important;
  }

  /* Mostra quando os 3 principais forem selecionados */
  .capture-search-grid.show-optional .field-optional {
    display: grid !important;
  }

  /* Para o campo de valor que usa flex no mobile */
  .capture-search-grid.show-optional .field-valor-range.field-optional {
    display: flex !important;
  }

  /* Botão vai para o final no mobile */
  .search-button-field {
    order: 10;
    grid-row: span 1;
  }

  .search-button-field .btn {
    width: 100%;
    height: 42px;
    margin: 0;
  }

  /* Valores empilhados, cada um em linha cheia */
  .field-valor-range {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .field-valor-range .form-select {
    width: 100%;
  }

  .valor-sep {
    display: none;
  }
}

/* ========================================
   Botão Voltar ao Topo (#btn-topo)
   ======================================== */
#btn-topo {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 16px;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background-color: var(--brand);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.30);
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.88;
}

#btn-topo:hover {
  background-color: var(--brand-dark);
  opacity: 1;
  transform: translateY(-2px);
}

#btn-topo:active {
  transform: translateY(0);
}

#btn-topo .material-symbols-outlined {
  font-size: 22px;
  line-height: 1;
  font-variation-settings: 'wght' 500;
}

@media (max-width: 575.98px) {
  #btn-topo {
    bottom: 16px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  #btn-topo .material-symbols-outlined {
    font-size: 20px;
  }
}

/* Card & list view property-meta and property-facts enhancements */
.photo-row .property-meta,
.compact-result-row .property-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 2px;
}

.photo-row .property-meta {
  padding-right: 150px;
}

.photo-row .property-meta span,
.compact-result-row .property-meta span {
  padding: 3px 8px;
  color: var(--muted);
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  /*font-size: 0.78rem;*/
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
}

.photo-row .property-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.photo-row .property-facts span {
  padding: 5px 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  /*font-size: 0.82rem;*/
  font-size: 16px;
  font-weight: 600;
}

/* Enhancements to the Visualizar button in the photo-row action card */
.photo-row-action .btn-primary {
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.photo-row-action .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 640px) {
  .valor-destaque {
    font-size: 24px;
  }

  .anuncio-especificacoes .col {
    padding: 10px 8px;
    font-size: 14px;
  }

  .ico-espec {
    margin-right: 8px;
  }

}

@media print {
  .app-header,
  .footer,
  .voltar-lista,
  .gallery-strip-nav,
  #btn-topo {
    display: none !important;
  }

  .anuncio-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Incluir anúncio (port do IncluirAnuncio.aspx)
   ======================================== */
.incluir-anuncio-card {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 28px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.incluir-anuncio-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.incluir-anuncio-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.incluir-anuncio-head span {
  flex: 1 1 auto;
  color: var(--muted);
  font-size: 14px;
}

.incluir-anuncio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.incluir-anuncio-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.incluir-anuncio-form .campo {
  display: grid;
  gap: 5px;
  color: #4b4f55;
  font-size: 14px;
  font-weight: 700;
}

.incluir-anuncio-form .campo-cheio {
  grid-column: 1 / -1;
}

.campo-trio {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 18px;
}

.incluir-anuncio-form input[readonly] {
  color: var(--muted);
  background: var(--soft);
}

.incluir-anuncio-fotos h2 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
}

.fotos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.fotos-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.fotos-aviso {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.incluir-anuncio-lazer {
  margin: 24px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.incluir-anuncio-lazer legend {
  float: none;
  width: auto;
  margin: 0;
  padding: 0 6px;
  font-size: 15px;
  font-weight: 700;
}

.lazer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 18px;
}

.lazer-grid label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
}

.incluir-anuncio-rodape {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 26px;
  text-align: center;
}

.incluir-anuncio-rodape .btn {
  min-width: 220px;
}

.incluir-anuncio-sucesso {
  margin-top: 18px;
  padding: 18px;
  background: #f2fbf4;
  border: 1px solid #bfe5c8;
  border-radius: 8px;
  text-align: center;
}

.incluir-anuncio-sucesso p {
  margin: 0 0 14px;
  color: #1c7a30;
  font-size: 16px;
  font-weight: 700;
}

.incluir-anuncio-sucesso div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

@media (max-width: 900px) {
  .incluir-anuncio-grid {
    grid-template-columns: 1fr;
  }

  .incluir-anuncio-form,
  .campo-trio,
  .lazer-grid {
    grid-template-columns: 1fr;
  }

  .campo-trio {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ========================================
   Barra flutuante mobile do anúncio (padrão Portais.Responsivo)
   ======================================== */
.sticky-acoes-mobile {
  display: none;
}

@media screen and (max-width: 900px) {
  .sticky-acoes-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1030;
    display: flex;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: #f3f3f3;
    border-top: 1px solid #e1dfdf;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .05);
  }

  .btn-mobile-acao {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .7px;
  }

  .btn-mobile-acao:hover {
    color: #fff;
  }

  .btn-mobile-whatsapp {
    background: #00965e;
  }

  .btn-mobile-acoes {
    background: #3b1fb3;
  }

  .btn-mobile-acoes .material-symbols-outlined {
    font-size: 20px;
    line-height: 1;
  }

  /* Espaço para a barra não cobrir o fim do conteúdo */
  .anuncio-container {
    padding-bottom: 90px;
  }

  /* Sobe o "voltar ao topo" para não ficar atrás da barra */
  #btn-topo {
    bottom: 78px;
  }
}

@media print {
  .sticky-acoes-mobile {
    display: none !important;
  }
}
