/* ========================================
   统一CSS文件 - 产品分类页面
   包含：subpage.css, detail.css, common.css, pagination-title.css, product-list-fix.css
   ======================================== */

/* ========== 清除元素默认的内外边距 ========== */
* {
    margin: 0;
    padding: 0
}

/* 让所有斜体不倾斜 */
em, i {
    font-style: normal;
}

/* 去掉列表前面的小点 */
li {
    list-style: none;
}

/* 图片没有边框，去掉图片底侧的空白缝隙 */
img {
    border: 0;
    vertical-align: middle;
}

/* 让button按钮变成小手 */
button {
    cursor: pointer;
}

/* 取消链接的下划线 */
a {
    color: #666;
    text-decoration: none;
}

a:hover {
    color: #00366a;
}

button, input {
    font-family: 'Microsoft YaHei', 'Heiti SC', tahoma, arial, 'Hiragino Sans GB', \\5B8B\4F53, sans-serif;
}

body {
    background-color: #fff;
    font: 12px/1.5 'Microsoft YaHei', 'Heiti SC', tahoma, arial, 'Hiragino Sans GB', \\5B8B\4F53, sans-serif;
    color: #666
}

.hide, .none {
    display: none;
}

/* 清除浮动 */
.clearfix:after {
    visibility: hidden;
    clear: both;
    display: block;
    content: ".";
    height: 0
}

.clearfix {
    *zoom: 1
}

/* 公共样式 */
.fl {
    float: left;
}

.fr {
    float: right;
}

/* ========== 左侧菜单高亮样式 ========== */
.pro_ny_l .cd-accordion-menu li.active > a,
.pro_ny_l .cd-accordion-menu a.active {
    color: #ff6600 !important;
    font-weight: bold;
    background: #f5f5f5;
    border-radius: 4px;
}

.pro_ny_l .zicategory li.active > a,
.pro_ny_l .zicategory a.active {
    color: #ff6600 !important;
    font-weight: bold;
    background: #f0f0f0;
}

.pro_ny_l .cd-accordion-menu a:hover,
.pro_ny_l .zicategory a:hover {
    color: #ff9900;
    background: #eaeaea;
    text-decoration: none;
}

.pro_ny_l .cd-accordion-menu a,
.pro_ny_l .zicategory a {
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
    padding: 5px 10px;
}

/* ========== 分页样式 ========== */
.fyc .fy {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 20px;
}

.fyc .pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    gap: 8px;
}

.fyc .page-item {
    margin: 0;
}

.fyc .page-link {
    display: inline-block;
    min-width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0 5px;
}

.fyc .page-link:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.fyc .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.fyc .page-item.disabled .page-link {
    background: #f9f9f9;
    color: #aaa;
    cursor: not-allowed;
}

.fyc .page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
    background: #f9f9f9;
}

.fyc .pagination-numbers {
    display: flex;
    gap: 8px;
}

.fyc .page-numbers.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.fyc .current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.fyc .dots {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    color: #999;
    font-weight: bold;
}

/* ========== 右侧分类描述区块样式 ========== */
.category-description {
    background: #f8fafc !important;
    border-left: 4px solid #2563eb !important;
    border-radius: 8px !important;
    padding: 18px 24px !important;
    margin-bottom: 30px !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #334155 !important;
}

.view-section-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 0 0 20px 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid #e2e8f0 !important;
    color: #0f172a !important;
}

.product-item-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 12px 0 0 0 !important;
}

.product-item-title a {
    color: #1e293b !important;
    text-decoration: none !important;
}

.product-item-title a:hover {
    color: #2563eb !important;
}

.carousel-item-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 10px !important;
}

/* ========== 产品列表样式（核心） ========== */

/* 桌面端 - 3列布局 */
.pro_ny_r .thumbs ul {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    width: 100% !important;
}

