/* ==========================================================================
   ELAS CORRETORAS — Componentes da landing page de imóvel
   PropertyHero, PropertySpecs, PropertyGallery + seções de conversão.
   Carregar depois de tokens.css e base.css.
   ========================================================================== */

/* ==========================================================================
   PropertyHero
   ========================================================================== */

.property-hero {
  background: var(--grafite);
  color: var(--marfim);
}

.property-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  padding-block: var(--space-6) var(--space-7);
}

.property-hero__copy .eyebrow { margin-bottom: var(--space-3); }
.property-hero__copy h1 { margin-bottom: var(--space-2); }
.property-hero__copy p.lede { color: var(--areia); margin: var(--space-3) 0 var(--space-5); }

.property-hero__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.property-hero__media {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: repeating-linear-gradient(135deg, #3a3b35, #3a3b35 14px, #2b2c27 14px, #2b2c27 28px);
}
.property-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.property-hero__media .media-caption {
  position: absolute; left: var(--space-4); bottom: var(--space-4);
  background: rgba(32,33,31,0.65); color: var(--marfim);
  font-size: 12px; padding: 8px 14px; border-radius: var(--radius-sm);
}

.property-hero__panel {
  background: rgba(245,241,233,0.06);
  border: 1px solid rgba(245,241,233,0.16);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.property-hero__panel-item { display: flex; align-items: flex-start; gap: 10px; }
.property-hero__panel-item .icon { width: 20px; height: 20px; color: var(--terracota); flex-shrink: 0; margin-top: 2px; }
.property-hero__panel-item strong { display: block; font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.property-hero__panel-item small { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--areia); opacity: 0.85; }

.property-hero__price {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(245,241,233,0.16);
  padding-top: var(--space-4);
}
.property-hero__price small { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--areia); opacity: 0.85; display:block; margin-bottom: 4px; }
.property-hero__price strong { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--terracota); }

@media (min-width: 980px) {
  .property-hero__grid { grid-template-columns: 1.15fr 0.85fr; align-items: start; padding-block: var(--space-7) var(--space-8); }
}

/* ==========================================================================
   Header mínimo exclusivo — páginas de imóvel NÃO usam o .site-header do
   site base. Só uma barra fina sobre a foto do hero, com o logo (volta pro
   site) e um CTA. Mantém a página com "cara de site só do imóvel".
   ========================================================================== */

.property-minimal-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 26px var(--container-pad);
  background: linear-gradient(180deg, rgba(32,33,31,0.78) 0%, rgba(32,33,31,0) 100%);
}
.property-minimal-header__logo {
  display: inline-flex;
  align-items: center;
}
.property-minimal-header__logo img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}
.property-minimal-header__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--marfim);
  opacity: 0.9;
}
.property-minimal-header__back:hover { opacity: 1; }
.property-minimal-header__back .icon { width: 15px; height: 15px; stroke-width: 1.8; }
.property-minimal-header__actions { display: flex; align-items: center; gap: var(--space-3); }

/* ==========================================================================
   PropertyHero cheio (edge-to-edge) — mesma lógica do hero da Início:
   a foto é o fundo de toda a seção, texto sobreposto com degradê.
   ========================================================================== */

.property-hero-full {
  position: relative;
  color: var(--marfim);
  min-height: 560px;
  background: var(--grafite);
}
/* Só a foto de fundo é recortada nos limites da seção — a torre (abaixo)
   precisa vazar por cima do conteúdo seguinte, então a seção em si NÃO
   tem overflow:hidden. */
.property-hero-full__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.property-hero-full__bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.property-hero-full__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(32,33,31,0.97) 0%,
    rgba(32,33,31,0.94) 30%,
    rgba(32,33,31,0.80) 48%,
    rgba(32,33,31,0.46) 66%,
    rgba(32,33,31,0.24) 84%,
    rgba(32,33,31,0.20) 100%);
}

/* Torre em recorte, grande e "solta" sobre a foto, vazando por baixo do
   hero até a seção seguinte — efeito parallax via JS (ver [data-parallax]
   em js/main.js). .property-hero-full é position:relative (positioned),
   então pinta por cima do próximo bloco (não posicionado) automaticamente,
   sem precisar de z-index ali. */
