/* 产品展示滑块容器 */
.product-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    margin: 20px auto;
    padding: 15px 0;
    box-sizing: border-box;
}

/* 产品滑动轨道 - 统一使用4列布局基础 */
.product-slider {
    display: flex;
    will-change: transform;
    touch-action: pan-x;
    gap: 8px; /* 非常紧凑的间距，适合多列布局 */
    padding: 0 6px;
}

/* 产品项基础样式 - 默认4列布局 */
.product-item {
    flex: 0 0 auto;
    width: calc(25% - 6px); /* 4个产品平分宽度，减去间距影响 */
    box-sizing: border-box;
}

/* 产品图片样式 - 确保完整显示 */
.product-item img {
    width: 100%;
    object-fit: contain; /* 改为contain确保完整显示，不裁剪 */
    background-color: #f9f9f9; /* 添加背景色，确保图片周围有统一效果 */
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    padding: 4px; /* 内边距确保图片不贴边 */
}

/* 图片尺寸响应式调整 - 保持4列布局 */
/* 大屏PC */
@media (min-width: 1200px) {
    .product-item img {
        height: 220px;
    }
}

/* 标准PC */
@media (min-width: 992px) and (max-width: 1199px) {
    .product-item img {
        height: 190px;
    }
}

/* 小屏PC/平板横屏 */
@media (min-width: 768px) and (max-width: 991px) {
    .product-item img {
        height: 160px;
    }
}

/* 平板竖屏 */
@media (min-width: 576px) and (max-width: 767px) {
    .product-item img {
        height: 120px;
    }
}

/* 移动端 - 保持4列布局（重点调整） */
@media (max-width: 575px) {
    .product-slider {
        gap: 6px; /* 进一步减小间距 */
        padding: 0 4px;
    }
    
    .product-item {
        width: calc(25% - 4.5px); /* 精确计算宽度 */
    }
    
    .product-item img {
        height: 80px; /* 显著缩小高度以适应4列 */
        padding: 3px;
    }
    
    /* 极小屏幕优化 */
    @media (max-width: 360px) {
        .product-item img {
            height: 70px; /* 极小屏幕再缩小 */
        }
    }
}

/* 翻页按钮 - 适配小尺寸 */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 10;
    font-size: 14px;
    transition: all 0.2s ease;
}

.slider-prev {
    left: 4px;
}

.slider-next {
    right: 4px;
}

/* 移动端按钮进一步调整 */
@media (max-width: 575px) {
    .slider-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

.slider-btn:hover {
    background-color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

/* 指示器 - 适配小尺寸 */
.slider-indicators {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    gap: 5px;
}

.slider-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-indicator.active {
    background-color: #FFEE64;
    transform: scale(1.2);
    box-shadow: 0 0 0 1.5px rgba(255, 238, 100, 0.3);
}

/* 放大查看弹窗 - 确保移动端查看体验 */
.product-zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 10px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-zoom-modal.active {
    opacity: 1;
}

.product-zoom-content {
    position: relative;
    max-width: 100%;
    max-height: 100%;
}

.product-zoom-image {
    max-width: 95%;
    max-height: 85vh;
    cursor: zoom-in;
    touch-action: manipulation;
    transition: transform 0.2s ease;
}

/* 移动端放大查看优化 */
@media (max-width: 575px) {
    .product-zoom-image {
        max-width: 98%;
        max-height: 80vh;
    }
}

.zoom-close {
    position: absolute;
    top: -30px;
    right: 0;
    color: white;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.zoom-close:hover {
    transform: rotate(90deg);
}

.zoom-controls {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.zoom-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}
