/* ==========================================================================
   PDP (Property Detail Page) - Página Comercial de Imóvel Simples
   Padrão de informação e organização visual de alta conversão
   ========================================================================== */

/* Container da Galeria - 100% de largura total */
.pdp-gallery-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* Palco da Imagem Principal */
.pdp-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 640px;
  background-color: #0B131D;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 20px 40px -15px rgba(11, 19, 29, 0.15);
  border-top: 1px solid rgba(226, 223, 215, 0.7);
  border-bottom: 1px solid rgba(226, 223, 215, 0.7);
}

@media (min-width: 768px) {
  .pdp-stage {
    aspect-ratio: 16 / 9;
    max-height: 620px;
  }
}

@media (min-width: 1280px) {
  .pdp-stage {
    aspect-ratio: 21 / 9;
    max-height: 660px;
  }
}

.pdp-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.25s ease, transform 0.5s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.pdp-stage-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(11, 19, 29, 0.75);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
}

.pdp-stage-counter {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(11, 19, 29, 0.75);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
}

/* Setas de Navegação Direta na Foto Principal */
.pdp-stage-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(11, 19, 29, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  padding: 0;
  touch-action: manipulation;
  user-select: none;
}

.pdp-stage-nav:hover {
  background: rgba(11, 19, 29, 0.95);
  color: #C88D58;
  border-color: #C88D58;
  transform: translateY(-50%) scale(1.08);
}

.pdp-stage-nav:active {
  transform: translateY(-50%) scale(0.94);
}

.pdp-stage-prev {
  left: 1rem;
}

.pdp-stage-next {
  right: 1rem;
}

@media (max-width: 640px) {
  .pdp-stage-nav {
    width: 42px;
    height: 42px;
  }
  .pdp-stage-prev {
    left: 0.625rem;
  }
  .pdp-stage-next {
    right: 0.625rem;
  }
}

