/* ===== 轮播外层容器 ===== */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: visible;
    /* 按钮可以显示在外面 */
    padding: 20px 20px 40px 20px;
}

/* ===== 主容器 ===== */
.carousel-wrapper {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    opacity: 0;
    /* 初始透明，JS计算完成后显示 */
    transition: opacity 0.2s ease;
    /* 淡入效果 */
}

.carousel-wrapper.initialized {
    opacity: 1;
    /* 初始化完成后显示 */
}

/* ===== 滑动轨道 ===== */
.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
    width: 100%;
}

/* ===== 每个滑块 ===== */
.carousel-slide {
    box-sizing: border-box;
    flex-shrink: 0;
}

/* ===== 克隆滑块 ===== */
.carousel-clone {
    opacity: 1;
    pointer-events: none;
}

/* ===== 导航按钮 ===== */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #000;
    background: #fff;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-prev::before {
    content: '\2039';
    /* < 或 '\25C0' 或 '←' */
}

.carousel-next::before {
    content: '\203A';
    /* > 或 '\25B6' 或 '→' */
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: #000;
    color: #fff;
}

/* ===== 分页指示器容器 ===== */
.carousel-pagination {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
}

/* ===== 指示器点 ===== */
.carousel-dot {
    width: 10px;
    height: 10px;
    background: #ccc;
    border-radius: 50%;
    display: inline-block;
    margin: 0 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #000;
    width: 24px;
    border-radius: 5px;
}