.property-hero-full__tower {
  position: absolute;
  z-index: 2;
  right: 4px;
  bottom: -36px;
  width: clamp(190px, 30vw, 340px);
  pointer-events: none;
  filter: drop-shadow(-16px 24px 32px rgba(0,0,0,0.45));
  will-change: transform;
}
.property-hero-full__tower img { width: 100%; height: auto; display: block; }

@media (min-width: 980px) {
  .property-hero-full__tower {
    right: 24px;
    bottom: -64px;
    width: clamp(300px, 26vw, 440px);
  }
}
@media (min-width: 1280px) {
  .property-hero-full__tower { right: 40px; bottom: -84px; width: clamp(360px, 24vw, 480px); }
}

/* Respiro para a torre vazar sobre espaço vazio, não sobre os cards
   (bate com o bottom: negativo de .property-hero-full__tower acima). */
.property-post-hero { padding-top: var(--space-3); }
@media (min-width: 980px) { .property-post-hero { padding-top: 76px; } }
@media (min-width: 1280px) { .property-post-hero { padding-top: 104px; } }

/* Sem "container" aqui de propósito: .container tem margin-inline:auto e,
   combinado com o max-width abaixo, recentralizaria o bloco de texto no
   meio da tela em vez de alinhá-lo à esquerda (mesmo bug já corrigido no
   hero da Início — ver css/base.css). */
.property-hero-full__content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 96px var(--container-pad) var(--space-7);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.property-hero-full__content .eyebrow { margin-bottom: var(--space-3); }
.property-hero-full__content h1 { margin-bottom: var(--space-3); }
.property-hero-full__content p.lede { color: var(--areia); margin-bottom: var(--space-5); max-width: 52ch; }

/* .btn-outline por padrão é escuro (para fundos claros) — no hero cheio,
   sobre foto/degradê escuro, precisa ficar claro. */
.property-hero-full .btn-outline { color: var(--marfim); }
.property-hero-full .btn-outline:hover { background: var(--marfim); color: var(--grafite); }

@media (min-width: 980px) {
  .property-hero-full, .property-hero-full__content { min-height: 720px; }
}

@media (max-width: 640px) {
  .property-hero-full__tower { display: none; }
}

/* ==========================================================================
   Aviso: imóvel inacabado / personalizável
   ========================================================================== */

.property-unfinished {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  background: var(--areia);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-top: var(--space-6);
}
.property-unfinished .icon {
  width: 30px; height: 30px;
  color: var(--grafite);
  flex-shrink: 0;
}
.property-unfinished h3 { font-size: 1.15rem; margin-bottom: 6px; }
.property-unfinished p { font-size: 14px; color: var(--grafite); opacity: 0.85; }

/* ==========================================================================
   Lightbox — abre fotos e plantas em tela cheia
   ========================================================================== */

[data-lightbox] { cursor: zoom-in; }

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20,20,18,0.94);
  padding: var(--space-5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease);
}
.lightbox-overlay.is-open { opacity: 1; visibility: visible; }
.lightbox-overlay img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: var(--shadow-soft);
}
.lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(245,241,233,0.3);
  background: rgba(245,241,233,0.08);
  color: var(--marfim);
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close .icon { width: 18px; height: 18px; }

/* ==========================================================================
   Sub-navegação sticky (âncoras de seção)
   Páginas de imóvel não têm o .site-header fixo do site base, então a
   sub-nav gruda no topo absoluto da viewport.
   ========================================================================== */

/* position:sticky e overflow-x:auto NO MESMO elemento têm um bug conhecido
   no Safari/iOS que impede o arrasto por toque (o scroll programático
   funciona, mas o dedo não "pega"). Por isso a rolagem fica só no elemento
   de dentro (.property-subnav__list) — o de fora (.property-subnav) cuida
   apenas do sticky, sem overflow nenhum. */
.property-subnav {
  position: sticky;
  top: 0;
  z-index: 400;
  background: var(--marfim);
  border-bottom: 1px solid var(--grafite-12);
}
.property-subnav__list {
  display: flex;
  gap: var(--space-5);
  padding-inline: var(--container-pad);
  white-space: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* momentum de rolagem no iOS */
  scrollbar-width: none;
  touch-action: pan-x;
}
.property-subnav__list::-webkit-scrollbar { display: none; }
.property-subnav__list a { flex-shrink: 0; }
/* Centraliza só quando cabe tudo na tela — em telas estreitas mantém
   o alinhamento natural à esquerda, senão o flexbox espreme os links pra
   caber e corta o início da lista ao rolar horizontalmente. */