/* Trilho de Miniaturas Centralizado */
.pdp-thumbs {
  display: flex;
  align-items: center;
  justify-content: safe center;
  gap: 0.625rem;
  margin: 1rem auto 0 auto;
  overflow-x: auto;
  padding: 0.25rem 0.5rem 0.625rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.pdp-thumbs::-webkit-scrollbar {
  height: 6px;
}

.pdp-thumbs::-webkit-scrollbar-track {
  background: #F0EFEA;
  border-radius: 9999px;
}

.pdp-thumbs::-webkit-scrollbar-thumb {
  background: #D4AF6E;
  border-radius: 9999px;
}

.pdp-thumb {
  flex-shrink: 0;
  width: 90px;
  height: 60px;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background-color: #0B131D;
  transition: all 0.2s ease;
  padding: 0;
  position: relative;
}

@media (min-width: 640px) {
  .pdp-thumb {
    width: 110px;
    height: 72px;
    border-radius: 1rem;
  }
}

.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pdp-thumb:hover img {
  transform: scale(1.05);
}

.pdp-thumb.is-active {
  border-color: #C88D58;
  box-shadow: 0 4px 12px rgba(200, 141, 88, 0.25);
  transform: translateY(-2px);
}

/* Grid de Especificações */
.pdp-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

@media (min-width: 640px) {
  .pdp-specs-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .pdp-specs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pdp-spec-card {
  padding: 1rem;
  background: #FFFFFF;
  border: 1px solid #E2DFD7;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.pdp-spec-card i,
.pdp-spec-card svg {
  color: #C88D58;
  margin-bottom: 0.25rem;
}

.pdp-spec-card strong {
  font-size: 1.05rem;
  font-weight: 700;
  color: #16191D;
  line-height: 1.2;
}

.pdp-spec-card span {
  font-size: 0.75rem;
  color: #5C646D;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* Card Golden Bridge (Acesso à Página Completa) */
.pdp-bridge-card {
  background: linear-gradient(135deg, #0B131D 0%, #162232 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 1.5rem;
  padding: 1.75rem 2rem;
  color: #ffffff;
  margin: 2rem 0;
  box-shadow: 0 16px 32px -8px rgba(11, 19, 29, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .pdp-bridge-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.pdp-bridge-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #ffffff;
}

.pdp-bridge-card p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.5;
  max-width: 480px;
}

.pdp-bridge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: 0.875rem;
  background-color: #ffffff;
  color: #0B131D !important;
  font-size: 0.825rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.pdp-bridge-btn:hover {
  background-color: #F0EFEA;
  transform: translateY(-1px);
}

/* Sidebar Comercial Sticky */
.pdp-sidebar-card {
  background: #FFFFFF;
  border: 1px solid #E2DFD7;
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: 0 12px 28px -6px rgba(11, 19, 29, 0.08);
}

.pdp-price-tag {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.pdp-price-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8D95A0;
  margin-bottom: 0.25rem;
}

.pdp-price-val {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #16191D;
  line-height: 1.1;
}

.pdp-price-sub {
  font-size: 0.825rem;
  color: #5C646D;
  margin-top: 0.35rem;
}

/* Diferenciais e Comodidades */
.pdp-amenities-list {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}

@media (min-width: 640px) {
  .pdp-amenities-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pdp-amenity-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: #16191D;
  font-weight: 500;
}

.pdp-amenity-item svg {
  color: #25D366;
  flex-shrink: 0;
}

/* Card de Atendimento / Corretora Andreza Scolari */
.pdp-agent-box {
  padding-top: 1.25rem;
  border-top: 1px solid #E2DFD7;
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.pdp-agent-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #E2DFD7;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.pdp-agent-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.pdp-agent-name {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  color: #16191D;
}

.pdp-agent-creci {
  font-size: 0.72rem;
  color: #5C646D;
  line-height: 1.25;
  margin-top: 2px;
  white-space: nowrap;
}

.pdp-agent-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #C88D58;
  line-height: 1.2;
  margin-top: 3px;
}

/* ==================== SEÇÃO DE IMÓVEIS SEMELHANTES ==================== */
.pdp-related-section {
  padding-top: 5.5rem;
  padding-bottom: 6rem;
  scroll-margin-top: 5rem;
}

@media (min-width: 640px) {
  .pdp-related-section {
    padding-top: 7rem;
    padding-bottom: 7.5rem;
  }
}

@media (min-width: 1024px) {
  .pdp-related-section {
    padding-top: 9rem;
    padding-bottom: 9.5rem;
  }
}

.pdp-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .pdp-related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* ==================== CARDS NORMALIZADOS (MESMO TAMANHO / FOTO PRINCIPAL) ==================== */
.listing-card {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #0B131D;
  border: 1px solid rgba(22, 25, 29, 0.1);
  box-shadow: 0 4px 18px -2px rgba(11, 19, 29, 0.08);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
  width: 100%;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -8px rgba(11, 19, 29, 0.28);
  border-color: #C88D58;
}

.listing-card > a {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  text-decoration: none;
  color: #FFFFFF;
}

/* Imagem principal cobrindo 100% da área do card */
.listing-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0B131D;
}

.listing-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

/* Enquadramento balanceado para a fachada ampla do Alvôre */
a[href*="alvore"] .listing-card__image img {
  object-position: 25% center;
}

.listing-card:hover .listing-card__image img {
  transform: scale(1.06);
}

/* Badge de status discreto com glassmorphism */
.listing-card__status {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
  padding: 0.35rem 0.75rem;
  background: rgba(11, 19, 29, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

/* Informações do Imóvel sobrepostas */
.listing-card__info {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.35rem 1.4rem;
  background: linear-gradient(180deg, rgba(11, 19, 29, 0) 0%, rgba(11, 19, 29, 0.25) 25%, rgba(11, 19, 29, 0.88) 68%, rgba(11, 19, 29, 0.98) 100%);
  color: #FFFFFF;
}

.listing-card__location {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #D4AF6E;
  margin-bottom: 0.25rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.listing-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.25;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.listing-card__price {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.listing-card__price small {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.2;
}

.listing-card__price strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  font-feature-settings: "tnum";
  line-height: 1.2;
}

.listing-card__price::after {
  content: 'Conhecer →';
  font-size: 0.72rem;
  font-weight: 600;
  color: #C88D58;
  letter-spacing: 0.04em;
  transition: transform 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

.listing-card:hover .listing-card__price::after {
  transform: translateX(3px);
  color: #E2AC7E;
}

/* ==================== COMPORTAMENTO RESPONSIVO: DESKTOP (HOVER) vs MOBILE ==================== */

/* 1. Mobile & Touchscreens: Informações fixadas elegantemente na base da foto */
@media (max-width: 767px), (hover: none) {
  .listing-card__status {
    opacity: 1;
    transform: none;
  }
  .listing-card__info {
    opacity: 1;
    transform: none;
    padding: 1.15rem 1.25rem;
    background: linear-gradient(180deg, rgba(11, 19, 29, 0) 0%, rgba(11, 19, 29, 0.35) 25%, rgba(11, 19, 29, 0.88) 65%, rgba(11, 19, 29, 0.98) 100%);
  }
  .listing-card h2 {
    font-size: 1.05rem;
  }
  .listing-card__price strong {
    font-size: 0.95rem;
  }
}

/* 2. Desktop: Foto 100% limpa no repouso; informações surgem suavemente no hover */
@media (hover: hover) and (min-width: 768px) {
  .listing-card__status {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .listing-card__info {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
  }

  .listing-card:hover .listing-card__status {
    opacity: 1;
    transform: translateY(0);
  }

  .listing-card:hover .listing-card__info {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}


