/* 复用品牌故事页样式，并增加产品卡片、筛选、分页样式 */
:root {
    --deep-gray: #1A1A1F;
    --pearl-white: #F8F9FA;
    --tech-blue: #2E86AB;
    --silver-blue: #5DADEC;
    --text-dark: #333;
    --text-light: #E0E0E0;
    --text-muted: #888;
    --shadow-sm: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-md: 0 10px 40px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: 'Roboto','Noto Sans SC',sans-serif; background: var(--pearl-white); color: var(--text-dark); line-height:1.6; }
.container { max-width:1280px; margin:0 auto; padding:0 24px; }
.row { display:flex; flex-wrap:wrap; margin:0 -15px; }
/* 让每列高度一致，子卡片通过 flex 拉伸对齐 */
.col-4 { flex:0 0 33.333%; max-width:33.333%; padding:0 15px; display:flex; }
@media (max-width:992px) { .col-4 { flex:0 0 50%; max-width:50%; } }
@media (max-width:768px) { .col-4 { flex:0 0 100%; max-width:100%; } }
section { padding: 70px 0; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-label { font-size:13px; color:var(--silver-blue); letter-spacing:3px; text-transform:uppercase; }
.section-title { font-size:36px; font-weight:700; margin-top:16px; }
.bg-dark { background: var(--deep-gray); color: var(--text-light); }
.bg-dark .section-title { color:white; }
.product-card { background: white; border-radius: 12px; overflow: hidden; transition: var(--transition); margin-bottom: 30px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; width: 100%; }
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
/* 图片区固定比例，内部图片等比缩放居中，保证每行图片区域高度一致 */
.product-img { background: #f0f2f5; text-align: center; position: relative; aspect-ratio: 1 / 1; overflow: hidden; padding: 16px; display: flex; align-items: center; justify-content: center; }
.product-img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: transform 0.3s; }
.product-badge { position: absolute; top:16px; left:16px; background: var(--silver-blue); color:white; padding:4px 12px; border-radius:30px; font-size:12px; }
/* 信息区 flex:1 撑满剩余高度，文字定行数截断，保证卡片高度统一 */
.product-info { padding: 24px; text-align: center; flex: 1; display: flex; flex-direction: column; justify-content: flex-start; }
.product-cat { color: var(--tech-blue); font-size:12px; font-weight:600; text-transform:uppercase; }
.product-info h3 { margin:10px 0 8px; font-size:20px; line-height:1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product-info p { font-size:14px; color: var(--text-muted); line-height:1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.btn-outline { border:1px solid var(--silver-blue); color:var(--silver-blue); background:transparent; padding:8px 20px; border-radius:4px; text-decoration:none; display:inline-block; transition:0.2s; }
.btn-outline:hover { background:var(--silver-blue); color:white; }
.filter-bar { display: flex; justify-content: center; gap: 16px; row-gap: 22px; margin-bottom: 48px; flex-wrap: wrap; }
.filter-btn {
    background: #F1F1F4;
    border: 1px solid transparent;
    color: var(--text-dark);
    padding: 10px 28px;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
    display: inline-block;
}
.filter-btn:hover { background: #E6E6EB; }
.filter-btn.active { background: #fff; border-color: #E3E3E8; color: var(--text-dark); }
/* 分类页大标题按钮保持原样式，不受胶囊风格影响 */
.filter-btn.filter-title { background: #fff; border: 1px solid #e0e0e0; padding: 8px 24px; border-radius: 40px; }

/* 分类页标题区：上下结构（标题 + 描述） */
.filter-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}
.filter-title-wrap .filter-btn.filter-title h1 {
    font-size: 40px;
    font-weight: 700;
    color: var(--deep-gray);
    margin: 0;
    line-height: 1.2;
}
.filter-title-wrap h5.filter-title {
    font-size: 16px;
    color: var(--text-muted);
    margin: 20px 0 0;
    max-width: 820px;
    line-height: 1.7;
    font-weight: 400;
}
/* 移动端卡片自适应：缩小留白与字号 */
@media (max-width:768px) {
    .product-img { padding: 12px; }
    .product-info { padding: 18px 16px; }
    .product-info h3 { font-size: 17px; }
    .product-info p { font-size: 13px; }
}

/* ====== 分页容器（与 lists_article.css 保持一致） ====== */.pagination {
    padding: 20px 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.pagination li {
    margin: 0 5px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    list-style: none;
}
.pagination li a {
    border-radius: 4px;
    color: #6e6e6e;
    background: #fff;
    padding: 12px 16px;
    border: 1px solid #DCDCDC;
    display: block;
    text-decoration: none;
}
.pagination li a:hover {
    background: #5CABE9;
    color: #fff;
    border: 1px solid #5CABE9;
}
.pagination li.active a {
    background: #5CABE9;
    color: #fff;
    border: 1px solid #5CABE9;
    cursor: default;
}

/* ========== 产品列表页 Banner 背景图自适应 ========== */
/* list_banner.htm 产品 banner 已改为内联 height:300px，此处同步为 300px（!important 会覆盖内联样式，不能保留 750px） */
.bg-dark.banner-bg {
    -webkit-background-size: cover;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    width: 100%;
    height: 300px !important; /* 与 list_banner.htm 内联 height:300px 一致 */
    display: block;
}

/* 平板及以下：按图片原始比例(1920x750)自适应高度，cover 保证填满无留白 */
@media (max-width: 992px) {
    .bg-dark.banner-bg {
        height: auto !important;
        -webkit-aspect-ratio: 1920 / 750;
        aspect-ratio: 1920 / 750;
    }
}

/* iOS Safari < 15 不支持 aspect-ratio 时，用 padding-top 按比例撑高（750/1920≈39.06%） */
@supports not (aspect-ratio: 1 / 1) {
    @media (max-width: 992px) {
        .bg-dark.banner-bg {
            height: 0 !important;
            padding-top: 39.06%;
            display: block;
        }
    }
}

/* ========== product_banner：单图结构，PC/移动端高度300px，cover 居中裁剪 ========== */
/* 覆盖上方 banner-bg 旧规则（aspect-ratio 1920/750、padding-top 回退），统一为固定高度 + 背景图裁剪 */
.product_banner {
    position: relative;
    overflow: hidden;
}
/* ≤1000px 视口：高度 = 视口宽/3.333（30vw），等比缩小。
   保证可见裁剪区域恒定为原图中部 1000px 宽（约52%），两边各留约24%；
   1000px 视口时 30vw = 300px，与 PC 基准高度无缝衔接 */
@media (max-width: 1000px) {
    .bg-dark.banner-bg.product_banner {
        height: 30vw !important;
        padding-top: 0 !important;
        -webkit-aspect-ratio: auto;
        aspect-ratio: auto;
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
    }
}
