/* 图片轮播插件前端样式 */

.image-slider-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}

.image-slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.image-slider-slide {
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.image-slider-slide img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.image-slider-slide:hover img {
    transform: scale(1.05);
}

/* 桌面端样式 - 显示两张图片 */
@media (min-width: 769px) {
    .image-slider-slide {
        width: 50%;
    }
    
    .image-slider-container {
        padding: 0 40px;
    }
}

/* 手机端样式 - 显示一张图片 */
@media (max-width: 768px) {
    .image-slider-slide {
        width: 100%;
    }
    
    .image-slider-container {
        padding: 0 20px;
    }
}

/* 导航箭头 */
.image-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
}

.image-slider-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.image-slider-prev {
    left: 10px;
}

.image-slider-next {
    right: 10px;
}

/* 手机端隐藏箭头 */
@media (max-width: 768px) {
    .image-slider-nav {
        display: none;
    }
}

/* 指示器 */
.image-slider-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.image-slider-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
}

.image-slider-indicator.active {
    background: #0073aa;
}

.image-slider-indicator:hover {
    background: #999;
}

/* 灯箱样式 */
.image-slider-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-slider-lightbox.show {
    display: flex;
    opacity: 1;
}

.image-slider-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-slider-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.image-slider-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.image-slider-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.image-slider-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.image-slider-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.image-slider-lightbox-prev {
    left: 20px;
}

.image-slider-lightbox-next {
    right: 20px;
}

/* 加载动画 */
.image-slider-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #666;
}

.image-slider-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 480px) {
    .image-slider-container {
        padding: 0 10px;
    }
    
    .image-slider-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .image-slider-lightbox-prev {
        left: 10px;
    }
    
    .image-slider-lightbox-next {
        right: 10px;
    }
    
    .image-slider-lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}
