/**
 * 百家灯箱样式
 */

/* 禁止body滚动 */
body.baijia-lightbox-open {
    overflow: hidden;
}

/* 灯箱容器 */
.baijia-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.baijia-lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* 遮罩层 */
.baijia-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

/* 内容区域 */
.baijia-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90%;
    max-height: 800px;
    z-index: 1;
}

/* 关闭按钮 */
.baijia-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    z-index: 10;
}

.baijia-lightbox-close:hover {
    transform: rotate(90deg);
}

/* 灯箱轮播 */
.baijia-lightbox-swiper {
    width: 100%;
    height: 100%;
}

.baijia-lightbox-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.baijia-lightbox-swiper .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 灯箱导航按钮 */
.baijia-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.baijia-lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.baijia-lightbox-prev {
    left: -70px;
}

.baijia-lightbox-next {
    right: -70px;
}

/* 计数器 */
.baijia-lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 2px;
}

/* 响应式 */
@media (max-width: 1400px) {
    .baijia-lightbox-prev {
        left: 20px;
    }
    
    .baijia-lightbox-next {
        right: 20px;
    }
}

@media (max-width: 768px) {
    .baijia-lightbox-content {
        width: 95%;
        height: 80%;
    }
    
    .baijia-lightbox-close {
        top: -45px;
        right: 0;
    }
    
    .baijia-lightbox-nav {
        width: 40px;
        height: 40px;
    }
    
    .baijia-lightbox-prev {
        left: 10px;
    }
    
    .baijia-lightbox-next {
        right: 10px;
    }
    
    .baijia-lightbox-counter {
        bottom: -35px;
    }
}
