/* product-center.css - 产品中心页面样式（3×3布局版）- 移动端产品2列版 */
/* 重置全局样式，避免冲突 */

.insidebg {
    background: #c6c6c6;
    padding: 40px 0;
}

/* 统一容器样式 */
.wapper1 {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; 
}

.inside {
    display: flex;
    gap: 24px;
    align-items: flex-start; 
}

/* 左侧分类栏 */
.inside_lt {
    width: 240px;
    flex-shrink: 0;
}

.side_a {
    background: #ffffff;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.side_a .h1 {
    background: linear-gradient(135deg, #165DFF 0%, #0D47A1 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    padding: 18px 24px;
    letter-spacing: 0.5px;
}

.side_a ul {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.side_a li {
    padding: 0 24px;
    line-height: 52px;
    border-bottom: none;
    transition: all 0.2s ease;
    position: relative;
}

.side_a li.hover {
    background: #f0f5ff;
}

.side_a li.hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #165DFF;
    border-radius: 0 2px 2px 0;
}

.side_a li:hover {
    background: #f8fbff;
    padding-left: 28px;
}

.side_a li span a {
    color: #333333;
    text-decoration: none;
    display: block;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.2s ease;
}

.side_a li.hover span a {
    color: #165DFF;
    font-weight: 500;
}

.side_a li span a:hover {
    color: #165DFF;
}

/* 右侧产品列表（核心：3×3布局） */
.inside_rt {
    flex: 1;
    background: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.ml_indexprocon {
    width: 100%;
}

#productList {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 24px; 
}

/* 核心：3列布局 */
#productList li {
    width: calc((100% - 48px) / 3); 
    min-width: 220px; 
    height: 380px; 
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

#productList li:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(22, 93, 255, 0.08);
    border-color: #e8f0ff;
}

.indexpro_div {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    box-sizing: border-box;
}

.indexpro_div .product-link {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 20px;
    background: #fafafa;
    border-radius: 8px;
}

.indexpro_div img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.indexpro_div:hover img {
    transform: scale(1.08);
}

.product-name {
    font-size: 17px;
    font-weight: 500;
    color: #222222;
    margin: 0 0 10px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    text-align: center;
    letter-spacing: 0.3px;
}

.product-desc {
    font-size: 14px;
    color: #666666;
    text-align: center;
    width: 100%;
    line-height: 1.5;
}

/* 清除浮动 */
.clear {
    clear: both;
}

