/* ============================================
   福玛北美旅行网 - 响应式适配样式 v7
   更新日期: 2026-06-30
   重点修复: Footer美化、移动端间距、LOGO区域、热门推荐
   ============================================ */

/* --- 全局基础 (< 980px) --- */
@media screen and (max-width: 980px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }
  .m-width,
  .m-width * {
    max-width: 100% !important;
  }
  .menus .nav {
    width: 100% !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
  }
  .menus .nav li a {
    padding: 0 12px !important;
    font-size: 14px !important;
  }
  .menus .nav li .box {
    width: 100% !important;
    left: 0 !important;
    margin-left: 0 !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .tab_content {
    height: auto !important;
    min-height: 0 !important;
  }
  .tabs_item {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
  .tabs_item li.content {
    width: 46% !important;
    margin: 0 2% 15px !important;
    height: auto !important;
  }
  .banner-box .bd img {
    height: auto !important;
    max-height: 350px !important;
  }

  /* ===== Footer 平板适配 ===== */
  .footer_inner {
    padding: 25px 15px 15px !important;
  }
  .footer_top {
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }
  .footer_qrcodes {
    justify-content: center !important;
  }
  .footer_links {
    text-align: center !important;
    padding-top: 0 !important;
  }
}

/* --- 手机适配 (< 768px) --- */
@media screen and (max-width: 768px) {
  /* ===== 全局 ===== */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    font-size: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ===== 强制所有主容器全宽 ===== */
  .m-width {
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ===== LOGO / 导航栏 ===== */
  .menus {
    height: auto !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
  }
  .menus .nav {
    width: max-content !important;
    min-width: 100% !important;
    white-space: nowrap !important;
    height: 50px !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    display: flex !important;
    align-items: center !important;
  }
  .menus .nav li {
    float: none !important;
    display: inline-block !important;
    font-size: 14px !important;
  }
  .menus .nav li a {
    padding: 0 15px !important;
    height: 50px !important;
    line-height: 50px !important;
    font-size: 13px !important;
    display: inline-block !important;
    white-space: nowrap !important;
  }
  .menus .nav li .box {
    display: none !important;
  }
  /* LOGO: 绝对定位在导航栏左上角，避免压住banner */
  .menus span {
    position: absolute !important;
    top: 5px !important;
    left: 10px !important;
    margin: 0 !important;
    z-index: 10 !important;
  }
  .menus span img {
    height: 40px !important;
    width: auto !important;
    margin: 5px 0 !important;
  }

  /* ===== Banner ===== */
  .banner-box {
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  .banner-box .bd {
    width: 100% !important;
  }
  .banner-box .bd ul {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .banner-box .bd ul li {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .banner-box .bd img {
    height: auto !important;
    max-height: 200px !important;
    width: 100% !important;
    min-width: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
  .banner-box .hd {
    bottom: 5px !important;
  }

  /* ===== H1 - 手机端隐藏 ===== */
  h1 {
    display: none !important;
  }

  /* ===== Banner - 消除下方空隙 ===== */
  .banner-box,
  .banner-box .bd,
  .banner-box .bd ul,
  .banner-box .bd ul li,
  .banner-btn {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ===== 搜索区域（橙色条）- 手机端完全隐藏 ===== */
  div[style*="background:#f6701e"],
  div[style*="background:#f6701E"] {
    display: none !important;
  }
  div[style*="background:#f6701e"] *,
  div[style*="background:#f6701E"] * {
    display: none !important;
  }

  /* ===== 分类标题（精品十人小团、热门定制推荐等） ===== */
  .tab > div[style*="font-size: 20px"],
  div[style*="font-size: 20px"][style*="font-weight:bold"],
  .tab div[style*="height:50px"] > div[style*="font-size: 20px"] {
    font-size: 17px !important;
    padding: 10px 15px !important;
    height: auto !important;
    line-height: 1.4 !important;
  }

  /* ===== 分类之间的间距 ===== */
  .tab {
    margin-top: 10px !important;
  }
  .tab > div[style*="height:50px"],
  .tab > div[style*="height: 50px"] {
    height: auto !important;
    padding: 5px 0 !important;
    border-bottom: 2px solid #f6701e !important;
    margin: 0 10px 10px !important;
  }

  /* ===== 产品卡片区域 ===== */
  .tab_content {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    width: 100% !important;
  }
  .tabs_item {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 12px !important;
  }
  .tabs_item li.content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1) !important;
  }
  .tabs_item li.content img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 220px !important;
    object-fit: cover !important;
    display: block !important;
  }
  .tabs_item li.content div[style*="width:303px"] {
    width: 100% !important;
    max-width: 100% !important;
  }
  .tabs_item li.content div[style*="width:303px"] img {
    width: 100% !important;
    max-width: 100% !important;
  }
  .tabs_item li.content .zhe {
    display: none !important;
  }
  .tabs_item li.content .title1 {
    height: auto !important;
    min-height: 35px !important;
  }
  .tabs_item li.content .title1 p {
    height: auto !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
  }
  .tabs_item li.content div[style*="background: #F29919"],
  .tabs_item li.content div[style*="background:#F29919"] {
    font-size: 13px !important;
  }

  /* ===== 产品卡片内部固定高度修复 ===== */
  .tabs_item li.content div[style*="height:230px"],
  .tabs_item li.content div[style*="height:280px"] {
    height: auto !important;
    min-height: 0 !important;
  }
  .tabs_item li.content .title1 .tags {
    height: auto !important;
    overflow: visible !important;
  }
  .tabs_item li.content .title1 .tags p {
    height: auto !important;
    overflow: visible !important;
    white-space: normal !important;
  }

  /* ===== Footer 手机适配 ===== */
  .footer_back {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    margin-bottom: 55px !important;
  }
  .footer_inner {
    padding: 25px 15px 20px !important;
    max-width: 100% !important;
  }
  .footer_top {
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }
  .footer_qrcodes {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }
  .footer_qr_item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: left !important;
  }
  .footer_qr_item img {
    width: 80px !important;
    height: 80px !important;
    flex-shrink: 0 !important;
  }
  .footer_qr_item span {
    font-size: 13px !important;
    color: #fff !important;
    white-space: nowrap !important;
  }
  .footer_links {
    text-align: center !important;
    padding-top: 5px !important;
  }
  .footer_links a {
    font-size: 13px !important;
    display: inline-block !important;
    margin: 0 5px !important;
  }
  .footer_sep {
    display: inline !important;
    color: rgba(255,255,255,0.4) !important;
    margin: 0 3px !important;
  }
  .footer_divider {
    width: 80% !important;
    margin: 20px auto 15px !important;
  }
  .footer_bottom {
    text-align: center !important;
  }
  .footer_bottom p {
    font-size: 12px !important;
    line-height: 2 !important;
    margin: 0 !important;
    word-break: break-all !important;
  }

  /* ===== 返回顶部 ===== */
  #roll_top {
    right: 10px !important;
    bottom: 65px !important;
    z-index: 9997 !important;
  }
  #roll_top img {
    width: 35px !important;
    height: auto !important;
  }

  /* ===== 弹窗遮罩 ===== */
  .a, .aa, .aaa, .aaaa {
    width: 100% !important;
  }

  /* ===== 表格 ===== */
  .table {
    font-size: 11px !important;
  }
  .table td {
    padding: 2px 4px !important;
  }

  /* ===== 浮动联系栏适配 ===== */
  .mobile-contact-bar {
    z-index: 9998 !important;
  }
}

/* --- 小屏手机 (< 480px) --- */
@media screen and (max-width: 480px) {
  .menus .nav li a {
    padding: 0 10px !important;
    font-size: 12px !important;
  }
  h1 {
    font-size: 15px !important;
  }
  .banner-box .bd img {
    max-height: 160px !important;
  }
  .tabs_item li.content {
    width: 100% !important;
  }
  .footer_inner {
    padding: 15px 10px 10px !important;
  }
  .footer_qrcodes {
    gap: 15px !important;
  }
  .footer_qr_item img {
    width: 80px !important;
    height: 80px !important;
  }
  .footer_bottom p {
    font-size: 10px !important;
  }
  /* 隐藏底部公众号二维码 - 放在最后确保不被覆盖 */
  .footer_qrcodes,
  .footer_qr_item,
  .footer_qr_item img,
  .footer_qr_item span {
    display: none !important;
  }
}