/* 产品服务页面样式 */

.products-section {
    padding: var(--spacing-3xl) 0 calc(var(--spacing-3xl) + 20px) 0; /* 增加底部padding */
    background: rgba(255, 255, 255, 0.95);
}

.products-section:nth-child(even) {
    background: rgba(245, 245, 245, 0.95);
}

.products-section__title {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--secondary-color);
}

.products-section__subtitle {
    text-align: center;
    font-size: var(--font-size-lg);
    color: var(--text-color);
    margin-bottom: var(--spacing-2xl);
}

/* 产品轮播容器 */
.product-carousel {
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: none; /* 移除最大宽度限制 */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 80px; /* 减少padding，让按钮更靠近轮播区域 */
}

.product-carousel__viewport {
    overflow: hidden;
    width: 1230px; /* 调整为1230px，增加30px余量 */
    max-width: calc(100vw - 160px); /* 相应调整最大宽度 */
    margin: 0 auto;
    position: relative;
    background: transparent;
}

.product-carousel__wrapper {
    display: flex;
    transition: transform 0.3s ease;
    gap: 30px;
    will-change: transform;
    justify-content: flex-start;
    padding: 0 15px 20px 15px; /* 增加底部padding，防止卡片底部被遮挡 */
    align-items: stretch; /* 确保所有卡片高度一致 */
}

.product-carousel__slide {
    flex: 0 0 auto;
    width: 380px; /* 卡片宽度 */
    min-width: 380px;
}

/* 轮播控制按钮 */
.product-carousel__control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(30, 136, 229, 0.9);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-carousel__control:hover {
    background: rgba(30, 136, 229, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.product-carousel__control--prev {
    left: calc(50% - 700px); /* 进一步增加距离 */
}

.product-carousel__control--next {
    right: calc(50% - 700px); /* 进一步增加距离 */
}

/* 产品网格 - 保留作为备用 */
.product-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--spacing-lg);
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0 var(--spacing-md);
}

.product-grid::-webkit-scrollbar {
    height: 8px;
}

.product-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.product-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* 产品卡片 */
.product-card {
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-base);
    flex: 0 0 auto;
    width: 380px; /* PC端调整宽度 */
    min-width: 380px;
    margin: 0; /* 确保没有额外边距 */
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--light-background);
}

.product-card__content {
    padding: var(--spacing-md);
}

.product-card__name {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
}

.product-card__description {
    color: var(--text-color);
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-loose);
}

.product-card__features,
.product-card__applications {
    margin-bottom: var(--spacing-md);
}

.product-card__subtitle {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.product-card__list {
    list-style: none;
    padding-left: 0;
}

.product-card__list-item {
    padding: var(--spacing-xs) 0;
    color: var(--text-color);
    position: relative;
    padding-left: var(--spacing-md);
}

.product-card__list-item::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

@media (max-width: 1600px) {
    .product-carousel {
        padding: 0 70px;
    }
    
    .product-carousel__viewport {
        width: 1230px;
    }
}

@media (max-width: 1400px) {
    .product-carousel {
        padding: 0 60px;
    }
    
    .product-carousel__viewport {
        width: 1210px;
    }
}

@media (max-width: 1200px) {
    .product-carousel {
        padding: 0 50px;
    }
    
    .product-carousel__viewport {
        width: 1180px;
    }
}

@media (max-width: 767px) {
    .product-carousel {
        max-width: 100%;
        display: block; /* 移动端改为block布局 */
    }
    
    .product-carousel__viewport {
        width: 100%;
        max-width: none;
        overflow: visible; /* 移动端允许垂直滚动 */
    }
    
    .product-carousel__wrapper {
        flex-direction: column; /* 垂直排列 */
        gap: var(--spacing-lg);
        transform: none !important; /* 移动端禁用transform */
        justify-content: center;
        padding: 0;
    }
    
    .product-carousel__slide,
    .product-card {
        width: 100%; /* 移动端占满宽度 */
        min-width: auto;
        max-width: 500px; /* 限制最大宽度 */
        margin: 0 auto; /* 居中显示 */
    }
    
    /* 移动端隐藏轮播按钮 */
    .product-carousel__control {
        display: none !important;
    }
}
