/* 图片组 Gallery 样式 */

.product-image-gallery {
    margin: 60px 0;
    padding: 0;
}

/* 大屏幕网格布局 */
.image-gallery-widget {
    width: 100%;
}

.image-gallery-widget .container-fluid {
    padding: 0;
}

.image-gallery-widget .row {
    margin: 0;
}

.image-gallery-widget [class*="col-"] {
    padding: 5px;
}

.gallery-image {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 宽高比 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 4px;
    overflow: hidden;
}

.gallery-image:hover {
    transform: scale(1.02);
}

.gallery-icon-wrapper {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image:hover + .gallery-icon-wrapper,
[class*="col-"]:hover .gallery-icon-wrapper {
    opacity: 1;
}

.gallery-icon-wrapper i {
    font-size: 18px;
    color: #333;
}

/* 小屏幕轮播图 */
.gallery-image-mobile {
    width: 100%;
    padding-top: 66.67%; /* 3:2 宽高比 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
}

#galleryCarouselMobile {
    margin: 20px 0;
}

#galleryCarouselMobile .carousel-control {
    background: none;
    width: 50px;
    opacity: 0.8;
}

#galleryCarouselMobile .carousel-control:hover {
    opacity: 1;
}

#galleryCarouselMobile .carousel-control i {
    font-size: 40px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#galleryCarouselMobile .carousel-indicators {
    bottom: 10px;
}

#galleryCarouselMobile .carousel-indicators li {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid #fff;
}

#galleryCarouselMobile .carousel-indicators .active {
    background-color: #fff;
}

/* 模态框样式 */
#galleryModal .modal-dialog {
    width: 90%;
    max-width: 1200px;
    margin: 30px auto;
}

#galleryModal .modal-content {
    background: #000;
    border: none;
    border-radius: 0;
}

#galleryModal .modal-header {
    border: none;
    padding: 15px;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1051;
}

#galleryModal .modal-header .close {
    color: #fff;
    opacity: 0.8;
    font-size: 36px;
    font-weight: 300;
    text-shadow: none;
}

#galleryModal .modal-header .close:hover {
    opacity: 1;
}

#galleryModal .modal-header .close i {
    font-size: 30px;
}

#galleryModal .modal-body {
    padding: 0;
}

#galleryCarouselModal {
    background: #000;
}

#galleryCarouselModal .item {
    text-align: center;
}

#galleryCarouselModal .item img {
    max-height: 80vh;
    width: auto;
    margin: 0 auto;
}

#galleryCarouselModal .carousel-control {
    background: none;
    width: 80px;
    opacity: 0.6;
}

#galleryCarouselModal .carousel-control:hover {
    opacity: 1;
}

#galleryCarouselModal .carousel-control i {
    font-size: 60px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

#galleryCarouselModal .carousel-indicators {
    bottom: 20px;
}

#galleryCarouselModal .carousel-indicators li {
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid #fff;
    width: 12px;
    height: 12px;
    margin: 0 5px;
}

#galleryCarouselModal .carousel-indicators .active {
    background-color: #fff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .product-image-gallery {
        margin: 40px 0;
    }

    #galleryModal .modal-dialog {
        width: 95%;
        margin: 10px auto;
    }

    #galleryCarouselModal .item img {
        max-height: 70vh;
    }

    #galleryCarouselModal .carousel-control {
        width: 50px;
    }

    #galleryCarouselModal .carousel-control i {
        font-size: 40px;
    }
}

@media (max-width: 480px) {
    .image-gallery-widget [class*="col-"] {
        padding: 3px;
    }

    .gallery-icon-wrapper {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }

    .gallery-icon-wrapper i {
        font-size: 16px;
    }
}
