/* C02智能学生证产品轮播样式 */

#c02ProductCarousel {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    background: #fff;
    position: relative;
}

#c02ProductCarousel .carousel-inner {
    border-radius: 12px;
}

#c02ProductCarousel .carousel-item {
    transition: transform 0.6s ease-in-out;
}

#c02ProductCarousel .main-product-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    object-position: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
}

/* 轮播控制按钮样式 - 透明背景左右箭头 */
#c02ProductCarousel .carousel-control-prev,
#c02ProductCarousel .carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent !important; /* 透明背景 */
    opacity: 0.5 !important; /* 默认半透明 */
    transition: all 0.3s ease;
    z-index: 20 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0;
}

/* 轮播容器悬停时显示按钮 */
#c02ProductCarousel:hover .carousel-control-prev,
#c02ProductCarousel:hover .carousel-control-next {
    opacity: 1 !important;
}

#c02ProductCarousel .carousel-control-prev {
    left: 15px;
}

#c02ProductCarousel .carousel-control-next {
    right: 15px;
}

#c02ProductCarousel .carousel-control-prev:hover,
#c02ProductCarousel .carousel-control-next:hover {
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.1);
}

/* 自定义左右箭头样式 */
#c02ProductCarousel .carousel-control-prev::before,
#c02ProductCarousel .carousel-control-next::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    border-style: solid;
    border-width: 3px 3px 0 0;
    border-color: #fff;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.5));
}

#c02ProductCarousel .carousel-control-prev::before {
    transform: rotate(-135deg); /* 左箭头 */
}

#c02ProductCarousel .carousel-control-next::before {
    transform: rotate(45deg); /* 右箭头 */
}

/* 悬停时箭头颜色变化 */
#c02ProductCarousel .carousel-control-prev:hover::before,
#c02ProductCarousel .carousel-control-next:hover::before {
    border-color: #007bff;
    filter: drop-shadow(0 0 5px rgba(0, 123, 255, 0.6));
}

/* 隐藏Bootstrap默认图标，使用自定义箭头 */
#c02ProductCarousel .carousel-control-prev-icon,
#c02ProductCarousel .carousel-control-next-icon {
    display: none !important;
}

/* 轮播指示器样式 */
#c02ProductCarousel .carousel-indicators {
    bottom: 15px;
    margin-bottom: 0;
}

#c02ProductCarousel .carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    opacity: 0.7;
    transition: all 0.3s ease;
}

#c02ProductCarousel .carousel-indicators [data-bs-target].active {
    background: #007bff;
    border-color: #007bff;
    opacity: 1;
    transform: scale(1.2);
}

#c02ProductCarousel .carousel-indicators [data-bs-target]:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    #c02ProductCarousel .main-product-img {
        max-height: 300px;
    }
    
    #c02ProductCarousel .carousel-control-prev,
    #c02ProductCarousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    #c02ProductCarousel .carousel-control-prev {
        left: 10px;
    }
    
    #c02ProductCarousel .carousel-control-next {
        right: 10px;
    }
    
    #c02ProductCarousel .carousel-control-prev-icon,
    #c02ProductCarousel .carousel-control-next-icon {
        width: 16px;
        height: 16px;
        background-size: 16px 16px;
    }
    
    #c02ProductCarousel .carousel-indicators [data-bs-target] {
        width: 10px;
        height: 10px;
        margin: 0 3px;
    }
}

@media (max-width: 480px) {
    #c02ProductCarousel .main-product-img {
        max-height: 250px;
    }
    
    #c02ProductCarousel .carousel-control-prev,
    #c02ProductCarousel .carousel-control-next {
        width: 35px;
        height: 35px;
    }
    
    #c02ProductCarousel .carousel-indicators {
        bottom: 10px;
    }
    
    #c02ProductCarousel .carousel-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
        margin: 0 2px;
    }
}

/* 图片加载动画 */
#c02ProductCarousel .main-product-img {
    animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 轮播切换时的平滑效果 */
#c02ProductCarousel .carousel-item-next,
#c02ProductCarousel .carousel-item-prev {
    display: block;
}

#c02ProductCarousel .carousel-item-next:not(.carousel-item-start),
#c02ProductCarousel .active.carousel-item-end {
    transform: translateX(100%);
}

#c02ProductCarousel .carousel-item-prev:not(.carousel-item-end),
#c02ProductCarousel .active.carousel-item-start {
    transform: translateX(-100%);
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    #c02ProductCarousel .carousel-control-prev,
    #c02ProductCarousel .carousel-control-next {
        opacity: 0.9;
        background: rgba(255, 255, 255, 0.95);
    }
    
    #c02ProductCarousel .carousel-control-prev:active,
    #c02ProductCarousel .carousel-control-next:active {
        transform: translateY(-50%) scale(0.95);
    }
}

/* 高DPI屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #c02ProductCarousel .main-product-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}