/* ============================================================
   华企好客 haokesou.com 移动端适配层
   仅在窄屏（平板/手机）生效，桌面端样式零改动
   断点：980px（平板及以下）、640px（手机）
   ============================================================ */

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

  /* ---------- 基础 ---------- */
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; word-break: break-word; }
  img, video, iframe { max-width: 100%; height: auto; }
  table { max-width: 100%; }

  /* ---------- 顶栏（原为 position:fixed 36px） ---------- */
  .head { position: static; }
  .head_s { height: 0; }
  .head_m { width: auto; padding: 6px 10px; box-sizing: border-box; }
  .head_l li { margin: 0 8px 0 0; }
  .head_r { float: right; }

  /* ---------- 主容器（原固定 1220px） ---------- */
  .m, .m0 .m { width: auto !important; padding: 0 10px; box-sizing: border-box; overflow: visible; background: #FFFFFF; }

  /* 模板内联的固定宽度一并放开 */
  [style*="width:1220px"], [style*="width: 1220px"], [style*="width:1220PX"],
  [style*="width:1200px"], [style*="width: 1200px"],
  [style*="width:1004px"], [style*="width:1000px"], [style*="width: 1000px"],
  [style*="width:960px"], [style*="width: 960px"],
  [style*="width:940px"], [style*="width:900px"], [style*="width:890px"],
  [style*="width:884px"], [style*="width:860px"], [style*="width:800px"],
  [style*="width:760px"], [style*="width:700px"], [style*="width:660px"],
  [style*="width:650px"], [style*="width:640px"], [style*="width:600px"],
  [style*="width:560px"], [style*="width:500px"], [style*="width:480px"],
  [style*="width:460px"], [style*="width:440px"], [style*="width:420px"],
  [style*="width:400px"], [style*="width:380px"], [style*="width:360px"],
  [style*="width:350px"], [style*="width:340px"], [style*="width:330px"],
  [style*="width:322px"] { width: auto !important; max-width: 100% !important; }

  /* ---------- 头部：logo + 搜索 ---------- */
  .logo { width: auto !important; height: auto !important; float: none; overflow: visible; padding: 8px 0 2px 0; }
  .logo img { margin: 0; height: 42px; }
  .search-inp { width: 54% !important; margin: 8px 0; box-sizing: border-box; float: left; }
  .search-inp input { width: 100% !important; box-sizing: border-box; padding: 6px 6px 6px 24px; }
  .search-mod { width: 19% !important; margin: 8px 0; box-sizing: border-box; }
  .search-mod input { width: 100% !important; box-sizing: border-box; padding: 0; text-align: center; }
  .search-btn { width: 17% !important; margin: 8px 0; box-sizing: border-box; float: left; }
  .search-btn input { width: 100% !important; margin: 0; padding: 0; box-sizing: border-box; }
  .search-adv, .search-hot { display: none; }
  .search-rec, .sch { width: auto !important; }

  /* ---------- 蓝色主导航：改为横向滑动 ---------- */
  .menu { height: 40px; line-height: 40px; overflow-x: auto; overflow-y: hidden; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .menu li { float: none; display: inline-block; }
  .menu a { display: inline-block; padding: 0 12px; font-size: 14px; }

  /* ---------- 栅格列：全部改为单列堆叠 ---------- */
  .im0l, .im0m, .im0r, .im0a, .im0u, .im0,
  .m1l, .m1r, .m2l, .m2r, .m3l, .m3r, .m3m,
  .m5l, .m5m, .m5r,
  .m_l, .m_r, .m_l_1, .m_r_1 {
    width: auto !important;
    float: none !important;
    margin: 0 0 10px 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .im0 { padding: 8px 0; }
  .im0a { padding: 0 !important; }

  /* 首页左侧分类：单列限高可滚动，禁用悬停弹层 */
  .im0l { max-height: 320px; overflow-y: auto !important; -webkit-overflow-scrolling: touch; }
  .im0l div { display: none !important; position: static; width: auto; height: auto; }

  /* ---------- 各模块 CSS 中的固定宽度区块，统一放开 ---------- */
  .top-l, .top-r, .cate-box, .cate-list, .catalog_index, .brand-list2,
  .exh-rec, .exh-slide, .list-area, .list-view, .mall-list,
  .album-list li, .album-list .on,
  .login-main, .login-show, .reg-main, .reg-tb, .reg-tb .tr,
  .tbs, .tbsm, .sp_input, .poll_verify,
  .mm-faces, .usercard, .g_deal, .g_price,
  .ic-m, .ic-r, .in-m, .in-r, .im-r,
  .jqslide .pic, .jqslide .pic .big, .jqslide .scb, .jqslide .scd,
  .special_box, .ab_video, .space-text img,
  .sort-v, .sf-v, .sf-v .kw, .list-cate td, .contact-td,
  .subline, .head-sub, .list-rank {
    width: auto !important;
    max-width: 100% !important;
    float: none !important;
    box-sizing: border-box;
  }
  .top-l, .top-r, .cate-box { margin: 0 0 10px 0 !important; }
  .comment_ajax textarea, .mm-editor textarea { width: 100% !important; box-sizing: border-box; }
  .subline { padding: 0 10px; }
  .subline li { height: auto; line-height: 180%; padding: 4px 0; }

  /* ---------- 列表 ---------- */
  .list table, .list-thumb table { width: 100% !important; }
  .list0, .list1 { overflow: hidden; }
  .list0 div, .list1 div { width: 32%; float: left; box-sizing: border-box; padding: 4px; }
  .list0 img, .list1 img { width: 100%; height: auto; }
  .list-txt li, .li_dot li { line-height: 170%; }
  .list-cate, .list-area, .sf { width: auto !important; }
  .sf-v input { max-width: 100%; box-sizing: border-box; }

  /* 分页可横向滑动 */
  .pages { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

  /* ---------- 详情页 ---------- */
  .content { padding: 12px; font-size: 15px; }
  .content p { text-indent: 0; }
  .content table { display: block; width: 100% !important; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .introduce { margin: 10px; padding: 10px; }
  .property { margin: 0 10px; }
  .property li { width: 50%; }
  .h_location { padding: 8px 10px; }

  /* ---------- 页脚 ---------- */
  .foot { line-height: 24px; padding: 0 10px 12px 10px; }
  .foot_page { height: auto; line-height: 24px; padding: 10px; }

  /* 回到顶部按钮位置微调 */
  .back2top { right: 8px; }
}

@media screen and (max-width: 640px) {
  body { font-size: 14px; }
  .px16 { font-size: 15px; }
  .px18 { font-size: 16px; }
  .head_l { display: none; }          /* 顶栏左侧「欢迎」类文字，手机上隐藏 */
  .search-inp { width: 54% !important; }
  .list0 div, .list1 div { width: 48%; }
  .property li { width: 50%; }
  .contact-com, .contact-body, .contact_body { width: auto !important; float: none !important; }
}
