/* 产品相册整体容器样式 */
.product-gallery-container {
    background-color: #f8f8f8;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin: 20px auto;
    max-width: 1200px;
}

/* 主轮播图容器 */
.product-gallery-main {
    margin: 0 auto;
    max-width: 800px; /* 控制最大宽度 */
    border-radius: 5px;
    overflow: hidden;
    background-color: #ffffff;
    padding: 15px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    position: relative; /* 确保箭头定位正确 */
}

/* 修复主轮播箭头样式 */
.product-gallery-main .swiper-button-next,
.product-gallery-main .swiper-button-prev {
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.product-gallery-main .swiper-button-next {
    right: 10px;
}

.product-gallery-main .swiper-button-prev {
    left: 10px;
}

.product-gallery-main .swiper-button-next:after,
.product-gallery-main .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

/* 轮播图内的图片容器 */
.zoom-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    position: relative;
}

/* 主图片样式 */
.main-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* 图片标题容器 - 修复显示问题 */
.image-title-container {
    background-color: #ffffff;
    padding: 10px 15px;
    margin: 10px auto 20px;  /* 增加上下边距 */
    max-width: 800px;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: block !important;  /* 强制显示 */
    position: relative;  /* 确保定位正确 */
    z-index: 5;  /* 确保可见 */
}

/* 确保swiper-slide中的标题显示 */
.swiper-slide .image-title-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto 10px;
}

/* 将标题容器移出轮播结构 */
.product-gallery-container > .image-title-container {
    margin-top: -10px;
    margin-bottom: 20px;
}

/* 图片标题样式 */
.image-title h5 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.image-title p {
    margin: 5px 0 0;
    font-size: 14px;
    color: #666;
}

/* 缩略图容器 */
.product-gallery-thumbs {
    margin: 10px auto 20px;  /* 减少与标题的间距 */
    max-width: 800px;
    background-color: #ffffff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    position: relative; /* 确保箭头定位正确 */
}

/* 修复缩略图箭头样式 */
.product-gallery-thumbs .swiper-button-next,
.product-gallery-thumbs .swiper-button-prev {
    background-color: rgba(66, 133, 244, 0.7);
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.product-gallery-thumbs .swiper-button-next {
    right: 5px;
}

.product-gallery-thumbs .swiper-button-prev {
    left: 5px;
}

.product-gallery-thumbs .swiper-button-next:after,
.product-gallery-thumbs .swiper-button-prev:after {
    font-size: 14px;
    font-weight: bold;
}

/* 缩略图滑块样式 */
.product-gallery-thumbs .swiper-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 缩略图样式 */
.product-gallery-thumbs .swiper-slide {
    opacity: 0.6;
    transition: opacity 0.3s;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    width: auto;
    text-align: center;
}

.product-gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid #4285f4;
}

/* 缩略图容器 - 修复居中问题 */
.thumb-container {
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

/* 缩略图图片 - 修复居中问题 */
.thumb-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    margin: 0 auto;
}

/* 左侧缩略图 */
.left-thumbs {
    height: 400px;
    background-color: #f0f0f0;
    padding: 0 10px;
}

.left-thumbs .swiper-slide {
    margin: 5px 0;
}

/* 右侧缩略图 */
.right-thumbs {
    height: 400px;
    background-color: #f0f0f0;
    padding: 0 10px;
}

.right-thumbs .swiper-slide {
    margin: 5px 0;
}

/* 顶部和底部缩略图 */
.top-thumbs,
.bottom-thumbs {
    padding: 15px 40px; /* 增加左右边距给箭头留空间 */
    background-color: #f0f0f0;
}

.top-thumbs .swiper-slide,
.bottom-thumbs .swiper-slide {
    margin: 0 5px;
    height: 80px; /* 固定高度确保一致性 */
}

/* 分页指示器样式 */
.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: #4285f4;
    opacity: 1;
}

/* 视频相关样式 */
.video-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    background-color: #000;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 2;
}

.play-button:before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #ffffff;
    margin-left: 5px;
}

.video-icon {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-icon:before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent #ffffff;
    margin-left: 2px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .product-gallery-container {
        padding: 15px;
    }
    
    .image-title-container {
        padding: 8px;
    }
    
    .image-title h5 {
        font-size: 14px;
    }
    
    .product-gallery-main .swiper-button-next,
    .product-gallery-main .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    
    .product-gallery-main .swiper-button-next:after,
    .product-gallery-main .swiper-button-prev:after {
        font-size: 14px;
    }
    
    .product-gallery-thumbs .swiper-button-next,
    .product-gallery-thumbs .swiper-button-prev {
        width: 24px;
        height: 24px;
    }
    
    .product-gallery-thumbs .swiper-button-next:after,
    .product-gallery-thumbs .swiper-button-prev:after {
        font-size: 12px;
    }
    
    .top-thumbs,
    .bottom-thumbs {
        padding: 10px 30px;
    }
    
    .top-thumbs .swiper-slide,
    .bottom-thumbs .swiper-slide {
        height: 60px;
    }
}

/* 灯箱效果增强 */
.mfp-bg {
    background: #000;
    opacity: 0.9;
}

.mfp-figure:after {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
    background: #444;
}

.mfp-title {
    color: #f3f3f3;
    font-size: 14px;
    line-height: 18px;
    padding-right: 36px;
    text-align: center;
}