/* 相关产品样式 */
.related_products_section {
    background: #f5f5f5;
    padding: 40px 0;
    margin-top: 50px;
}

.related_products_container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.related_products_header {
    margin-bottom: 30px;
}

.related_products_title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0 0 15px 0;
    padding: 0;
}

.related_products_line {
    border: none;
    border-top: 1px solid #ddd;
    margin: 0 0 20px 0;
}

/* 轮播容器 */
.related_products_carousel {
    position: relative;
    padding: 0 50px;
}

.carousel_wrapper {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.carousel_track {
    display: flex;
    gap: 20px;
    padding: 10px 0;
    /* 使用 transform 实现丝滑滑动，不使用 scroll */
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* 产品卡片 */
.carousel_item {
    flex: 0 0 auto;
    width: 180px;
    min-width: 180px;
}

.product_card {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product_image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product_card:hover .product_image img {
    transform: scale(1.05);
}

.product_name {
    padding: 12px;
    font-size: 14px;
    color: #333;
    text-align: center;
    line-height: 1.4;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

/* 导航按钮 */
.carousel_btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel_btn:hover {
    background: #f4bd81;
    border-color: #f4bd81;
    color: #fff;
}

.carousel_btn:hover svg {
    color: #fff;
}

.carousel_btn svg {
    color: #666;
    transition: color 0.3s ease;
}

.carousel_btn_prev {
    left: 0;
}

.carousel_btn_next {
    right: 0;
}

.no_products {
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .related_products_section {
        padding: 30px 0;
        margin-top: 30px;
    }

    .related_products_container {
        padding: 0 15px;
    }

    .related_products_title {
        font-size: 20px;
    }

    .related_products_carousel {
        padding: 0 40px;
    }

    .carousel_item {
        width: 120px;
        min-width: 120px;
    }

    .product_name {
        font-size: 13px;
        padding: 10px;
        min-height: 45px;
    }

    .carousel_btn {
        width: 35px;
        height: 35px;
    }

    .carousel_btn svg {
        width: 20px;
        height: 20px;
    }
}

/* 平板适配 */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .carousel_item {
        width: 140px;
        min-width: 140px;
    }
}

/* 大屏幕 */
@media screen and (min-width: 1400px) {
    .carousel_item {
        width: 200px;
        min-width: 200px;
    }

    .carousel_track {
        max-width: calc(100vw - 180px);
    }
}

