﻿/* ===========================================================
   移动端适配（最小干预）
   只在 ≤1199px 生效，桌面端完全不受影响。
   其余布局交给主题自带的 @media 规则。
   回滚：删除本文件 + 移除模板里的 <link>
   =========================================================== */
@media screen and (max-width: 1199px) {

  /* 1. 解开桌面端写死的 1200px 最小宽度 */
  html,
  body {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden;
  }

  img {
    max-width: 100%;
  }

  /* 2. 头部：汉堡菜单（主题缺少移动端菜单结构，这里补上） */

  /* 桌面端头部是 position:fixed，靠 body 的 80px 内边距让位；
     手机上头部改成普通流式，这个 padding 必须去掉，否则顶部一条空白 */
  body {
    padding-top: 0 !important;
  }

  #header {
    position: relative !important;
    height: auto !important;
  }

  #navbar {
    padding: 2vw 0;
    position: static !important;
  }

  #navbar .logo img {
    height: 44px !important;
  }

  .small_a,
  .tellNum {
    display: none !important;
  }

  #navbar .mBtn {
    display: block !important;
    float: right;
    padding: 10px 0 10px 10px;
    line-height: 1;
  }

  #navbar .mBtn img {
    width: 26px;
    height: 26px;
    display: block;
  }

  #Nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 999;
    margin: 0;
    padding: 0;
    float: none;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
  }

  #Nav.nav-open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
  }

  #Nav.nav-open li,
  #Nav.nav-open li a {
    visibility: visible !important;
    opacity: 1 !important;
  }

  #Nav li {
    float: none !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    border-bottom: 1px solid #eee;
    text-align: left;
  }

  #Nav li a {
    display: block;
    padding: 0 4vw;
    line-height: 3;
    font-size: 15px;
    color: #333 !important;
  }

  #Nav li a.act {
    color: #0e4081 !important;
    font-weight: 700;
  }

  /* 3. 首屏：桌面是“背景图 + 照片墙 + 标注”，手机上改成可左右滑动的轮播 */
  .adminbuy_banner .wk_wrap,
  .adminbuy_banner .photlist {
    display: none !important;
  }

  /* 关掉 JS 给整块加上的 1.5 倍缩放，否则滑动会错位 */
  .adminbuy_banner .banner {
    transform: none !important;
    height: 100% !important;
    overflow: hidden;
  }

  /* 轮播容器变成横向滚动 + 吸附 */
  .adminbuy_banner .bb {
    display: flex !important;
    flex-flow: row nowrap !important;
    height: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .adminbuy_banner .bb::-webkit-scrollbar {
    display: none;
  }

  /* 每屏一张，铺满 */
  .adminbuy_banner .bb .bb_li {
    display: block !important;
    opacity: 1 !important;
    position: relative !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    height: 0 !important;
    padding-top: 40% !important;
    scroll-snap-align: start;
    background-size: cover !important;
    background-position: center center !important;
  }

  .adminbuy_banner .bb .bb_li > img {
    display: none !important;
  }

  /* 4. 页脚：主题在窄屏把整个页脚隐藏了，这里恢复并重排 */
  #footer {
    display: block !important;
    padding: 6vw 0 3vw !important;
  }

  #footer>.containe {
    padding-left: 4vw !important;
    padding-right: 4vw !important;
    text-align: left !important;   /* 主题原本把它居中了，下划线却是左对齐的，很乱 */
  }

  #footer .flogo {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 0 6vw 0 !important;
    padding-top: 0 !important;
    text-align: left !important;
  }

  #footer .flogo p {
    font-size: 13px !important;
    line-height: 2 !important;
  }

  #footer .flogo p strong {
    font-size: 17px !important;
  }

  /* 导航改成两列，左对齐 */
  #footer .fotnav {
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: space-between !important;
    text-align: left !important;
  }

  #footer .fotnav dl {
    flex: 0 0 47% !important;
    width: 47% !important;
    margin: 0 0 5vw 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }

  #footer .fotnav dl dt a {
    font-size: 15px !important;
    line-height: 1.5 !important;
    padding-bottom: .35rem !important;
    margin-bottom: .55em !important;
    color: #fff !important;
    text-align: left !important;
  }

  #footer .fotnav dl dd a {
    font-size: 13px !important;
    line-height: 1.9 !important;
    white-space: normal !important;
    text-align: left !important;
  }

.copyright .con {
    padding: 4vw !important;
    font-size: 12px !important;
    line-height: 1.8 !important;
  }
}

/* 客户 logo 网格：窄屏自动减列（原模板里是 6 列固定） */
@media screen and (max-width: 1199px) {
  .kehu-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    max-width: 100% !important;
    gap: 8px !important;
  }
}

@media screen and (max-width: 480px) {
  .kehu-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .kehu-b {
    font-size: 11px !important;
  }
}

/* ===== 首页「产品介绍」：手机端两列（原主题在窄屏变成单列） ===== */
@media screen and (max-width: 767px) {
  #adminbuy_case .adminbuy_case {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #adminbuy_case .adminbuy_case li {
    float: left !important;
    width: 48% !important;
    margin-right: 4% !important;
    margin-bottom: 4% !important;
  }

  #adminbuy_case .adminbuy_case li:nth-child(2n) {
    margin-right: 0 !important;
  }

  #adminbuy_case .adminbuy_case li h3 {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  #adminbuy_case .adminbuy_case li .con {
    padding: .6rem .7rem !important;
  }
}
