/* ============================================================
   cshnkj.com 移动端适配（2026-10-21 修订版）
   原站为 960/1135/1200px 固定宽度 + 绝对定位布局，
   本文件在 <=768px 屏幕做液化适配。在 new_style.css 之后加载。
   ============================================================ */

@media only screen and (max-width: 768px) {

    /* ---------- 全局 ---------- */
    html { -webkit-text-size-adjust: 100%; }
    body { font-size: 14px; }
    img { max-width: 100% !important; height: auto !important; box-sizing: border-box; }

    /* ---------- 固定宽度容器液化 ---------- */
    .page_header,
    .mainmenu,
    .link-look,
    .list_banner,
    .other-link { width: 100% !important; }

    /* ================= 头部 ================= */
    .page_header { padding: 10px 12px 0 !important; box-sizing: border-box !important; height: auto !important; overflow: hidden; }
    .logo img { height: 64px !important; width: auto !important; }

    /* 搜索区：530px 固定 -> 全宽，输入框自适应 */
    .hotsearch { width: 100% !important; padding-left: 0 !important; margin-top: 12px !important; float: none !important; clear: both; }
    .hotsearch_words { width: 68% !important; height: 34px !important; line-height: 34px !important; font-size: 15px !important; }
    a.hotsearch_submit { width: 28% !important; height: 34px !important; line-height: 34px !important; text-indent: 0 !important; text-align: center; }

    /* 热门搜索词自动换行 */
    .hotwords { clear: both; padding: 6px 0 2px; font-size: 12px; }

    /* 4 个服务标签：固定 70px -> 各 25%；sprite 背景在小屏会错位，直接去图标留文字 */
    .fuwu_baozhang { float: none !important; clear: both; padding-right: 0 !important; margin-top: 8px !important; text-align: center; }
    .promise_icons { width: 25% !important; padding-top: 18px !important; font-size: 12px !important; background: none !important; }

    /* ================= 主导航 ================= */
    /* 原为 position:absolute; left:203px —— 手机上必须回归文档流，否则错位溢出 */
    .mainmenu { position: relative !important; padding: 0 8px !important; box-sizing: border-box !important; height: auto !important; }
    .mainmenu_channel { position: static !important; left: auto !important; display: block !important; text-align: center; height: auto !important; padding-bottom: 8px; }
    a.channelitem {
        float: none !important;
        display: inline-block !important;
        margin: 8px 3px 0 !important;
        padding: 0 12px !important;
        font-size: 15px !important;
        height: 36px !important;
        line-height: 36px !important;
        background: #d71248 !important;
        background-position: 0 0 !important;
        border-radius: 3px;
        color: #fff !important;
    }
    a.channelitem:hover, a.channelitem:active { background: #ff8106 !important; color: #fff !important; }

    /* “所有商品分类”按钮与其 960px 绝对定位下拉：触屏无 hover，整体隐藏（分类可从“产品中心”进入） */
    .menu_product, .menu_product_list { display: none !important; }

    /* ================= 横幅 ================= */
    .c-banner { height: auto !important; }
    .c-banner .banner ul li img {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        margin-left: 0 !important;
    }

    /* ================= 产品网格 ================= */
    .js_lazybox { padding: 0 10px 20px !important; }
    .js_lazybox ul { margin: 0 !important; }
    .js_lazybox li { width: 50% !important; padding: 0 6px 18px !important; }
    .tabbox_index_proImg { height: auto !important; }

    .menu_product .prolist li { width: 50% !important; }
    .menu_product .prolist a { height: auto !important; min-height: 210px; padding: 12px 6px !important; }
    .menu_product .prolist img { width: auto !important; max-width: 92% !important; }

    /* ================= 联系条 ================= */
    .menu_contact { text-indent: 15px !important; font-size: 13px !important; background-size: cover !important; }

    /* ================= 页脚 ================= */
    .other-link { padding: 0 !important; }
    /* 左侧栏目区 */
    .link-look { width: 100% !important; padding: 20px 15px 10px !important; box-sizing: border-box !important; }
    /* 右侧联系区：原 float:right 240px，手机上移到下方全宽 */
    .haoning-contact {
        float: none !important;
        clear: both !important;
        width: 100% !important;
        padding: 10px 15px 20px !important;
        box-sizing: border-box !important;
    }
    .link-list { width: 50% !important; margin-bottom: 8px; }
    .link-list .link-title { height: auto !important; font-size: 16px !important; padding: 8px 0 4px; }
    .link-list ul li a { font-size: 14px !important; line-height: 30px !important; }
    .haoning-companyname { font-size: 16px !important; height: auto !important; margin-top: 10px !important; }
    .haoning-phone, .haoning-qq { height: auto !important; line-height: 1.6 !important; padding: 3px 0; }
    /* 二维码两个并排自适应 */
    .erweima-box { margin-top: 15px !important; }
    .erweima-box > div { width: 48% !important; max-width: 140px; }
    .erweima-box > div:first-child { margin-right: 4% !important; }
    .erweima-box img { max-width: 120px !important; }
    /* 底部备案条 */
    .footer-bottom { height: auto !important; padding: 20px 15px !important; }
    .footer-bottom p { font-size: 13px !important; line-height: 24px !important; }
    .footer-bottom p span { margin-left: 0 !important; display: inline-block; }

    /* ================= 侧栏产品树 ================= */
    .ProTreeSideBar a.hd,
    .TreeSideBar a.hd { text-indent: 15px !important; }
    .ProTreeSideBar .sub,
    .TreeSideBar .sub { padding: 5px 0 5px 15px !important; }

    /* ================= 内页主容器（1030/1330px 固定宽） ================= */
    .detail, .detail_chaobiao { width: 100% !important; padding: 0 12px !important; box-sizing: border-box !important; }

    /* 详情页左右分栏（侧栏 + 内容）-> 上下堆叠 */
    .fl-product > .fl, .fl-product > .fr,
    .detail .fl, .detail .fr { float: none !important; width: 100% !important; }

    /* 抄表系统产品展示（705/800px 固定 + li 218px） */
    .ProductShow { width: 100% !important; }
    .ProductShow ul { width: 100% !important; }
    .ProductShow li { width: 48% !important; margin: 0 1% 20px 0 !important; height: auto !important; }
    .ProductShow li span { height: auto !important; }
    .ProductShow li p { width: auto !important; height: auto !important; padding: 8px 10px !important; }

    /* 首页新闻推荐区内边距 */
    .index_News { padding: 0 12px 5px !important; }

    /* ================= 详情页表格横向滚动 ================= */
    .hdBox table, .m table, .content table, #content table {
        display: block !important;
        overflow-x: auto;
        max-width: 100%;
    }
}

