/* Página pública de imóvel (renderizada no servidor). */
.listing-page .site-header { position: sticky; top: 0; z-index: 20; background: #173D3B; }
.listing-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); font-size: .8rem; letter-spacing: .04em; }
.listing-nav a { text-decoration: none; }
.listing-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 8px; }
.listing-nav .nav-cta { border-color: #F4EFE6; }
.listing-main { padding: clamp(18px, 3vw, 36px) clamp(18px, 6vw, 110px) clamp(60px, 8vw, 110px); max-width: 1400px; margin: 0 auto; }
.listing-page nav.listing-breadcrumb { display: block; position: static; padding: 0; border: 0; background: transparent; font-size: .78rem; color: var(--muted); margin: 0 0 18px; }
.listing-breadcrumb a { color: var(--petrol); text-decoration: none; }
.listing-breadcrumb a:hover { text-decoration: underline; }

.listing-gallery { margin: 0; position: relative; display: grid; gap: 8px; }
.listing-gallery-main { width: 100%; height: clamp(240px, 46vw, 620px); overflow: hidden; background: var(--ivory); }
.listing-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.listing-gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; }
.listing-thumb { flex: 0 0 auto; width: 118px; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; background: var(--ivory); cursor: pointer; scroll-snap-align: start; opacity: .75; transition: opacity .2s, border-color .2s; }
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-thumb:hover, .listing-thumb:focus-visible { opacity: 1; outline: none; border-color: var(--terracotta); }
.listing-thumb.is-active { opacity: 1; border-color: var(--petrol); }
.listing-gallery-count { position: absolute; right: 14px; top: 14px; padding: 6px 10px; background: rgba(14, 44, 43, .78); color: white; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
.listing-gallery-empty { display: grid; place-items: center; aspect-ratio: 16 / 7; background: var(--ivory); color: var(--terracotta); font: 4rem var(--serif); }

.listing-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: clamp(28px, 5vw, 70px); margin-top: clamp(28px, 4vw, 48px); align-items: start; }
.listing-content h1 { margin: 10px 0 14px; color: var(--petrol); font: 400 clamp(2rem, 4vw, 3.4rem)/1.05 var(--serif); letter-spacing: -.02em; }
.listing-content .detail-price { margin: 0 0 6px; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.listing-content .detail-meta { color: var(--petrol); font-size: .85rem; }
.listing-content .detail-meta span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 10px; background: var(--terracotta); vertical-align: middle; }
.listing-subtitle { margin: 34px 0 10px; color: var(--petrol); font: 400 1.4rem var(--serif); }
.listing-content .detail-features { margin-top: 0; }

.listing-aside { position: sticky; top: 112px; display: grid; gap: 22px; }
.listing-contact { margin-top: 0; }
.listing-contact-lead { margin: 8px 0 0; color: var(--muted); font-size: .92rem; }
.listing-contact-alt { margin: 0; font-size: .85rem; color: var(--muted); }
.listing-contact-alt a { color: var(--petrol); font-weight: 700; }
.listing-share { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 0 4px; font-size: .85rem; }
.listing-share .eyebrow { flex-basis: 100%; }
.listing-share a, .listing-copy { color: var(--petrol); font-weight: 700; text-decoration: underline; text-underline-offset: 5px; background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }

@media (max-width: 960px) {
  .listing-layout { grid-template-columns: 1fr; }
  .listing-aside { position: static; }
}
@media (max-width: 860px) {
  .listing-page .site-header { position: static; height: auto; flex-wrap: wrap; gap: 8px 18px; padding-block: 12px; }
  .listing-page .brand img { width: 180px; height: 52px; }
  .listing-page nav.listing-nav { display: flex; position: static; flex-direction: row; align-items: center; width: 100%; overflow-x: auto; gap: 16px; font-size: .76rem; padding: 4px 0 6px; border: 0; background: #173D3B; scrollbar-width: none; }
  .listing-page nav.listing-nav a { white-space: nowrap; }
  .listing-nav .nav-cta { display: none; }
  .listing-gallery-main { height: clamp(220px, 62vw, 320px); }
  .listing-thumb { width: 92px; }
  .listing-main { padding-inline: 16px; }
}

.listing-mobile-bar { display: none; }
@media (max-width: 860px) {
  .listing-mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(251, 248, 242, .97); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(14, 44, 43, .08); }
  .listing-mobile-bar .button { min-height: 46px; padding: 0 10px; font-size: .74rem; }
  .listing-mobile-bar .listing-whatsapp { background: #1f6f5b; color: white; }
  .listing-mobile-bar .listing-visit { background: var(--ivory); color: var(--petrol); border: 1px solid var(--petrol); }
  .listing-page footer { padding-bottom: 96px; }
}
