.custom-slider-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.custom-slider-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    touch-action: pan-y pinch-zoom;
    width: 100%;
}

.custom-slider-item {
    flex: 0 0 calc(100% / 3);
    padding: 0 8px;
    width: 100%;
    box-sizing: border-box;
}

.custom-slider-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
}

.custom-slider-item .title {
    text-align: center;
    margin-top: 10px;
    font-size: clamp(14px, 2vw, 16px);
    color: #333;
    padding: 0 5px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-slider-button {
    position: absolute;
    top: calc(50% + 20px);
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 18px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-slider-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.custom-slider-prev {
    left: 30px;
}

.custom-slider-next {
    right: 30px;
}

/* 平板设备 */
@media screen and (max-width: 991px) {

    /* 调整为Bootstrap的md断点 */
    .custom-slider-item {
        flex: 0 0 calc(100% / 2);
    }

    .custom-slider-button {
        width: 35px;
        height: 35px;
        top: calc(50% + 17.5px);
        font-size: 16px;
    }
}

/* 移动设备 */
@media screen and (max-width: 767px) {

    /* 调整为Bootstrap的sm断点 */
    .custom-slider-container {
        margin: 0;
    }

    .custom-slider-item {
        flex: 0 0 100%;
        padding: 0 5px;
    }

    .custom-slider-button {
        width: 30px;
        height: 30px;
        top: calc(50% + 15px);
        font-size: 14px;
    }
}