/* Property Gallery Styles - Baseado no site1Original */

.property-gallery-area {
  margin-bottom: 2rem;
  position: relative;
}

/* Swiper Principal */
.property-swiper {
  height: 500px !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  margin-bottom: 1rem;
}

.property-swiper .swiper-slide {
  position: relative;
  overflow: hidden;
  background-color: var(--ztc-bg-bg-1, #fff); /* Fundo branco para laterais de fotos verticais */
}

.property-swiper .swiper-slide img {
  width: 100%;
  height: 500px;
  object-fit: contain; /* Alterado de cover para contain - evita zoom/corte excessivo */
  transition: transform 0.3s ease;
}

.property-swiper .swiper-slide:hover img {
  transform: scale(1.05);
}

/* Indicador de Zoom */
.property-swiper .swiper-slide .zoom-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 6;
  pointer-events: none;
}

.property-swiper .swiper-slide .zoom-icon i {
  color: white;
  font-size: 16px;
}

.property-swiper .swiper-slide:hover .zoom-icon {
  opacity: 1;
}

/* Contador de Fotos */
.photo-counter {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  z-index: 10;
  backdrop-filter: blur(10px);
}

/* Descrição da Foto */
.photo-description {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 80px; /* Deixa espaço para o contador */
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 400;
  z-index: 10;
  backdrop-filter: blur(10px);
  display: none; /* Oculto por padrão, será exibido via JS quando houver descrição */
  transition: opacity 0.3s ease;
  line-height: 1.4;
}

/* Botões de Navegação */
.property-swiper .swiper-button-next,
.property-swiper .swiper-button-prev {
  color: white;
  background: rgba(0, 0, 0, 0.5);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.property-swiper .swiper-button-next:hover,
.property-swiper .swiper-button-prev:hover {
  background: var(--ztc-bg-bg-3, #cbcd30);
  color: var(--ztc-text-text-2, #030e0f);
  transform: scale(1.1);
}

.property-swiper .swiper-button-next::after,
.property-swiper .swiper-button-prev::after {
  font-size: 16px;
  font-weight: 600;
}

/* Paginação */
.property-swiper .swiper-pagination {
  bottom: 16px;
  left: 16px;
  width: auto;
  text-align: left;
}

.property-swiper .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  width: 12px;
  height: 12px;
  margin: 0 4px;
  transition: all 0.3s ease;
}

.property-swiper .swiper-pagination-bullet-active {
  background: var(--ztc-bg-bg-3, #cbcd30);
  transform: scale(1.2);
}

/* Swiper de Thumbnails */
.property-thumbs {
  height: 80px;
  padding: 0;
  margin-top: 1rem;
}

.property-thumbs .swiper-slide {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.property-thumbs .swiper-slide img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  transition: all 0.3s ease;
}

.property-thumbs .swiper-slide:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.property-thumbs .swiper-slide-thumb-active {
  border: 3px solid var(--ztc-bg-bg-3, #cbcd30);
  transform: scale(1.05);
}

.property-thumbs .swiper-slide-thumb-active img {
  opacity: 1;
  filter: brightness(1.1);
}

.property-thumbs .swiper-slide:not(.swiper-slide-thumb-active) img {
  opacity: 0.7;
  filter: brightness(0.8);
}

/* Overlay de Loading */
.property-gallery-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.property-gallery-area.loading::before {
  opacity: 1;
  pointer-events: all;
}

.property-gallery-area.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  border: 4px solid var(--ztc-bg-bg-3, #cbcd30);
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translate(-50%, -50%);
  z-index: 1001;
}

@keyframes spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Fallback para imagem única */
.property-gallery-area .img-fluid {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.property-gallery-area .img-fluid:hover {
  transform: scale(1.02);
}

/* Responsividade */
@media (max-width: 768px) {
  .property-swiper {
    height: 300px !important;
    border-radius: 8px;
  }

  .property-swiper .swiper-slide img {
    height: 300px;
    object-fit: contain;
  }

  .property-swiper .swiper-button-next,
  .property-swiper .swiper-button-prev {
    width: 40px;
    height: 40px;
  }

  .property-swiper .swiper-button-next::after,
  .property-swiper .swiper-button-prev::after {
    font-size: 14px;
  }

  .property-thumbs {
    height: 60px;
  }

  .property-thumbs .swiper-slide img {
    height: 60px;
  }

  .photo-counter {
    font-size: 10px;
    padding: 4px 8px;
  }

  .photo-description {
    font-size: 12px;
    padding: 6px 12px;
    bottom: 12px;
    left: 12px;
    right: 70px;
  }

  .property-gallery-area .img-fluid {
    height: 300px;
  }
}

@media (max-width: 576px) {
  .property-swiper {
    height: 250px !important;
    margin-bottom: 0.75rem;
  }

  .property-swiper .swiper-slide img {
    height: 250px;
    object-fit: contain;
  }

  .property-thumbs {
    height: 50px;
    margin-top: 0.75rem;
  }

  .property-thumbs .swiper-slide img {
    height: 50px;
  }

  .property-swiper .swiper-button-next,
  .property-swiper .swiper-button-prev {
    width: 35px;
    height: 35px;
  }

  .photo-description {
    font-size: 11px;
    padding: 5px 10px;
    bottom: 10px;
    left: 10px;
    right: 65px;
  }

  .property-gallery-area .img-fluid {
    height: 250px;
    border-radius: 8px;
  }
}

/* Animação de entrada */
.property-gallery-area {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Efeitos especiais para lightbox */
.property-swiper .swiper-slide a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.property-swiper .swiper-slide a::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  pointer-events: none;
}

.property-swiper .swiper-slide a:hover::after {
  background: rgba(0, 0, 0, 0.1);
}

/* Otimização para performance */
.property-swiper .swiper-slide img,
.property-thumbs .swiper-slide img {
  will-change: transform;
}

.property-swiper .swiper-button-next,
.property-swiper .swiper-button-prev {
  will-change: transform, background-color;
}
