/* =========================================================
   PÁGINA DE DETALHES DO IMÓVEL
========================================================= */
.imovel-breadcrumb{ padding: 20px 24px 0; }
.imovel-breadcrumb a{
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--ocean);
  opacity: .85;
}
.imovel-breadcrumb a:hover{ opacity: 1; text-decoration: underline; }

.imovel-loading, .imovel-erro{
  padding: 80px 24px;
  text-align: center;
  color: var(--navy);
  opacity: .7;
}
.imovel-erro h1{ margin-bottom: 10px; }
.imovel-erro .btn{ margin-top: 18px; }

.imovel-detail{ padding: 24px 24px 90px; }

.imovel-detail-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.imovel-detail-head h1{
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin: 4px 0 0;
}
.imovel-detail-head .imovel-local{
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--ocean);
  opacity: .9;
}
.imovel-detail-head .badge{
  flex-shrink: 0;
  margin-top: 6px;
}

/* ---------- Galeria ---------- */
.imovel-gallery{ margin-bottom: 40px; }
.gallery-main{
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--navy-soft);
  aspect-ratio: 4/3;
  cursor: zoom-in;
}
.gallery-main img{
  width: 100%; height: 100%;
  object-fit: contain;
  background: var(--navy-soft);
  display: block;
}
.gallery-nav{
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 999px;
  background: rgba(15,25,35,.55);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease;
}
.gallery-nav:hover{ background: rgba(15,25,35,.8); }
.gallery-prev{ left: 14px; }
.gallery-next{ right: 14px; }
.gallery-count{
  position: absolute; right: 14px; bottom: 14px;
  background: rgba(15,25,35,.65);
  color: #fff;
  font-family: var(--font-mono);
  font-size: .78rem;
  padding: 5px 11px;
  border-radius: 999px;
}
.gallery-thumbs{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.gallery-thumbs img{
  width: 100%; aspect-ratio: 1/1;
  object-fit: contain;
  background: var(--navy-soft);
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: .78;
  transition: opacity .2s ease, border-color .2s ease, transform .15s ease;
}
.gallery-thumbs img:hover{ opacity: 1; transform: translateY(-2px); }
.gallery-thumbs img.active{ opacity: 1; border-color: var(--gold); }

/* ---------- Corpo / info ---------- */
.imovel-detail-body{
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}
.imovel-detail-info h2{ font-size: 1.3rem; margin-bottom: 14px; }
.imovel-detail-info p{ color: var(--navy); opacity: .85; line-height: 1.7; }
.imovel-detail-info .imovel-specs{ margin-top: 20px; }

.imovel-detail-cta{ position: sticky; top: 90px; }
.imovel-cta-card{
  background: var(--navy);
  color: var(--sand);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.imovel-cta-card .imovel-price{ margin-bottom: 4px; }
.imovel-cta-card .imovel-price strong{
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.imovel-cta-card .imovel-price small{ opacity: .7; font-size: .8rem; }
.imovel-cta-card .btn-whatsapp{ justify-content: center; }
.imovel-cta-card .btn-ghost{
  justify-content: center;
  border-color: rgba(245,239,228,.3);
  color: var(--sand);
}
.imovel-cta-card .btn-ghost:hover{ border-color: var(--sand); }

@media (max-width: 860px){
  .imovel-detail-body{ grid-template-columns: 1fr; }
  .imovel-detail-cta{ position: static; }
}
@media (max-width: 560px){
  .gallery-nav{ width: 36px; height: 36px; font-size: 1.25rem; }
  .gallery-thumbs{ grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
}

/* ---------- Lightbox ---------- */
.lightbox{
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,15,20,.94);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden]{ display: none; }
.lightbox img{
  max-width: 90vw; max-height: 84vh;
  object-fit: contain;
  border-radius: 6px;
}
.lightbox-close{
  position: absolute; top: 18px; right: 20px;
  width: 42px; height: 42px; border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #fff; border: none; font-size: 1.2rem; cursor: pointer;
}
.lightbox-close:hover{ background: rgba(255,255,255,.2); }
.lightbox-nav{
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px; border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #fff; border: none; font-size: 1.8rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover{ background: rgba(255,255,255,.2); }
.lightbox-prev{ left: 18px; }
.lightbox-next{ right: 18px; }
.lightbox-count{
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: #fff; font-family: var(--font-mono); font-size: .82rem; opacity: .8;
}
@media (max-width: 560px){
  .lightbox-nav{ width: 40px; height: 40px; font-size: 1.4rem; }
  .lightbox-prev{ left: 8px; }
  .lightbox-next{ right: 8px; }
}
