/* Estilos para a galeria de fotos */
.thumbs {
    margin-top: 15px;
}

.thumbs .thumbnail {
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.thumbs .thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Container principal da galeria */
.gallery-container {
    position: relative;
    margin-bottom: 20px;
}

/* Carrossel de fotos principal */
.main-photo-carousel {
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
}

.main-photo-carousel .swiper-container {
    width: 100%;
    height: 100%;
}

.main-photo-carousel .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.main-photo-carousel .swiper-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.main-photo-carousel .swiper-button-next,
.main-photo-carousel .swiper-button-prev {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    transition: all 0.3s ease;
}

.main-photo-carousel .swiper-button-next:after,
.main-photo-carousel .swiper-button-prev:after {
    font-size: 18px;
}

.main-photo-carousel .swiper-button-next:hover,
.main-photo-carousel .swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Contador de fotos */
.photo-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    z-index: 10;
}

/* Botão de tela cheia */
.fullscreen-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.fullscreen-toggle:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.fullscreen-toggle i {
    font-size: 16px;
}

/* Indicador de zoom */
.zoom-indicator {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zoom-active .zoom-indicator {
    opacity: 1;
}

/* Carrossel de miniaturas */
.thumbnails-carousel {
    position: relative;
    padding: 0 25px;
}

.thumbnails-container {
    margin-bottom: 20px;
}

.thumbnail-item {
    padding: 2px;
}

.thumbnail-link {
    display: block;
    position: relative;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.thumbnail-link:after {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.thumbnail-link.active:after {
    opacity: 0;
}

.thumbnail-link img {
    width: 100%;
    height: 70px;
    object-fit: cover;
    border-radius: 5px;
}

.thumbnails-carousel .slick-prev,
.thumbnails-carousel .slick-next {
    font-size: 0;
    line-height: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    width: 20px;
    height: 20px;
    padding: 0;
    color: #fff;
    border: none;
    outline: none;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1;
}

.thumbnails-carousel .slick-prev:before,
.thumbnails-carousel .slick-next:before {
    font-family: 'slick';
    font-size: 20px;
    line-height: 1;
    opacity: 0.75;
    color: white;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.thumbnails-carousel .slick-prev {
    left: 0;
}

.thumbnails-carousel .slick-next {
    right: 0;
}

/* Loading */
.gallery-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.gallery-loading:after {
    content: '';
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #ccc;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Classes para PhotoSwipe */
.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    cursor: zoom-in;
}

/* Estilos para modo tela cheia */
.gallery-fullscreen .main-photo-carousel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    background: #000;
    margin: 0;
}

.gallery-fullscreen .main-photo-carousel .swiper-slide img {
    height: 100vh;
    border-radius: 0;
    object-fit: contain;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .main-photo-carousel .swiper-slide img {
        height: 300px;
    }
    
    .thumbnail-link img {
        height: 50px;
    }
    
    .main-photo-carousel .swiper-button-next,
    .main-photo-carousel .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    
    .main-photo-carousel .swiper-button-next:after,
    .main-photo-carousel .swiper-button-prev:after {
        font-size: 14px;
    }
    
    .fullscreen-toggle {
        width: 30px;
        height: 30px;
    }
    
    .photo-counter,
    .zoom-indicator {
        font-size: 12px;
        padding: 3px 8px;
    }
}

/* Animação de transição */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Estilos para modo de zoom */
.swiper-zoom-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Legenda da foto */
.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-photo-carousel .swiper-slide:hover .photo-caption {
    opacity: 1;
}

/* Estilos para o PhotoSwipe em dispositivos móveis */
@media (max-width: 768px) {
    .pswp__top-bar {
        height: 44px;
    }
    
    .pswp__button--arrow--left,
    .pswp__button--arrow--right {
        background-size: 20px 20px;
        width: 40px;
        height: 40px;
    }
    
    .pswp__caption {
        background-color: rgba(0, 0, 0, 0.6);
    }
    
    .pswp__caption__center {
        max-width: 100%;
        text-align: center;
        font-size: 13px;
    }
    
    /* Melhorar o feedback tátil para usuários móveis */
    .pswp__img {
        transition: opacity 0.2s;
    }
    
    .pswp__bg {
        transition: opacity 0.4s;
    }
}

/* Melhorar indicação visual de que a foto principal é clicável */
.img-main {
    cursor: zoom-in;
}

/* Adicionar indicador de carregamento */
.pswp__preloader {
    opacity: 1;
}

.pswp__preloader--active {
    opacity: 1;
}

/* Estilos para o container da galeria */
.gallery-container {
    margin-bottom: 20px;
}

.main-photo-container {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    margin-bottom: 10px;
}

.photo-nav-container {
    position: relative;
}

/* Novos estilos para contador de fotos */
.img-quantity {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    z-index: 2;
}

.img-quantity i {
    margin-right: 5px;
}

/* Estilo para botões de navegação na foto principal */
.main-photo-container .swiper-button-prev,
.main-photo-container .swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.3s;
}

.main-photo-container .swiper-button-prev:hover,
.main-photo-container .swiper-button-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.main-photo-container .swiper-button-prev {
    left: 10px;
}

.main-photo-container .swiper-button-next {
    right: 10px;
}

.main-photo-container .swiper-button-prev:after,
.main-photo-container .swiper-button-next:after {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 20px;
}

.main-photo-container .swiper-button-prev:after {
    content: "\f104"; /* ícone de seta para esquerda */
}

.main-photo-container .swiper-button-next:after {
    content: "\f105"; /* ícone de seta para direita */
}

/* Estilo para o contador dentro do PhotoSwipe */
.pswp-counter {
    color: white;
    font-size: 13px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
}

/* Estilo para o indicador de zoom */
.fullimg-img {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s;
}

.fullimg-img:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Estilos para gestos de zoom no PhotoSwipe */
.pswp__zoom-wrap {
    transition: transform 0.25s ease-out;
}

/* Estilos para visibilidade dos botões de controle durante o zoom */
.pswp--zoomed-in .pswp__button--arrow--left,
.pswp--zoomed-in .pswp__button--arrow--right {
    opacity: 0.6;
}

.pswp--zoomed-in .pswp__button--arrow--left:hover,
.pswp--zoomed-in .pswp__button--arrow--right:hover {
    opacity: 1;
}

/* Estilos específicos para a página de detalhes */
.listing-detail-page .gallery-container {
    display: block !important;
}

/* Garantir que o Slick Carousel seja exibido corretamente */
.slick-initialized .slick-slide {
    display: block;
}

.slick-list {
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.slick-track {
    display: flex;
    align-items: center;
} 