.pro_ny_r .thumbs ul li {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

.pro_ny_r .thumbs ul li:nth-of-type(3),
.pro_ny_r .thumbs ul li:nth-of-type(6),
.pro_ny_r .thumbs ul li:nth-of-type(9) {
    float: none !important;
    margin-right: 0 !important;
}

.pro_ny_rimg {
    height: 290px !important;
    text-align: center !important;
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    background: #f8fafc !important;
    padding: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.pro_ny_rimg img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.pro_ny_rwz {
    position: relative !important;
    width: 100% !important;
    float: none !important;
    height: auto !important;
    min-height: 60px !important;
    background: white !important;
    line-height: 1.4 !important;
    text-align: center !important;
    color: #1e293b !important;
    padding: 15px !important;
    box-sizing: border-box !important;
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-align: center !important;
    -ms-flex-align: center !important;
    align-items: center !important;
    -webkit-box-pack: center !important;
    -ms-flex-pack: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin-top: 0 !important;
}

.pro_ny_rwz a {
    color: #1e293b !important;
}

.pro_ny_rwz a:hover {
    color: #2563eb !important;
}

/* ========== 移动端响应式（核心优化） ========== */

/* 平板 - 3列 */
@media (max-width: 1200px) {
    .pro_ny_r .thumbs ul {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
    }
}

/* 小平板 - 2列 */
@media (max-width: 900px) {
    .pro_ny_r .thumbs ul {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .pro_ny_rimg {
        height: 220px !important;
        padding: 15px !important;
    }
}

/* 大手机 - 2列 */
@media (max-width: 768px) {
    .pro_ny_r .thumbs ul {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .pro_ny_rimg {
        height: 180px !important;
        padding: 12px !important;
    }
    .pro_ny_rwz {
        padding: 12px !important;
        min-height: 50px !important;
    }

    /* 分类描述移动端适配 */
    .category-description {
        padding: 16px 18px !important;
        font-size: 15px !important;
    }

    /* 分页移动端适配 */
    .fyc .pagination {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        justify-content: center;
    }

    .fyc .page-link {
        min-width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 14px;
    }

    .fyc .pagination-numbers {
        gap: 4px;
    }
}

/* 小手机 - 1列（核心优化：图片完整显示） */
@media (max-width: 600px) {
    .pro_ny_r .thumbs ul {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .pro_ny_rimg {
        height: 500px !important;
        padding: 0 !important;  /* 去掉padding，图片贴边 */
    }
    .pro_ny_rimg img {
        width: 100% !important;  /* 图片宽度100%，完全填满 */
        height: 100% !important;
        object-fit: contain !important;  /* 使用contain，图片完整显示，不被裁剪 */
        object-position: center center !important;  /* 图片居中显示 */
    }
    .pro_ny_rwz {
        padding: 15px !important;
        min-height: 50px !important;
    }
}

/* 超小手机 - 1列（核心优化：图片完整显示） */
@media (max-width: 380px) {
    .pro_ny_r .thumbs ul {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .pro_ny_rimg {
        height: 450px !important;
        padding: 0 !important;  /* 去掉padding，图片贴边 */
    }
    .pro_ny_rimg img {
        width: 100% !important;  /* 图片宽度100%，完全填满 */
        height: 100% !important;
        object-fit: contain !important;  /* 使用contain，图片完整显示，不被裁剪 */
        object-position: center center !important;  /* 图片居中显示 */
    }
    .pro_ny_rwz {
        padding: 15px !important;
    }
}

/* ========== 首页产品列表样式（备用） ========== */

/* 平板和手机端 - 产品一列 */
@media (max-width: 768px) {
    .s234_pro_gw_l {
        width: 100% !important;
        float: left !important;
        padding: 0 5px !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    .s234_pro_gw_l li {
        width: 100% !important;
        height: auto !important;
        margin: 0 0 15px 0 !important;
        padding: 0 !important;
        float: left !important;
        box-sizing: border-box !important;
        border: 1px solid #eee !important;
        background: #fff !important;
    }

    .s234_pro_b_r_img {
        width: 100% !important;
        height: 500px !important;
        line-height: 500px !important;
        border-bottom: 1px solid #eee !important;
        padding: 0 !important;  /* 去掉padding，图片贴边 */
        box-sizing: border-box !important;
    }

    .s234_pro_b_r_img img {
        width: 100% !important;  /* 图片宽度100%，完全填满 */
        height: 100% !important;
        object-fit: contain !important;  /* 使用contain，图片完整显示，不被裁剪 */
        object-position: center center !important;  /* 图片居中显示 */
        vertical-align: middle !important;
    }

    .s234_pro_b_r_wz {
        padding: 15px 20px !important;
        width: 100% !important;
        height: auto !important;
    }
}

/* 小屏幕手机 */
@media (max-width: 480px) {
    .s234_pro_gw_l {
        padding: 0 3px !important;
    }

    .s234_pro_b_r_img {
        height: 450px !important;
        line-height: 450px !important;
        padding: 0 !important;  /* 去掉padding，图片贴边 */
    }

    .s234_pro_b_r_img img {
        width: 100% !important;  /* 图片宽度100%，完全填满 */
        height: 100% !important;
        object-fit: contain !important;  /* 使用contain，图片完整显示，不被裁剪 */
        object-position: center center !important;  /* 图片居中显示 */
    }

    .s234_pro_b_r_wz {
        padding: 12px 15px !important;
    }
}
