/* ==========================================================================
   首页「铁板烧设备产品中心」—— 照外贸站首页排版
   两条「分组标题 + 查看全部」横栏 + 图片网格：
   适用场景 4 列（8 个，两行）、常规形状 7 列（7 个，一行）
   卡片只显示「图 + 名称」，不放摘要
   ========================================================================== */
.wrapBox.product .hpBlock { margin-bottom: 44px; }
/* 底部「查看更多」已撤掉，末组不再留额外下边距，靠板块自身 padding 收尾 */
.wrapBox.product .hpBlock:last-of-type { margin-bottom: 0; }

.hpBlockHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e8e8;
}
.hpBlockH {
  position: relative;
  margin: 0;
  padding-left: 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #222;
}
.hpBlockH::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 4px;
  height: 20px;
  margin-top: -10px;
  border-radius: 2px;
  background: #c80000;
}
.hpBlockH a { color: inherit; text-decoration: none; transition: color .2s; }
.hpBlockH a:hover { color: #c80000; }
.hpMore {
  flex: 0 0 auto;
  font-size: 14px;
  color: #999;
  text-decoration: none;
  transition: color .2s;
}
.hpMore:hover { color: #c80000; }
.hpMore i { margin-left: 4px; font-size: 12px; }

.hpGrid { display: grid; }
.hpGrid--scene { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px 22px; }
.hpGrid--shape { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 20px 16px; }

.hpCard { min-width: 0; }
.hpCard > a { display: block; text-decoration: none; }
.hpCardImg {
  display: block;
  overflow: hidden;
  border: 1px solid #ececec;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}
.hpCardImg img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .5s ease;
}
.hpCardPh { display: block; width: 100%; aspect-ratio: 4 / 3; background: #f2f2f2; }
.hpCard > a:hover .hpCardImg img { transform: scale(1.06); }
.hpCardName {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.45;
  color: #333;
  text-align: center;
  transition: color .2s;
}
.hpCard > a:hover .hpCardName { color: #c80000; }
.hpGrid--shape .hpCardName { margin-top: 9px; font-size: 13.5px; }

/* 窄屏：7 个一行会挤，改 4 个一行；场景保持两行 4 个 */
@media (max-width: 1100px) {
  .hpGrid--shape { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 18px; }
  .hpGrid--shape .hpCardName { margin-top: 11px; font-size: 14px; }
}
@media (max-width: 991px) {
  .hpGrid--scene { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; }
  .hpBlockH { font-size: 19px; }
  .hpBlockHead { margin-bottom: 18px; padding-bottom: 10px; }
}
@media (max-width: 560px) {
  .hpGrid--shape { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
  .hpCardName { margin-top: 9px; font-size: 13px; }
  .wrapBox.product .hpBlock { margin-bottom: 32px; }
}

/* Logo 防变形（首页也加载本文件）：主题只固定 height，图片 number 属性会把比例拉坏 */
.logo img,
.headerNav .logo img {
  height: 48px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
}
@media (max-width: 860px) {
  .logo img,
  .headerNav .logo img {
    height: 40px;
    width: auto;
    max-width: 200px;
  }
}

/* ==========================================================================
   手机端适配（2026-10-27）
   1) 首页 banner 换成静态图（原来只有视频，手机上加载不出来是空白）
   2) 首页手机抽屉菜单（umtheme 的 leftNav 在迁移后没注入，自己实现）
   3) 底部拨打电话浮窗
   ========================================================================== */
.banner-mob { display: none; }

/* 电话浮窗：手机端底部通栏，桌面不显示 */
.tel-float { display: none; }

@media (max-width: 860px) {
  /* ---- banner ---- */
  body.index .banner { display: none; }
  .banner-mob { display: block; }
  body.index .banner-mob img {
    display: block;
    width: 100%;
    height: auto;
  }

  /* ---- 首页抽屉菜单 ---- */
  body.index .navbar {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1200;
    width: 78%;
    max-width: 300px;
    height: 100%;
    margin: 0;
    padding: 8px 0 40px;
    background: #C80000;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .28s ease;
    box-shadow: 2px 0 16px rgba(0, 0, 0, .18);
  }
  body.index .navbar.open { transform: translateX(0); }
  body.index .navbar > li {
    display: block !important;
    position: static !important;
    float: none !important;
    height: auto !important;
    width: auto !important;
    text-align: left !important;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
  }
  body.index .navbar > li > a {
    display: block !important;
    padding: 14px 20px !important;
    height: auto !important;
    color: #fff !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    text-align: left !important;
    background: none !important;
  }
  body.index .navbar .dot1 { display: none !important; }
  body.index .navbar .sub1 { display: none !important; }

  /* 抽屉遮罩 */
  /* 遮罩层级必须低于导航（导航在 .container 内，层级受父级约束），
     用 1 就能盖住正文，又不会挡住菜单 */
  .nav-mask {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, .45);
  }
  /* 老主题 umtheme.js 会另插一份 #leftNav 克隆菜单，和我们这套冲突，隐藏掉 */
  body.index #leftNav { display: none !important; }
  /* 微信图标里内嵌的二维码块（老站是 hover 显示），手机上会在弹窗下方
     多显示一份重复文字；弹窗内容已由 JS 复制过去，这里直接隐藏原块 */
  body.index .weixin .imgHtml { display: none !important; }
  /* 老主题点击菜单时会拉起它自己的全屏遮罩(.mask, z-index 890)，
     它层级高于我们这套菜单，会把菜单盖住 —— 首页禁用 */
  body.index .mask { display: none !important; }
  body.index.nav-open .nav-mask { display: block; }
  body.index.nav-open { overflow: hidden; }

  /* ---- 电话浮窗 ---- */
  .tel-float {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    background: #C80000;
    color: #fff !important;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: .5px;
    text-decoration: none;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .15);
  }
  .tel-float svg { flex: 0 0 auto; }
  body { padding-bottom: 52px; }
}

/* ==========================================================================
   首页滚动淡入（自己实现，替代老主题的 WOW）
   老主题 WOW 只负责隐藏(.anim → visibility:hidden)，滚动到才显示；但它的触发
   在静态站上不工作，导致整页内容永久不可见。这里改用 IntersectionObserver：
   - 默认状态（body 没有 anim-on）：内容全部可见，JS 挂了也不影响阅读
   - JS 正常：给 body 加 anim-on 后才有淡入效果，进入视口加 .in 显示
   ========================================================================== */
body.index .wrap .anim {
  visibility: visible !important;
  opacity: 1;
  transform: none;
  animation: none !important;
}
body.index.anim-on .wrap .anim {
  opacity: 0;
  transition: opacity .65s ease, transform .65s cubic-bezier(.22, .61, .36, 1);
}
body.index.anim-on .wrap .anim.fadeInUp { transform: translateY(30px); }
body.index.anim-on .wrap .anim.fadeInDown { transform: translateY(-30px); }
body.index.anim-on .wrap .anim.bounceIn { transform: scale(.94); }
body.index.anim-on .wrap .anim.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  body.index.anim-on .wrap .anim { opacity: 1; transform: none; transition: none; }
}

/* 百度统计账号里的「爱番番」在线咨询会随 hm.js 自动注入浮标(.embed-icon)，
   这里全站隐藏。彻底关闭需在百度统计/爱番番后台停用该组件。 */
.embed-icon,
.embed-icon-unread-num { display: none !important; }

/* 手机端隐藏右侧浮窗的 hover 文字提示（手机没有 hover，会一直挂着挡视线） */
@media (max-width: 860px) {
  #backTop .ibox { display: none !important; }
}

/* 手机端首页「适用场所」只显示前 6 个（2 列 × 3 行，正好整齐） */
@media (max-width: 860px) {
  .hpGrid--scene > .hpCard:nth-child(n+7) { display: none; }
}

/* 手机端首页「常规形状」7 个只显示前 6 个（3 列 × 2 行，正好整齐） */
@media (max-width: 860px) {
  .hpGrid--shape > .hpCard:nth-child(n+7) { display: none; }
}
