/* 3D轮播图核心样式 */
.carousel-3d {
    width: 100%;
    height: 453px;
    margin: 0 auto;
    position: relative;
    perspective: 1500px; /* 3D透视距离，越大3D效果越弱 */
    overflow: hidden;
    /* 移动端触摸优化：消除点击延迟 */
    touch-action: manipulation;
    background-image: url("../imgs/img_3-2.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top center;
}

.carousel-3d .carousel-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 15px;
    left: 0;
    transform-style: preserve-3d; /* 保留3D变换 */
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    transition: transform var(--speed) ease; /* 动态绑定切换速度 */
}

.carousel-3d .carousel-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--baseWidth); /* 动态绑定基础宽度 */
    height: var(--baseHeight); /* 动态绑定基础高度 */
    border-radius: 8px;
    overflow: hidden;
    opacity: var(--opacity); /* 动态绑定透明度 */
    z-index: var(--zIndex); /* 动态绑定层级 */
    transition: all var(--speed) ease; /* 渐变动画 */
    -webkit-transition: transform 600ms ease, opacity 600ms ease;
    -moz-transition: transform 600ms ease, opacity 600ms ease;
    -webkit-transform-origin: center;
    -moz-transform-origin: center;
    transform-origin: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); /* 加阴影增强3D质感 */
    /* 移动端禁止图片拖拽 */
    user-select: none;
    -webkit-user-drag: none;
}
.carousel-item.active::after{
    position: absolute;
    top: 9px;
    left: 0;
    right: 0;
    content: '';
    z-index: 9999;
    width: 260px;
    height: 77px;
    background: url("../imgs/img_light.png") no-repeat center;
    background-size: cover;
}
.carousel-item.active::before{
    position: absolute;
    bottom: 3px;
    left: 0;
    right: 0;
    content: '';
    z-index: 9999;
    width: 260px;
    height: 77px;
    background: url("../imgs/img_light.png") no-repeat center;
    background-size: cover;
}
.carousel-3d .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持图片比例，不拉伸 */
    /* 移动端图片优化 */
    pointer-events: none;
}

/* 左右切换按钮：全端适配大小 */
.carousel-3d .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 100;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 移动端触摸优化 */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.carousel-3d .carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-3d .prev-btn {
    left: 20px;
}

.carousel-3d .next-btn {
    right: 20px;
}

/* 底部指示器：全端适配 */
.carousel-3d .carousel-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 100;
}

.carousel-3d .indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    /* 移动端触摸优化 */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.carousel-3d .indicator-dot.active {
    background: #fff;
    transform: scale(1.2); /* 激活点放大，更醒目 */
}

/* 响应式适配：平板/手机端精细化调整 */
/* 平板端（768-1024px） */
/*@media (max-width: 1024px) and (min-width: 768px) {*/
/*    .carousel-3d {*/
/*        width: 90%;*/
/*        height: 320px;*/
/*    }*/
/*    .carousel-3d .carousel-btn {*/
/*        width: 42px;*/
/*        height: 42px;*/
/*        font-size: 18px;*/
/*    }*/
/*}*/

/* 手机端（≤768px）核心适配 */
/*@media (max-width: 768px) {*/
/*    .carousel-3d {*/
/*        width: 95%;*/
/*        height: 220px; !* 进一步缩小高度，适配手机竖屏 *!*/
/*        perspective: 1200px; !* 减小透视，让移动端3D效果更协调 *!*/
/*    }*/
/*    .carousel-3d .carousel-btn {*/
/*        width: 32px;*/
/*        height: 32px;*/
/*        font-size: 14px;*/
/*    }*/
/*    .carousel-3d .prev-btn {*/
/*        left: 8px;*/
/*    }*/
/*    .carousel-3d .next-btn {*/
/*        right: 8px;*/
/*    }*/
/*    !* 手机端指示器缩小，更贴合屏幕 *!*/
/*    .carousel-3d .indicator-dot {*/
/*        width: 10px;*/
/*        height: 10px;*/
/*    }*/
/*    .carousel-3d .carousel-indicator {*/
/*        bottom: 12px;*/
/*        gap: 6px;*/
/*    }*/
/*}*/

/* 小屏手机（≤480px）极致适配 */
/*@media (max-width: 480px) {*/
/*    .carousel-3d {*/
/*        height: 180px;*/
/*    }*/
/*    .carousel-3d .carousel-btn {*/
/*        width: 28px;*/
/*        height: 28px;*/
/*        font-size: 12px;*/
/*    }*/
/*}*/