/* 分页样式 */
.page_box {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:disabled {
    color: #ccc;
    border-color: #f0f0f0;
    cursor: not-allowed;
    background: #fafafa;
}

.pagination-btn:not(:disabled):hover {
    border-color: #165DFF;
    color: #165DFF;
    background: #f0f5ff;
}

.pagination-number {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    background: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-number.active {
    background: linear-gradient(135deg, #165DFF 0%, #0D47A1 100%);
    color: #fff;
    border-color: #165DFF;
    box-shadow: 0 2px 8px rgba(22, 93, 255, 0.2);
}

.pagination-number:not(.active):hover {
    border-color: #165DFF;
    color: #165DFF;
    background: #f0f5ff;
}

.pagination-ellipsis {
    color: #999;
    font-size: 14px;
    padding: 0 8px;
}

/* ========== 响应式适配 ========== */
/* 大屏（1200px以下）- 保持3列布局，仅调整尺寸 */
@media (max-width: 1200px) {
    #productList li {
        width: calc((100% - 48px) / 3); 
        min-width: 200px;
        height: 360px;
    }
    .indexpro_div .product-link {
        height: 200px;
    }
}

/* 平板（992px以下）- 保持左右布局，仅调整尺寸 */
@media (max-width: 992px) {
    .inside {
        gap: 20px; 
    }
    .inside_lt {
        width: 200px;
    }
    /* 保持3列布局 */
    #productList li {
        width: calc((100% - 48px) / 3); 
        min-width: 160px;
        height: 320px;
    }
    .indexpro_div .product-link {
        height: 180px;
    }
    .product-name {
        font-size: 15px;
    }
    .product-desc {
        font-size: 13px;
    }
    /* 分类栏保持原样 */
    .side_a .h1 {
        font-size: 16px;
        padding: 14px 20px;
    }
    .side_a li {
        padding: 0 20px;
        line-height: 46px;
    }
}

/* 移动端（768px以下）- 分类2×3×3，产品2列布局 */
@media (max-width: 768px) {
    .insidebg {
        padding: 15px 0;
    }
    .wapper1 {
        padding: 0; /* 去除左右留白 */
    }
    .inside {
        flex-direction: column;
        gap: 15px;
    }
    /* 左侧分类栏移到上方，2×3×3布局 */
    .inside_lt {
        width: 100%;
        order: -1; /* 移到产品列表上方 */
    }
    .side_a {
        border-radius: 0;
    }
    .side_a .h1 {
        font-size: 16px;
        padding: 12px 15px;
        text-align: center;
    }
    .side_a ul {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
        gap: 8px;
    }
    .side_a li {
        padding: 0;
        line-height: normal;
        flex: 0 0 calc((100% - 16px) / 3); /* 默认3列 */
    }
    /* 分类2×3×3布局：第一行2个，第二三行3个 */
    .side_a li:nth-child(1),
    .side_a li:nth-child(2) {
        flex: 0 0 calc((100% - 8px) / 2);
    }
    .side_a li span a {
        font-size: 12px;
        display: block;
        padding: 10px 5px;
        text-align: center;
        background: #f8f9fa;
        border-radius: 6px;
        border: 1px solid #e8e8e8;
    }
    .side_a li.hover span a,
    .side_a li span a:hover {
        background: #165DFF;
        color: #fff;
        border-color: #165DFF;
    }
    .side_a li:hover {
        padding-left: 0;
        background: transparent;
    }
    .side_a li.hover::before {
        display: none;
    }
    .inside_rt {
        padding: 15px;
    }
    /* 产品列表改为2列布局 */
    #productList {
        gap: 12px;
    }
    #productList li {
        width: calc((100% - 12px) / 2); /* 2列布局 */
        min-width: auto;
        height: 280px;
    }
    .indexpro_div {
        padding: 15px 10px;
    }
    .indexpro_div .product-link {
        height: 160px;
        margin-bottom: 12px;
    }
    .product-name {
        font-size: 14px;
        margin-bottom: 6px;
    }
    .product-desc {
        font-size: 12px;
    }
    /* 分页适配 */
    .pagination-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 6px;
        font-size: 12px;
    }
    .pagination-number {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* 小屏手机（576px以下）- 保持分类2×3×3，产品2列 */
@media (max-width: 576px) {
    .insidebg {
        padding: 10px 0;
    }
    .inside {
        gap: 10px;
    }
    /* 分类栏 */
    .side_a .h1 {
        font-size: 14px;
        padding: 10px 12px;
    }
    .side_a ul {
        padding: 8px;
        gap: 6px;
    }
    .side_a li {
        flex: 0 0 calc((100% - 12px) / 3);
    }
    .side_a li:nth-child(1),
    .side_a li:nth-child(2) {
        flex: 0 0 calc((100% - 6px) / 2);
    }
    .side_a li span a {
        font-size: 11px;
        padding: 8px 4px;
    }
    .inside_rt {
        padding: 10px;
    }
    /* 产品列表2列布局 */
    #productList {
        gap: 10px;
    }
    #productList li {
        width: calc((100% - 10px) / 2);
        height: 240px;
    }
    .indexpro_div {
        padding: 12px 8px;
    }
    .indexpro_div .product-link {
        height: 140px;
        margin-bottom: 10px;
    }
    .product-name {
        font-size: 13px;
        margin-bottom: 4px;
    }
    .product-desc {
        font-size: 11px;
    }
    /* 分页进一步适配 */
    .page_box {
        margin-top: 20px;
    }
    .pagination {
        gap: 4px;
    }
    .pagination-btn {
        min-width: 28px;
        height: 28px;
        padding: 0 4px;
        font-size: 11px;
    }
    .pagination-number {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
}