/* 轮播区域外层容器，与页面其他卡片保持一致 */
.banner-carousel-section {
    background: transparent;
    padding: 0;
    margin: 0;
    width: 100%;
}

.banner-carousel-section .ast-container {
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 0 40px !important;
}

/* 轮播广告区域样式 - 大幅减少宽度 */
.banner-carousel-container {
    position: relative;
    width: 100% !important;
    max-width: 800px !important;
    margin: 20px auto !important;
    overflow: hidden;
    background: transparent;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: block;
    visibility: visible;
}

.banner-carousel {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 25%; /* 4:1 宽高比，避免图片拉伸 */
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

.banner-slide.active {
    opacity: 1;
    z-index: 2;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 保持图片比例，不拉伸 */
    object-position: center;
    display: block;
    background: #f8f9fa;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.banner-dot:hover,
.banner-dot.active {
    background: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.banner-arrow-left {
    left: 20px;
}

.banner-arrow-right {
    right: 20px;
}

@media (max-width: 768px) {
    .banner-carousel-section .ast-container {
        max-width: 90% !important;
        padding: 0 20px !important;
    }
    .banner-carousel-container {
        max-width: 100% !important;
    }
    .banner-carousel {
        padding-bottom: 35%; /* 移动端稍高一些 */
    }
    .banner-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .banner-arrow-left {
        left: 10px;
    }
    .banner-arrow-right {
        right: 10px;
    }
    .banner-dots {
        bottom: 15px;
        gap: 8px;
    }
    .banner-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .banner-carousel {
        padding-bottom: 40%; /* 小屏幕更高 */
    }
    .banner-arrow {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    .banner-dots {
        bottom: 10px;
        gap: 6px;
    }
    .banner-dot {
        width: 8px;
        height: 8px;
    }
}

/* 查看所有广告按钮样式 */
.banner-gallery-link {
    text-align: center;
    margin-top: 15px;
}

.view-all-btn {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none !important;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    color: white !important;
}

/* 单张图片时的样式优化 */
.banner-carousel-container:has(.banner-slide:only-child) .banner-arrow,
.banner-carousel-container:has(.banner-slide:only-child) .banner-dots {
    display: none;
}
