/* =============================================
   方案 B 样式修复补丁
   修复产品区排版和新闻中心显示问题
   ============================================= */

/* 产品筛选样式修复 - 确保在 products-grid 上方正确显示 */
.product-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.product-filter .filter-btn {
    padding: 12px 24px;
    border: 1px solid rgba(0,0,0,0.1);
    background: white;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    color: var(--wbn-black);
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-filter .filter-btn:hover {
    background: var(--wbn-gray);
    transform: translateY(-2px);
}

.product-filter .filter-btn.active {
    background: var(--wbn-blue);
    color: white;
    border-color: var(--wbn-blue);
    box-shadow: 0 4px 15px rgba(0,113,227,0.3);
}

/* 产品卡片筛选 */
.product-card.filtered {
    display: none;
}

.product-card.visible {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 新闻中心样式修复 */
.news-section {
    padding: 80px 0;
    background: var(--wbn-white);
}

.news-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.news-section .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.news-section .section-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: var(--wbn-black);
    margin-bottom: 15px;
}

.news-section .section-header p {
    font-size: 17px;
    color: var(--wbn-dark-gray);
}

.news-swiper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px 60px;
    position: relative;
}

.news-swiper .swiper-container {
    width: 100%;
    padding-bottom: 50px !important;
}

.news-card {
    background: var(--wbn-gray);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}

.news-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #e0e0e0;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.08);
}

.news-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-content h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--wbn-black);
    margin-bottom: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-content p {
    font-size: 14px;
    color: var(--wbn-dark-gray);
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: auto;
}

/* 新闻中心导航按钮 */
.news-swiper .swiper-button-next,
.news-swiper .swiper-button-prev {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    color: var(--wbn-black);
}

.news-swiper .swiper-button-next:hover,
.news-swiper .swiper-button-prev:hover {
    background: var(--wbn-blue);
    box-shadow: 0 6px 20px rgba(0,113,227,0.3);
}

.news-swiper .swiper-button-next:hover::after,
.news-swiper .swiper-button-prev:hover::after {
    color: white;
}

.news-swiper .swiper-button-next::after,
.news-swiper .swiper-button-prev::after {
    font-size: 18px;
    font-weight: 700;
}

/* 响应式 */
@media (max-width: 1200px) {
    .news-swiper .swiper-container {
        padding: 0 40px 50px !important;
    }
}

@media (max-width: 768px) {
    .news-section {
        padding: 60px 0;
    }
    
    .news-section .section-header h2 {
        font-size: 28px;
    }
    
    .news-swiper {
        padding: 0 20px;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-content h3 {
        font-size: 16px;
    }
    
    .product-filter {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .product-filter .filter-btn {
        flex: 0 0 auto;
    }
}
