/* --- 产品中心专属样式 --- */
/* ===== 1. Banner 背景图 + 深色蒙版 ===== */
.page-banner {
    position: relative;
    margin-top: 80px;
    padding: 120px 0;
    text-align: center;
    color: white;
    background-image: url('img/kejibeijing.jpg'); /* 可替换为实际图片路径 */
    background-size: cover;
    background-position: 0 40%;
    /*background-attachment: fixed;*/ /* 视差效果，可选 */
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* 深色蒙版，透明度可调 */
    z-index: 1;
}

.page-banner .container {
    position: relative;
    z-index: 2;
}

.page-banner h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.page-banner p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
}

.product-nav {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 80px;
    z-index: 99;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.product-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 16px 0;
    margin: 0;
}

.product-categories li {
    display: inline-block;
    padding: 8px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    border-radius: 40px;
    transition: background 0.2s, color 0.2s;
    background-color: #f3f4f6;
}

.product-categories li:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.product-categories li.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 20px;
}

/* 产品卡片 — 无悬停浮动 */
.product-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eef2f6;
    transition: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.product-img-placeholder {
    background: linear-gradient(145deg, #f5f7fa, #e9edf2);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #9ca3af;
    border-bottom: 1px solid #eef2f6;
	overflow: hidden;
}

/* 图片本身：填充容器，保持比例，不拉伸变形 */
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* 保证图片填满容器，裁剪多余部分，不变形 */
    display: block;
}
.product-info {
    padding: 20px 20px 24px;
}

.product-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

/* 产品描述：两端对齐，限制行数 */
.product-desc {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: justify;
    display: -webkit-box;
    -webkit-line-clamp: 2;        /* 中文两行 */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;              /* 确保两行高度稳定 */
}

/* 英文环境可显示三行（通过语言切换时自动适应） */
html[lang="en"] .product-desc {
    -webkit-line-clamp: 3;
    line-clamp: 3;
    min-height: 63px;
}

.product-detail-btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: #f3f4f6;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 30px;
    transition: background 0.2s, color 0.2s;
    border: 1px solid #e5e7eb;
}

.product-detail-btn:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 响应式 */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    .product-categories {
        gap: 8px;
    }
    .product-categories li {
        padding: 6px 16px;
        font-size: 0.85rem;
    }
    .product-nav {
        top: 70px;
    }
    .product-img-placeholder {
        height: 160px;
        font-size: 1.6rem;
    }
    .product-desc {
        min-height: 42px;
    }
    html[lang="en"] .product-desc {
        min-height: 63px;
    }
}

.section.products-section {
    padding-top: 40px;
    padding-bottom: 80px;
}