/* 产品图片展示插件样式 - 修复版本 */
.product-images-show {
    display: flex !important;
    gap: 20px !important;
    max-width: 100% !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
}

.product-images-show * {
    box-sizing: border-box !important;
}

/* 布局样式 */
.product-images-show.pis-layout-left {
    flex-direction: row !important;
}

.product-images-show.pis-layout-right {
    flex-direction: row-reverse !important;
}

.product-images-show.pis-layout-bottom {
    flex-direction: column !important;
}

/* 主图容器 */
.product-images-show .pis-main-container {
    flex: 4 !important;
    position: relative !important;
    min-width: 0 !important;
    background: #f9f9f9 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

/* 主图包装器 - 移除固定高度的!important，允许Elementor控制 */
.product-images-show .pis-main-image-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 400px; /* 默认高度，可被Elementor覆盖 */
    background: #fff !important;
    border-radius: 8px !important;
    cursor: zoom-in !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 主图片样式 */
.product-images-show .pis-main-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
}

.product-images-show .pis-main-image.active {
    opacity: 1 !important;
}

.product-images-show .pis-main-image img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* 主图悬停效果 */
.product-images-show .pis-main-image-wrapper:hover .pis-main-image.active img {
    transform: scale(1.05) !important;
    transition: transform 0.3s ease !important;
}

/* 滑动效果 */
.product-images-show[data-transition="slide"] .pis-main-image {
    transform: translateX(100%) !important;
    opacity: 1 !important;
    transition: transform 0.3s ease !important;
}

.product-images-show[data-transition="slide"] .pis-main-image.active {
    transform: translateX(0) !important;
}

/* 缩放效果 */
.product-images-show[data-transition="zoom"] .pis-main-image {
    transform: scale(0.8) !important;
    opacity: 0 !important;
    transition: transform 0.3s ease, opacity 0.3s ease !important;
}

.product-images-show[data-transition="zoom"] .pis-main-image.active {
    transform: scale(1) !important;
    opacity: 1 !important;
}

/* 缩略图容器 */
.product-images-show .pis-thumbnails-container {
    display: flex !important;
    align-items: center !important;
    gap: 10px; /* 默认间距，可被Elementor覆盖 */
    flex: 1 !important;
    min-width: 0 !important;
}

.product-images-show.pis-layout-left .pis-thumbnails-container,
.product-images-show.pis-layout-right .pis-thumbnails-container {
    flex-direction: column !important;
    max-width: 150px !important;
    width: 100% !important;
}

.product-images-show.pis-layout-bottom .pis-thumbnails-container {
    flex-direction: row !important;
    width: 100% !important;
    justify-content: center !important;
}

.product-images-show .pis-thumbnails-wrapper {
    overflow: hidden !important;
    flex: 1 !important;
}

.product-images-show .pis-thumbnails-track {
    display: flex !important;
    transition: transform 0.3s ease !important;
}

.product-images-show.pis-layout-left .pis-thumbnails-track,
.product-images-show.pis-layout-right .pis-thumbnails-track {
    flex-direction: column !important;
}

.product-images-show.pis-layout-bottom .pis-thumbnails-track {
    flex-direction: row !important;
}

/* 缩略图样式 - 移除固定尺寸的!important，允许Elementor控制 */
.product-images-show .pis-thumbnail {
    width: 80px; /* 默认尺寸，可被Elementor覆盖 */
    height: 80px; /* 默认尺寸，可被Elementor覆盖 */
    border: 2px solid transparent !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transition: border-color 0.2s ease, transform 0.2s ease !important;
    flex-shrink: 0 !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0; /* 重置margin，让Elementor控制间距 */
}

.product-images-show .pis-thumbnail:hover {
    border-color: #007cba !important;
    transform: scale(1.05) !important;
}

.product-images-show .pis-thumbnail.active {
    border-color: #007cba !important;
}

.product-images-show .pis-thumbnail img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: cover !important;
    display: block !important;
    border: none !important;
    box-shadow: none !important;
}

/* 导航按钮 */
.product-images-show .pis-nav {
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.product-images-show .pis-nav:hover {
    background: #f0f0f0 !important;
    border-color: #007cba !important;
}

.product-images-show .pis-nav:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

.product-images-show .pis-nav svg {
    width: 16px !important;
    height: 16px !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    fill: none !important;
}

/* Lightbox样式 */
.pis-lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.9) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    cursor: pointer !important;
}

.pis-lightbox.active {
    display: flex !important;
}

.pis-lightbox-content {
    position: relative !important;
    max-width: 90% !important;
    max-height: 90% !important;
    cursor: default !important;
}

.pis-lightbox-content img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    border: none !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
}

.pis-lightbox-close {
    position: absolute !important;
    top: -40px !important;
    right: 0 !important;
    background: none !important;
    border: none !important;
    color: #fff !important;
    font-size: 30px !important;
    cursor: pointer !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: background-color 0.2s ease !important;
}

.pis-lightbox-close:hover {
    background: rgba(255,255,255,0.2) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .product-images-show {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .product-images-show.pis-layout-left .pis-thumbnails-container,
    .product-images-show.pis-layout-right .pis-thumbnails-container {
        flex-direction: row !important;
        width: 100% !important;
        justify-content: center !important;
        max-width: none !important;
    }
    
    .product-images-show.pis-layout-left .pis-thumbnails-track,
    .product-images-show.pis-layout-right .pis-thumbnails-track {
        flex-direction: row !important;
    }
    
    .product-images-show .pis-thumbnail {
        width: 60px !important;
        height: 60px !important;
    }
    
    .product-images-show .pis-main-image-wrapper {
        height: 300px !important;
    }
}

@media (max-width: 480px) {
    .product-images-show .pis-thumbnail {
        width: 50px !important;
        height: 50px !important;
    }
    
    .product-images-show .pis-main-image-wrapper {
        height: 250px !important;
    }
}

/* 无产品/无图片状态 */
.product-images-show .pis-no-product,
.product-images-show .pis-no-images {
    text-align: center !important;
    padding: 40px 20px !important;
    color: #666 !important;
    font-style: italic !important;
}

/* 防止与其他插件/主题冲突 */
.product-images-show img {
    max-width: none !important;
}

.product-images-show .pis-main-image img {
    max-width: 100% !important;
}