/* 小屏手机微调 */
@media only screen and (max-width: 480px) {
    body { font-size: 13px; }
    .logo img { height: 52px !important; }
    a.channelitem { padding: 0 9px !important; font-size: 14px !important; margin: 6px 2px 0 !important; }
    .js_lazybox li { width: 50% !important; }
    .menu_product .prolist li { width: 100% !important; }
    .link-list { width: 100% !important; }
    .promise_icons { font-size: 11px !important; }
}

/* ================= 产品详情页：仿旧手机站版式（2026-10-22） ================= */
@media only screen and (max-width: 768px) {
    /* 隐藏左侧产品分类树（旧手机站无侧栏，分类从导航/底部进） */
    .detail .ProTreeSideBar { display: none !important; }
    .detail .fr.confr { width: 100% !important; float: none !important; }

    /* 面包屑：小字灰条 */
    .detail .mbx { width: 100% !important; background: #f5f5f5 !important; border: none !important; border-radius: 4px; padding: 8px 12px !important; font-size: 12px !important; line-height: 1.6 !important; box-sizing: border-box !important; }
    .detail .mbx a { font-size: 12px !important; }

    /* 标题：居中加粗（旧手机站标题居中） */
    .detail .Pro_title { width: 100% !important; height: auto !important; background: none !important; text-align: center !important; padding: 14px 0 6px !important; }
    .detail .Pro_title h1 { font-size: 18px !important; line-height: 1.5 !important; color: #c00 !important; font-weight: bold !important; text-align: center !important; float: none !important; }
    .detail .Pro-shorttitle { float: none !important; text-align: center !important; font-size: 12px !important; color: #999 !important; margin: 0 0 10px !important; }

    /* 产品图：全宽居中大图（旧手机站为全宽产品大图） */
    .detail .Pro_pic { width: 100% !important; float: none !important; text-align: center !important; margin: 0 0 12px !important; }
    .detail .Pro_pic img { max-width: 100% !important; width: auto !important; max-height: 320px !important; border: 1px solid #e8e8e8 !important; border-radius: 6px; padding: 6px !important; box-sizing: border-box !important; }

    /* 参数摘要：每个参数独占一行、名称加粗（仿旧站"产品型号：xxx"摘要块） */
    .detail .Pro_par { width: 100% !important; float: none !important; margin: 0 0 12px !important; }
    .detail .Pro_par dl { margin: 0 !important; border: 1px solid #e8e8e8 !important; border-radius: 6px; overflow: hidden !important; }
    .detail .Pro_par dt, .detail .Pro_par dd {
        display: block !important; float: none !important; width: 100% !important;
        padding: 8px 12px !important; font-size: 13px !important; line-height: 1.6 !important;
        border-bottom: 1px solid #f0f0f0 !important; margin: 0 !important;
        box-sizing: border-box !important; background: #fff !important; text-align: left !important;
    }
    .detail .Pro_par dt:last-child, .detail .Pro_par dd:last-child { border-bottom: none !important; }
    .detail .Pro_par dt strong, .detail .Pro_par dd strong { color: #666 !important; font-weight: bold !important; }

    /* 页头搜索热词行（旧手机站无此项，隐藏避免占位） */
    .hotwords { display: none !important; }

    /* 旧 PC 在线客服悬浮条 + 邀请弹窗（手机端由底部工具栏替代） */
    #onlinebox, #onlinebox-showbox, #onlinebox-conbox,
    .onlinebox, .onlinebox-showbox, .onlinebox-conbox { display: none !important; }

    /* 第三方统计代码自动注入的客服弹窗/悬浮图标（百度爱番番/商桥/360 联盟）
       爱番番 imsdk 的全部 UI 挂在 <ins> 容器内（本站无正当 ins 用途），一刀切禁掉 */
    ins, #BDBridge, [class*="bdbridge"],
    iframe[src*="goutong.baidu.com"], iframe[src*="360fenxi"],
    iframe[src*="union.360.cn"], iframe[src*="e.so.com"] { display: none !important; }

    /* 联系电话区：显眼卡片 */
    .detail .Product-contact { width: 100% !important; float: none !important; margin: 0 0 12px !important; background: #fff8f0 !important; border: 1px solid #ffd9a0 !important; border-radius: 6px; padding: 10px 12px !important; box-sizing: border-box !important; }
    .detail .Product-contact .phones-num-wrap span { color: #c00 !important; font-weight: bold !important; font-size: 15px !important; }

    /* 详情正文全宽（PC 模板正文为 .newsTtxt，内含长图序列） */
    .detail .newsDetail, .detail .ProductList, .detail .newsTtxt { width: 100% !important; float: none !important; }
    .detail .newsTtxt img, .detail .newsDetail img { max-width: 100% !important; height: auto !important; display: block !important; margin: 0 auto 8px !important; }
    .detail .newsDetail table { display: block !important; overflow-x: auto !important; }
    .detail .newsDetail td { font-size: 13px !important; padding: 6px 8px !important; }
}

/* ================= 手机端底部固定联系工具栏（由 /style/mobile-bar.js 注入 DOM） ================= */
#hn-mobile-bar { display: none; }
@media only screen and (max-width: 768px) {
    #hn-mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 99999; height: 58px; background: #fff; border-top: 1px solid #e2e2e2; box-shadow: 0 -2px 10px rgba(0,0,0,.10); }
    #hn-mobile-bar .hn-mb-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; color: #444; font-size: 11px; -webkit-tap-highlight-color: transparent; }
    #hn-mobile-bar .hn-mb-item:active { background: #f5f5f5; }
    #hn-mobile-bar .hn-mb-ico { font-size: 20px; line-height: 1.15; }
    #hn-mobile-bar .hn-mb-txt { margin-top: 2px; }
    #hn-mobile-bar .hn-mb-item.hn-mb-hot { color: #c00; }
    body.hn-mb-pad { padding-bottom: 66px !important; }
}
