/* ============================================================
08. Products Page Styles 
============================================================ */

/* --- 产品页头部背景 --- */
.products-header {
    padding: 40px 0;
    background-color: var(--white);
}

/* ========================================= 2. Hero setting ========================================= */
/* Hero Banner 区域样式 - 优化版 */
.products-hero {
    position: relative; /* 必须保留，作为定位基准 */
    width: 100%;
    min-height: 300px; /* 稍微增加高度，让Banner更大气 */
    display: flex;
    align-items: center; /* 垂直居中 */
    
    /* 背景设置 */
    background-image: url('../images/products/products_hero.webp'); 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    
    padding: 0 5%; /* 左右内边距 */
    margin-bottom: 40px;
    overflow: hidden; /* 防止溢出 */
}

/* 【关键】添加遮罩层：让背景变暗，突出文字 */
.products-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* 使用线性渐变，左边黑一点，右边透一点，增加层次感 */
    background: linear-gradient(90deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 1; /* 确保遮罩在图片上方，文字下方 */
}

/* 确保内容容器在遮罩层上方 */
.products-hero-content-wrapper { 
    position: relative;
    z-index: 2; 
    width: 100%;
    max-width: 1200px; /* 限制最大宽度，保持在大屏上不乱跑 */
    margin: 0 auto; /* 居中 */
}

/* hero 主标题样式优化 */
.products_hero-text h2 {
    color: #ffffff !important;      /* 强制纯白 */
    font-size: 48px;                /* 大字号，参考图目测约 48-56px */
    font-weight: 700;               /* 粗体 */
	text-align: center;  
    line-height: 1.2;               /* 紧凑的行高 */
    margin-bottom: 20px;            /* 标题与正文的间距 */
    /*text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* 关键：添加黑色投影，防止文字融入背景 */
	    /* 使用双层阴影：第一层锐利，第二层柔和扩散，让文字更有厚度 */
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5), 
        0 4px 12px rgba(0, 0, 0, 0.6);
    /* ------------------ */
	
    letter-spacing: 1px;            /* 微调字间距，增加高级感 */
}

/* hero 副标题标题样式优化 */

.products_hero-subtitle {
    color: #ffffff !important;      /* 1. 纯白色 */
    font-size: 28px;                /* 2. 字体加大 (原HTML中是默认大小，现在设为28px) */
    font-weight: 600;               /* 3. 半粗体，比默认的400更有力，但比700的主标题稍弱 */
    text-align: center;             /* 4. 居中对齐 (关键：因为父容器是Flex布局，这里居中是为了保险) */
    margin: 0;                      /* 5. 去除默认的上下间距 */
    padding: 0 20px;                /* 6. 左右内边距，防止在手机上文字顶到边缘 */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* 7. 继承主标题的阴影效果，保持风格统一 */
}

/* 装饰红线位置调整 */
.products-hero-text .divider {
    background-color: #a4161a; /* 你的品牌红 */
    width: 60px;
    height: 4px;
    margin-bottom: 25px;
}

/* 正文样式优化 */
.products-hero-text p {
    color: #e0e0e0 !important; /* 浅灰白色，比纯白柔和 */
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px; /* 限制段落宽度，阅读体验更好 */
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* --- 产品分类筛选 --- */
.category-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.category-filters a {
    font-size: 0.9rem;
    padding: 8px 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.category-filters a:hover,
.category-filters a.active {
    background-color: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
}

/* --- 产品网格列表 --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-img {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
}

.product-info h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--dark-grey);
}

.product-info p {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.45;
}

.card-spec {
    list-style: disc;
    color: #000;
    font-size: 0.8rem;
    color: #666;
    margin: 0 0 12px 0;
    padding-left: 18px;
    line-height: 1.45;
}
.card-spec li { margin-bottom: 3px; }

.view-more {
    color: var(--primary-red);
    font-weight: bold;
    font-size: 0.8rem;
}

/* --- 响应式调整 --- */
@media (max-width: 1200px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .products-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .product-img {
        height: 180px;
    }
    
    /* 移动端 Hero 图片和文字堆叠 */
    .products-hero {
        flex-direction: column;
        text-align: center;
    }
    
    .products-hero .hero-text .section-title {
        font-size: 1.8rem;
    }
}