/**
 * Banner Manager — 前端样式（纯图片轮播，Bootstrap 风格）
 */

/* ===== Carousel ===== */
.bam-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f7fa;
}

.bam-carousel-inner {
    position: relative;
    width: 100%;
    height: 400px; /* 桌面端固定高度 */
}

/* ===== Slide ===== */
.bam-carousel-item {
    display: none;
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.bam-carousel-item.active {
    display: block;
    opacity: 1;
    z-index: 1;
}

/* ===== Images ===== */
.bam-carousel-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.bam-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 移动端图片默认隐藏 */
.bam-img-mobile { display: none !important; }
.bam-img-desktop { display: block !important; }

/* ===== Arrows ===== */
.bam-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.30);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    opacity: 0.75;
    padding: 0;
}

.bam-carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.55);
    opacity: 1;
}

.bam-carousel-prev {
    left: 16px;
}

.bam-carousel-next {
    right: 16px;
}

.bam-carousel-arrow svg {
    display: block;
}

/* ===== Dots ===== */
.bam-carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.bam-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.bam-carousel-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.bam-carousel-dot.active {
    background: #fff;
    width: 28px;
    border-radius: 5px;
}

/* ===== 默认占位（无 Banner 时） ===== */
.bam-carousel-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, #0a2766, #005fcd);
}

/* ===== 响应式：移动端（≤768px）===== */
@media (max-width: 768px) {
    .bam-carousel-inner {
        height: auto;
    }

    .bam-carousel-item {
        position: relative;
        height: auto;
    }

    .bam-carousel-item a {
        height: auto;
    }

    .bam-carousel-item img {
        height: auto;
        object-fit: contain;
    }

    /* 切换图片 */
    .bam-img-desktop { display: none !important; }
    .bam-img-mobile { display: block !important; }

    /* 箭头移动端缩小 */
    .bam-carousel-arrow {
        width: 36px;
        height: 36px;
    }
    .bam-carousel-prev { left: 8px; }
    .bam-carousel-next { right: 8px; }
    .bam-carousel-arrow svg {
        width: 20px;
        height: 20px;
    }

    /* Dots 移动端 */
    .bam-carousel-dots {
        bottom: 10px;
        gap: 6px;
    }
    .bam-carousel-dot {
        width: 8px;
        height: 8px;
    }
    .bam-carousel-dot.active {
        width: 22px;
    }

    .bam-carousel-placeholder {
        height: 200px;
    }
}

/* ===== 响应式：小屏手机（≤480px）===== */
@media (max-width: 480px) {
    .bam-carousel-placeholder {
        height: 160px;
    }
}
