/* 兄弟锁业智能锁商城 —— 全站移动端适配
   只在窄屏生效，不改桌面端任何样式 */

@media (max-width: 900px) {
  img, video, iframe { max-width: 100%; }
  table { font-size: 14px; }
}

@media (max-width: 640px) {
  html { -webkit-text-size-adjust: 100%; }

  body {
    font-size: 15px;
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-tap-highlight-color: rgba(0, 105, 92, .12);
  }

  /* 顶部标题区收紧 */
  .header { padding: 12px 14px; }
  .header h1 { font-size: 20px; line-height: 1.35; margin-bottom: 4px; }
  .header p { font-size: 12.5px; line-height: 1.6; }

  /* 导航改成单行横滑，省掉两行折行占的高度 */
  .nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 8px 12px;
    line-height: 1.4;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  /* 右侧留一点渐隐，提示还能往右滑 */
  .nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent 100%); mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent 100%); }

  /* 联系页/文章页用 logo + 链接的导航结构 */
  .nav-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; width: 100%; min-width: 0; max-width: 100%; padding: 0 2px; }
  .nav-links { display: flex; flex-wrap: wrap; gap: 8px 16px; width: 100%; }
  .nav-links a { font-size: 13px; flex: 0 0 auto; }
  .logo { font-size: 18px; }
  .nav:has(.nav-inner) { display: block; overflow: visible; white-space: normal; padding: 10px 14px; -webkit-mask-image: none; mask-image: none; }
  .nav a {
    flex: 0 0 auto;
    display: inline-block;
    margin-right: 18px;
    padding: 6px 0;
    font-size: 14px;
  }
  .nav a:last-child { margin-right: 12px; }

  /* 文章模板（header/nav 语义标签） */
  header .wrap { padding: 11px 14px; }
  .brand { font-size: 18px; line-height: 1.35; }
  .brand small { display: block; font-size: 12px; line-height: 1.5; margin-top: 3px; }
  .tel { font-size: 12px; margin-top: 4px; }
  nav .wrap { padding: 8px 14px; gap: 8px 14px; }
  nav a { font-size: 13px; line-height: 1.9; }

  /* 正文容器与标题 */
  .container, .wrap { padding: 14px; }
  h1 { font-size: 21px; line-height: 1.4; }
  h2 { font-size: 18px; margin: 22px 0 10px; }
  h3 { font-size: 16px; }
  p { margin: 9px 0; }
  ul, ol { margin: 9px 0 9px 18px; }
  li { margin: 6px 0; }
  .crumb { font-size: 12px; margin-bottom: 10px; }

  /* 首屏 */
  .hero { padding: 30px 14px; }
  .hero h2 { font-size: 23px; line-height: 1.35; }
  .hero p { font-size: 15px; }
  .hero .phone { font-size: 24px; letter-spacing: .5px; }
  .hero .btn { display: block; margin: 12px auto 0; max-width: 260px; padding: 12px 20px; }

  /* 图片与卡片区 */
  .photo { grid-template-columns: 1fr; gap: 10px; margin: 18px 0; }
  .photo img { height: 190px; }
  .photo figcaption { font-size: 12.5px; padding: 8px 10px; }
  .sec { margin: 24px 0; }
  .sec h2 { font-size: 18px; }
  .svc, .portal, .flow { grid-template-columns: 1fr; gap: 10px; }
  .svc a, .portal a { padding: 14px; }
  .serve { gap: 6px; }
  .serve a { padding: 6px 12px; font-size: 12.5px; }
  .artsec { padding: 18px 14px; margin: 24px 0; }

  /* 表格：保持三列排版，超出就横向滑动，不把字挤成竖条 */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 6px;
    font-size: 13.5px;
    white-space: normal;
  }
  table thead, table tbody { display: table; width: 100%; min-width: 480px; }
  th, td { padding: 7px 9px; line-height: 1.6; }

  /* 底部信息与链接 */
  footer, .foot { padding: 16px 14px; font-size: 12.5px; }

  /* 按钮类：保证可点击高度 */
  .hero .btn, .nav a, .serve a, .dbw-chip { min-height: 32px; }
}

@media (max-width: 380px) {
  .header h1 { font-size: 18px; }
  .hero h2 { font-size: 21px; }
  body { font-size: 14.5px; }
  table thead, table tbody { min-width: 420px; }
}
