/* ==========================================================================
   amunion 全站响应式补丁  responsive.css
   2026-11-08
   目标：不改变任何内容与桌面端排版，只让 952px 定宽 + float 的老版式在
         窄屏下自动重排。以 max-width 媒体查询覆盖，桌面端零影响。
   载入方式：在 global.css / style.css 之后追加一行 <link>
   ========================================================================== */

/* ---------- 全局兜底：禁止横向滚动 ---------- */
@media (max-width: 1023px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  img { max-width: 100%; height: auto; }
  table { max-width: 100%; }
  /* 老式固定像素的定宽容器统一改自适应 */
  .width,
  .m-user,
  .gq_ad,
  .zulinlsit {
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
}

/* ================= 顶部工具条 head_nav ================= */
@media (max-width: 1023px) {
  .head_nav_w {
    width: auto !important;
    max-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
  }
  .head_nav_w .float_left,
  .head_nav_w .float_right { float: none !important; }
  .head_nav_w .float_right { display: flex; flex-wrap: wrap; gap: 2px; }
  .head_nav { height: auto !important; min-height: 30px; overflow: visible !important; }
  .head_nav_w { height: auto !important; overflow: visible !important; }
}

/* ================= 页头 logo + 搜索 head_logo ================= */
@media (max-width: 1023px) {
  .head_logo {
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    padding: 8px 10px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }
  .head_logo .logo,
  .head_logo .guanggao,
  .head_logo .search {
    float: none !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
  }
  .head_logo .guanggao { display: none !important; }   /* Flash 广告位，窄屏直接隐藏 */
  .head_logo .logo img { max-width: 100%; height: auto; }
  .head_logo .search {
    flex: 1 1 100%;
    display: block !important;
  }
  .search_up, .search_down, .search_up .s_s, .s_s2, .s_s3 {
    width: auto !important;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* ================= 主导航 menu ================= */
@media (max-width: 1023px) {
  .menu,
  .menu.width {
    width: auto !important;
    max-width: 100%;
    display: block !important;
    height: auto !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }
  .menu ul {
    display: flex !important;
    flex-wrap: wrap;
    gap: 2px;
    height: auto !important;
  }
  .menu ul li,
  .menu1 ul li,
  .menu3 ul li,
  .menu4 ul li {
    float: none !important;
    flex: 0 1 auto;
  }
  .menu ul li a,
  .menu1 ul li a,
  .menu3 ul li a,
  .menu4 ul li a {
    white-space: nowrap;
    padding: 8px 10px;
    height: auto !important;
    line-height: 1.4 !important;
    display: inline-block;
  }
  /* 二级筛选条（menu2/peijian）也是定宽 float，同步放开 */
  .menu .menu2 {
    float: none !important;
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    padding-left: 0 !important;
    box-sizing: border-box;
  }
  .menu .menu2 ul,
  .menu ul.peijian {
    display: flex !important;
    flex-wrap: wrap;
    gap: 4px;
    height: auto !important;
    width: auto !important;
  }
  .menu ul.peijian li {
    float: none !important;
    margin-right: 0 !important;
    flex: 0 1 auto;
  }
  .menu .menu2 li .new { position: static !important; display: inline-block; margin: 0 0 0 4px !important; }
}

/* ================= 列表页：左内容 + 右侧栏 ================= */
@media (max-width: 1023px) {
  .content.width,
  .content {
    width: auto !important;
    max-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    overflow: hidden;
  }
  .news_list,
  .news_list_right {
    float: none !important;
    width: auto !important;
    max-width: 100%;
  }
  .news_ad01 img,
  .news_ad02 img { width: 100% !important; height: auto !important; }

  /* 列表条目：图 + 文字，窄屏改为上下或缩小图宽度 */
  .news_list_c li {
    height: auto !important;
    margin: 14px 0 !important;
    padding-bottom: 14px;
    overflow: hidden;
  }
  .news_list_c li .news_list_c1 {
    float: left;
    margin-right: 12px;
    max-width: 40%;
  }
  .news_list_c li .news_list_c1 img { width: 100% !important; height: auto !important; }
  .news_list_c li .news_list_c2 {
    float: none !important;
    width: auto !important;
    overflow: hidden;
  }
  .news_list_c2_t .float_left { float: none !important; }
  .news_list_c2_j,
  .news_list_c2_o { word-break: break-word; }
  /* 列表页里的右侧栏与主列并排 → 上下堆叠时补间距 */
  .news_list_right { margin-top: 20px; }
  .fixTop { position: static !important; width: auto !important; }
}

/* ================= 分页 .page ================= */
@media (max-width: 1023px) {
  .page { width: auto !important; max-width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
  .page ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; height: auto !important; }
  .page ul li { float: none !important; }
  .page ul li a { display: inline-block; min-width: 32px; min-height: 32px; line-height: 32px; text-align: center; box-sizing: border-box; }
}

/* ================= 详情页 ================= */
@media (max-width: 1023px) {
  .news_detail_c_c,
  .news_page,
  .news_c_t {
    width: auto !important;
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  /* 详情正文里的图片、表格、iframe 一律不撑破 */
  .news_detail_c_c img,
  .news_page img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
  }
  .news_detail_c_c table,
  .news_page table { max-width: 100% !important; }
  .news_detail_c_c iframe,
  .news_page iframe,
  .news_detail_c_c embed,
  .news_page embed,
  .news_detail_c_c video,
  .news_page video { max-width: 100% !important; }
  .news_detail_c_c pre,
  .news_page pre { white-space: pre-wrap; word-break: break-word; overflow-x: auto; }
  /* 面包屑 */
  .bread_nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; height: auto !important; line-height: 1.8 !important; }
  .bread_nav .float_left { float: none !important; }
  /* 分享条 */
  .bdsharebuttonbox { display: flex; flex-wrap: wrap; }
}

/* ================= 侧栏区块 pingce ================= */
@media (max-width: 1023px) {
  .pingce { width: auto !important; max-width: 100%; }
  .pingce_list1_img img { max-width: 100% !important; height: auto !important; }
  .pingce_title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; }
  .pingce_list2 li { float: none !important; width: auto !important; }
}

/* ================= 页脚 ================= */
@media (max-width: 1023px) {
  .footer,
  .footer_link,
  .footer_tu {
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    box-sizing: border-box;
  }
  .footer_link { padding: 14px 12px !important; line-height: 2.1 !important; word-break: break-word; }
  .footer_link a { display: inline-block; padding: 2px 0; }
  .footer_tu { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 10px; }
  .footer_tu img { max-width: 100%; height: auto; }
}

/* ================= 自配场地 /cehua/ 配单表单 ================= */
@media (max-width: 1023px) {
  .cd_left,
  .cd_right {
    float: none !important;
    width: auto !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  .dan_list { width: auto !important; max-width: 100%; box-sizing: border-box; overflow: hidden; }
  .dan_list_t,
  .dan_list_t2 { height: auto !important; line-height: 1.6 !important; padding: 10px; box-sizing: border-box; }
  /* 配单表头：类型/名称/数量/总价/删除 五列，窄屏隐藏"类型"列并压缩 */
  .red_dise { display: flex !important; flex-wrap: wrap; width: auto !important; padding: 6px 8px; box-sizing: border-box; }
  .red_dise > div { flex: 1 1 auto; min-width: 0; font-size: 12px; }
  .huikuang { width: auto !important; max-width: 100%; box-sizing: border-box; }
  .huikuang_left { float: none !important; width: auto !important; }
  .neirong { display: flex !important; flex-wrap: wrap; align-items: center; gap: 4px; width: auto !important; padding: 6px 8px; box-sizing: border-box; }
  .neirong > div, .neirong > span { float: none !important; }
  .neirong1 { flex: 1 1 100%; min-width: 0; word-break: break-word; }
  .neirong03 { flex: 0 0 auto; }
  .neirong03 input[name="num"] { width: 48px !important; box-sizing: border-box; }
  .danjia { flex: 0 0 auto; }
  .peizhi_anniu { flex: 0 0 auto; }
  .heji { width: auto !important; margin: 10px 8px !important; box-sizing: border-box; }
  .dan_tijiao { width: auto !important; max-width: 100%; box-sizing: border-box; padding: 0 8px; }
  .dan_tijiao input[type="text"] { max-width: 100% !important; box-sizing: border-box; }
  .m-cd_type { width: auto !important; max-width: 100%; }
  .m-cd_type li { float: none !important; }
}

/* ==========================================================================
   小屏细化（≤768px）
   ========================================================================== */
@media (max-width: 768px) {
  /* 列表条目：窄屏彻底改成上图下文，读起来更顺 */
  .news_list_c li .news_list_c1 {
    float: none !important;
    margin: 0 0 8px 0 !important;
    max-width: 100%;
  }
  .news_list_c li .news_list_c1 img { width: 100% !important; }
  .news_list_c2_t { font-size: 15px; }

  /* 搜索框：输入框占满一行 */
  .search_up form, .search_up .s_s { display: block !important; width: auto !important; max-width: 100% !important; }
  .search_up input[type="text"],
  .search_up input[type="submit"],
  .search_up input[type="button"] { max-width: 100% !important; box-sizing: border-box; }
  .search { width: auto !important; max-width: 100% !important; }
  .search_up, .search_down, .s_s2, .s_s3, .t_menu, .peijian { width: auto !important; max-width: 100% !important; box-sizing: border-box; }
  .t_menu { display: none !important; }   /* 产品/资讯切换菜单，窄屏收起，默认按产品搜 */
  .s_s2 { flex: 1 1 auto; }

  /* 详情页字号微调，行距放宽 */
  .news_detail_c_c { font-size: 15px; line-height: 1.9; }
  .news_detail_c_c p { margin-bottom: 12px; }

  /* 分页按钮触控高度 */
  .page ul li a { min-width: 36px; min-height: 36px; line-height: 36px; }
}

/* ==========================================================================
   极窄屏（≤400px）
   ========================================================================== */
@media (max-width: 400px) {
  .content { padding: 0 8px; }
  .head_logo { padding: 8px; }
  /* 320/360 这类极窄屏：隐藏顶部二维码入口与次要导航，避免挤压 */
  .head_nav_w .float_right { display: none !important; }
  .menu ul li a,
  .menu1 ul li a,
  .menu3 ul li a,
  .menu4 ul li a { padding: 6px 7px; font-size: 12.5px; }
  .peizhi_anniu img { max-width: 24px; height: auto; }
  .red_dise > div { font-size: 11px; }
  .menu ul li a,
  .menu1 ul li a,
  .menu3 ul li a,
  .menu4 ul li a { padding: 7px 8px; font-size: 13px; }
  .news_detail_c_c { font-size: 14.5px; }
  .footer_link { font-size: 12px; padding: 12px 8px !important; }
}
