﻿/* ==============================================
   首页产品中心 - 左分类 + 右产品网格
   ============================================== */
.idx-product-section { padding: 50px 0 60px; background: #f4f6fa; }
/* 两栏等高 flexbox */
.idx-product-section .container { display: flex; align-items: stretch; gap: 22px; }
/* 左侧分类栏 */
.idx-prd-cate { flex: 0 0 290px; display: flex; flex-direction: column; background: #fff; overflow: hidden; border: 3px solid #4177b7; box-shadow: none; }
/* 标题区域 */
.idx-prd-cate-tit { background: #4177b7; color: #fff; text-align: center; padding: 0; line-height: 70px; flex-shrink: 0; }
.idx-prd-cate-tit strong { display: inline-block; font-size: 24px; font-weight: 700; letter-spacing: 0; margin: 0; }
.idx-prd-cate-tit span { display: none; }
/* 分类 dl/dt/dd */
.idx-prd-cate dl { padding: 10px; margin: 0; }
/* dt 标题行 */
.idx-prd-cate dt a { display: block; position: relative; line-height: 60px; background-color: #4177b7; color: #fff; font-size: 18px; font-weight: bold; text-align: center; padding-right: 30px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background-color .2s; cursor: pointer; }
.idx-prd-cate dt a::after { content: '\25BC'; position: absolute; right: 12px; top: 0; font-size: 10px; font-weight: normal; transition: transform .3s ease; }
.idx-prd-cate dt a:hover { background-color: #5589c4; }
/* 展开状态 */
.idx-prd-cate dl.open dt a { background-color: #2f5e9e; }
.idx-prd-cate dl.open dt a::after { transform: rotate(180deg); }
/* dd 默认折叠，带滑动动画 */
.idx-prd-cate dd { margin: 0; max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.idx-prd-cate dl.open dd { max-height: 600px; }
.idx-prd-cate dd a { display: block; position: relative; line-height: 60px; font-size: 15px; color: #333; border-bottom: 1px dotted #e5e5e5; padding-left: 26px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .15s, background-color .15s; }
.idx-prd-cate dd a::before { content: ''; position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 6px; height: 6px; border-radius: 50%; border: 1px solid #bbb; background: transparent; transition: background-color .15s, border-color .15s; }
.idx-prd-cate dd a:last-of-type { border-bottom: none; }
.idx-prd-cate dd a:hover { color: #4177b7; background-color: #f5f8fd; }
.idx-prd-cate dd a:hover::before { background-color: #4177b7; border-color: #4177b7; }
.idx-prd-cate dd:empty { display: none; }
/* 底部热线块 */
.prd-cate-footer { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #4177b7; padding: 18px 16px; text-align: center; min-height: 90px; }
.prd-footer-label { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,0.7); font-size: 12px; width: 100%; margin-bottom: 10px; letter-spacing: 1px; }
.prd-footer-label::before, .prd-footer-label::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.25); }
.prd-cate-footer strong { display: block; color: #fff; font-size: 22px; font-family: Impact, Arial, sans-serif; letter-spacing: 1px; line-height: 1.3; }
/* 右侧产品区 */
.idx-prd-con { flex: 1; min-width: 0; }
.idx-prd-hd { margin-bottom: 18px; display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid #4177b7; padding-bottom: 12px; }
.idx-prd-hd span { font-size: 22px; font-weight: 700; color: #111; }
.idx-prd-hd small { font-size: 13px; color: #999; font-weight: 400; margin-left: 10px; letter-spacing: 1px; }
.idx-prd-more { font-size: 14px; color: #4177b7; }
.idx-prd-more:hover { color: #2558a0; }
/* 产品网格 flexbox */
.idx-prd-list { display: flex; flex-wrap: wrap; margin: -8px; list-style: none; padding: 0; }
.idx-prd-list li { width: 33.333%; padding: 8px; box-sizing: border-box; }
.idx-prd-list li a { display: block; background: #fff; border: 1px solid #e8e8e8; overflow: hidden; transition: box-shadow .3s, border-color .3s; }
.idx-prd-list li a:hover { box-shadow: 0 8px 24px rgba(65,119,183,.18); border-color: #4177b7; }
/* 图片区 — 固定 4:3 比例 */
.idx-prd-img { position: relative; width: 100%; padding-top: 75%; overflow: hidden; background: #f8f9fb; }
.idx-prd-img img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.idx-prd-list li a:hover .idx-prd-img img { transform: scale(1.06); }
/* 标题 */
.idx-prd-list li p { margin: 0; padding: 11px 10px; font-size: 14px; color: #444; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-top: 1px solid #f0f0f0; transition: color .2s; }
.idx-prd-list li a:hover p { color: #4177b7; }
@media (max-width: 1100px) {
    .idx-prd-cate { width: 260px; }
    .idx-prd-con { width: calc(100% - 280px); }
}
@media (max-width: 480px) {
    .idx-prd-list li { width: 100%; }
}

/* 产品分类面板切换 */
.idx-prd-panel { display: none; }
.idx-prd-panel.active { display: block; animation: prdPanelIn 0.28s ease; }
@keyframes prdPanelIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* 激活分类状态 */
.idx-prd-cate dt a.prd-cate-active { background-color: #1e4a8a !important; }
.idx-prd-cate dd a.prd-cate-active {
    color: #4177b7 !important;
    background-color: #e8f0fb;
    font-weight: 600;
}
.idx-prd-cate dd a.prd-cate-active::before {
    background-color: #4177b7 !important;
    border-color: #4177b7 !important;
}

/* ======= 移动端标签样式（放在全局规则之后，确保优先级正确）======= */
@media (max-width: 768px) {
    .idx-product-section { padding: 16px 0 24px; background: #f4f6fa; }
    .idx-product-section .container { flex-direction: column; padding: 0 12px; }

    /* 分类栏 — 深蓝渐变背景，横向滚动标签 */
    .idx-prd-cate {
        flex: none;
        width: 100%;
        margin-bottom: 14px;
        flex-direction: column;
        background: linear-gradient(135deg, #1a3a7a 0%, #4177b7 100%);
        border: none;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 16px rgba(26,58,122,0.28);
        -webkit-user-select: none;
        user-select: none;
    }

    /* 标题行 */
    .idx-prd-cate-tit {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        line-height: 1 !important;
        padding: 12px 14px !important;
        background: rgba(0,0,0,0.20) !important;
        border-bottom: 1px solid rgba(255,255,255,0.12);
    }
    .idx-prd-cate-tit strong {
        display: inline !important;
        font-size: 15px !important;
        font-weight: 700;
        color: #fff;
        letter-spacing: 1px;
    }
    .idx-prd-cate-tit span {
        display: inline !important;
        font-size: 11px !important;
        color: rgba(255,255,255,0.50);
        letter-spacing: 1.5px;
    }

    /* 标签容器 — 2行换行 */
    .idx-prd-cate-scroll {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px 14px;
    }

    /* dl 透明化，dt 标签横排 */
    .idx-prd-cate dl { display: contents; }
    .idx-prd-cate dd { display: none !important; }

    /* 分类标签：白色胶囊样式 */
    .idx-prd-cate dt a,
    .idx-prd-cate dl.open dt a,
    .idx-prd-cate dt a.prd-cate-active,
    .idx-prd-cate dl.open dt a.prd-cate-active {
        display: inline-flex !important;
        align-items: center;
        line-height: 1.4 !important;
        padding: 7px 16px !important;
        font-size: 13px !important;
        font-weight: 500;
        background: rgba(255,255,255,0.15) !important;
        border: 1px solid rgba(255,255,255,0.35) !important;
        border-radius: 20px !important;
        color: #fff !important;
        white-space: nowrap;
        flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
        transition: background .2s;
    }
    .idx-prd-cate dt a.prd-cate-active,
    .idx-prd-cate dl.open dt a.prd-cate-active {
        background: rgba(255,255,255,0.90) !important;
        color: #1a3a7a !important;
        font-weight: 700;
        border-color: transparent !important;
    }
    .idx-prd-cate dt a:active {
        background: rgba(255,255,255,0.35) !important;
    }
    .idx-prd-cate dt a::after { display: none; }
    .prd-cate-footer { display: none; }

    /* 右侧产品区 */
    .idx-prd-con { flex: 1; width: 100%; }
    .idx-prd-hd { margin-bottom: 12px; padding-bottom: 10px; }
    .idx-prd-hd span { font-size: 18px; }
    /* 产品网格 2列 */
    .idx-prd-list li { width: 50%; padding: 6px; }
    .idx-prd-img { padding-top: 80%; }
    .idx-prd-list li p { font-size: 13px; padding: 8px 8px; }
}


