/* Listing Gallery Styles - Photo Gallery with Swipe/Mouse Navigation */

/* Gallery Container */
.listing-gallery-container,
.listing-gallery-container-list {
    position: relative;
    overflow: hidden;
}

.listing-gallery-container {
    width: 100%;
}

/* Swiper Container */
.listing-gallery,
.listing-gallery-list {
    width: 100%;
    height: 100%;
}

.listing-gallery .swiper-slide,
.listing-gallery-list .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.listing-gallery-container .item__photo{
    width: 100%;
    height: 100%;
}

.listing-gallery .swiper-slide img,
.listing-gallery-list .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Navigation Arrows */
.listing-gallery-next,
.listing-gallery-prev,
.listing-gallery-next-list,
.listing-gallery-prev-list {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
}

.listing-gallery-container:hover .listing-gallery-next,
.listing-gallery-container:hover .listing-gallery-prev,
.listing-gallery-container-list:hover .listing-gallery-next-list,
.listing-gallery-container-list:hover .listing-gallery-prev-list {
    opacity: 1;
}

.listing-gallery-next,
.listing-gallery-next-list {
    right: 10px;
}

.listing-gallery-prev,
.listing-gallery-prev-list {
    left: 10px;
}

.listing-gallery-next:hover,
.listing-gallery-prev:hover,
.listing-gallery-next-list:hover,
.listing-gallery-prev-list:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Arrow Icons */
.listing-gallery-next::after,
.listing-gallery-prev::after,
.listing-gallery-next-list::after,
.listing-gallery-prev-list::after {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.listing-gallery-next::after,
.listing-gallery-next-list::after {
    content: '›';
}

.listing-gallery-prev::after,
.listing-gallery-prev-list::after {
    content: '‹';
}

/* Pagination Dots */
.listing-gallery-pagination,
.listing-gallery-pagination-list {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.listing-gallery-container:hover .listing-gallery-pagination,
.listing-gallery-container-list:hover .listing-gallery-pagination-list {
    opacity: 1;
}

.listing-gallery-pagination .swiper-pagination-bullet,
.listing-gallery-pagination-list .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.listing-gallery-pagination .swiper-pagination-bullet-active,
.listing-gallery-pagination-list .swiper-pagination-bullet-active {
    background: #fff;
    width: 10px;
    height: 10px;
}

/* Purchased Date Label */
.listing-gallery-container .purchased {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 3px;
    z-index: 11;
}

/* Video Play Icon */
.listing-gallery .play-icon,
.listing-gallery-list .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
}

/* Disable navigation when only one image */
.listing-gallery.single-image .listing-gallery-next,
.listing-gallery.single-image .listing-gallery-prev,
.listing-gallery.single-image .listing-gallery-pagination,
.listing-gallery-list.single-image .listing-gallery-next-list,
.listing-gallery-list.single-image .listing-gallery-prev-list,
.listing-gallery-list.single-image .listing-gallery-pagination-list {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .listing-gallery-next,
    .listing-gallery-prev,
    .listing-gallery-next-list,
    .listing-gallery-prev-list {
        width: 25px;
        height: 25px;
        opacity: 0.7;
    }
    
    .listing-gallery-next::after,
    .listing-gallery-prev::after,
    .listing-gallery-next-list::after,
    .listing-gallery-prev-list::after {
        font-size: 14px;
    }
    
    .listing-gallery-pagination,
    .listing-gallery-pagination-list {
        opacity: 1;
    }
}

/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
    .listing-gallery-next,
    .listing-gallery-prev,
    .listing-gallery-next-list,
    .listing-gallery-prev-list {
        opacity: 0.5;
    }
    
    .listing-gallery-pagination,
    .listing-gallery-pagination-list {
        opacity: 1;
    }
}