@media (min-width: 900px) {
  .property-subnav__list { justify-content: center; }
}
.property-subnav__list a {
  display: inline-block;
  padding-block: 16px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cinza-tecnico);
  border-bottom: 2px solid transparent;
}
.property-subnav__list a:hover,
.property-subnav__list a.is-active {
  color: var(--grafite);
  border-color: var(--terracota);
}

/* ==========================================================================
   PropertySpecs — barra de atributos essenciais
   ========================================================================== */

.property-specs-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--grafite-12);
  border: 1px solid var(--grafite-12);
  border-radius: var(--radius-md);
  overflow: hidden;
}
@media (min-width: 720px) { .property-specs-bar { grid-template-columns: repeat(4, 1fr); } }

.property-specs-bar__item {
  background: var(--branco);
  padding: var(--space-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.property-specs-bar__item .icon { width: 24px; height: 24px; color: var(--terracota); }
.property-specs-bar__item strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.property-specs-bar__item small { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--cinza-tecnico); }

/* ==========================================================================
   Diferenciais
   ========================================================================== */

.diferenciais-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 720px) { .diferenciais-grid { grid-template-columns: repeat(2, 1fr); } }

.diferencial-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: var(--space-4);
  background: var(--branco);
  border: 1px solid var(--grafite-12);
  border-radius: var(--radius-md);
}
.diferencial-item .icon { width: 24px; height: 24px; color: var(--terracota); flex-shrink: 0; }
.diferencial-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.diferencial-item p { font-size: 13.5px; color: var(--cinza-tecnico); }

/* ==========================================================================
   PropertyGallery
   ========================================================================== */

.property-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 160px);
  gap: 10px;
}
@media (min-width: 720px) {
  .property-gallery { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 200px); }
  .property-gallery__item:first-child { grid-column: span 2; grid-row: span 2; }
}
.property-gallery__item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: repeating-linear-gradient(135deg, var(--areia), var(--areia) 12px, #cdbba7 12px, #cdbba7 24px);
}
.property-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.property-gallery__item:hover img { transform: scale(1.06); }
.property-gallery__item.is-cta {
  display: flex; align-items: center; justify-content: center;
  background: var(--grafite);
  color: var(--marfim);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-direction: column;
  gap: 6px;
}

/* ==========================================================================
   Localização
   ========================================================================== */

.location-map {
  aspect-ratio: 16/9;
  border-radius: var(--radius-md);
  background: repeating-linear-gradient(45deg, var(--areia), var(--areia) 1px, var(--marfim) 1px, var(--marfim) 22px);
  border: 1px solid var(--grafite-12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cinza-tecnico);
  font-size: 13px;
  text-align: center;
  padding: var(--space-4);
}

.location-points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.location-point { display: flex; gap: 10px; align-items: center; font-size: 13.5px; }
.location-point .icon { width: 18px; height: 18px; color: var(--terracota); flex-shrink: 0; }
.location-point small { display: block; color: var(--cinza-tecnico); font-size: 12px; }

/* ==========================================================================
   Dados objetivos (tabela)
   ========================================================================== */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table tr { border-bottom: 1px solid var(--grafite-12); }
.data-table tr:last-child { border-bottom: none; }
.data-table td { padding: 14px 4px; }
.data-table td:first-child { color: var(--cinza-tecnico); font-weight: 600; }
.data-table td:last-child { text-align: right; font-weight: 600; }

/* ==========================================================================
   Conversão — painel lateral sticky
   ========================================================================== */

.conversion-panel {
  position: sticky;
  top: 120px;
}

/* ==========================================================================
   Barra de conversão mobile (fixa no rodapé em telas pequenas)
   ========================================================================== */

.mobile-conversion-bar {
  display: none;
}
@media (max-width: 900px) {
  .mobile-conversion-bar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 550;
    background: var(--grafite);
    padding: 12px var(--container-pad);
    gap: 10px;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.2);
  }
  .mobile-conversion-bar .btn { flex: 1; padding: 13px 10px; font-size: 12px; }
  /* dá espaço para a barra não cobrir o final da página */
  body.has-mobile-conversion-bar { padding-bottom: 70px; }
}
