.carousel-container {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    padding: 8px 0;
}

.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex: 0 0 33.333%;
    padding: 8px 5px;
    display: flex;
    flex-direction: column;
}

.carousel-slide a {
    display: block;
    width: 100%;
    text-decoration: none;
    flex: 1;
}

.image-container {
    width: 100%;
    height: 0;
    padding-bottom: 42.83%; /* 21:9 宽高比，可根据需要调整 */
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* 保持图片完整比例 */
    background-color: #f8f9fa; /* 图片加载前的背景色 */
    transition: transform 0.3s ease;
}

.carousel-slide:hover .carousel-image {
    transform: scale(1.03);
}

.carousel-nav {
    display: flex;
    justify-content: center;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    margin: 0 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-dot.active {
    background-color: #CD1818;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .carousel-slide {
        flex: 0 0 100%;
    }

    .image-container {
        padding-bottom: 42.8%; /* 移动端使用2:1比例 */
    }
}

@media (max-width: 480px) {
    .image-container {
        padding-bottom: 42.8%; /* 小屏幕使用更方的比例 */
    }
}