/* =========================
   Footer 整体
   ========================= */
#site_footer {
  border-top: 1px solid rgba(148, 163, 184, 0.26);
  color: rgba(15, 23, 42, 0.8);
  font-size: 13px;
}

/* 主布局：左大右小，两列  */
#site_footer .inner {
  width: min(1410px, 100% - 80px);
  margin: 0 auto;
  padding: 32px 0 28px;
  display: grid;
  grid-template-areas:
    "payments sns"
    "nav      app"
    "copyright app";
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 1.1fr);
  row-gap: 24px;
  column-gap: 56px;
  align-items: flex-start;
  box-sizing: border-box;
}

/* =========================
   支付方式行
   ========================= */
#footer_payments_wrp {
  grid-area: payments;
  display: flex;
  align-items: center;
}

#footer_payments_wrp .channel_list {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

#footer_payments_wrp .logo {
  width: 56px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#footer_payments_wrp .logo img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

/* =========================
   右上：随时关注我们 + 圆形按钮（放大版）
   ========================= */
#footer_sns_wrp {
  grid-area: sns;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  font-size: 14px;
  color: #6b7280;
}

#footer_sns_wrp h3 {
  margin: 0;
  font-weight: 500;
}

#footer_sns {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 圆形社交按钮：比之前更大一圈 */
.sns-btn {
  --sns-size: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--sns-size);
  height: var(--sns-size);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  font-size: 18px;
  color: #4b5563;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.sns-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.3);
  color: #2563eb;
}

/* =========================
   左下：导航组（间距减半）
   ========================= */
#footer_nav_wrp {
  grid-area: nav;
}

#footer_nav {
  display: flex;
  flex-wrap: wrap;
  /* 间距比原来小一倍左右 */
  column-gap: 36px;
  row-gap: 18px;
}

#footer_nav .group {
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#footer_nav .title {
  margin-bottom: 4px;
  color: rgba(107, 114, 128, 0.95);
  font-size: 13px;
}

#footer_nav .title span {
  font-weight: 500;
}

#footer_nav .link {
  color: rgba(15, 23, 42, 0.8);
  text-decoration: none;
  font-size: 13px;
  transition: color 150ms ease;
}

#footer_nav .link:hover {
  color: #2563eb;
}

/* =========================
   右下：APP 下载卡片
   ========================= */
#footer_app {
  grid-area: app;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

#footer_app .download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 360px;
  max-width: 420px;
  padding: 18px 26px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff6b3d, #ff3b6a);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 22px 50px rgba(248, 113, 113, 0.45);
  position: relative;
  overflow: hidden;
}

#footer_app .download::after {
  content: "↗";
  font-size: 20px;
  opacity: 0.9;
}

#footer_app .text > div {
  font-size: 16px;
  font-weight: 700;
}

#footer_app .text > i {
  font-style: normal;
  font-size: 13px;
  opacity: 0.8;
}

/* =========================
   最底部版权
   ========================= */
#footer_copyright {
  grid-area: copyright;
  display: flex;
  align-items: center;
  gap: 16px;
  color: rgba(107, 114, 128, 0.9);
  font-size: 12px;
}

.footer-logo {
  font-weight: 800;
  letter-spacing: 0.28em;
  font-size: 14px;
}

/* =========================
   响应式
   ========================= */
@media (max-width: 1024px) {
  #site_footer .inner {
    width: min(100% - 32px, 100%);
    padding: 24px 16px 24px;
    grid-template-areas:
      "payments"
      "sns"
      "app"
      "nav"
      "copyright";
    grid-template-columns: 1fr;
    row-gap: 20px;
  }

  #footer_sns_wrp,
  #footer_app {
    justify-content: flex-start;
  }

  #footer_nav {
    column-gap: 28px;
  }
}

@media (max-width: 640px) {
  #footer_app .download {
    min-width: 0;
    width: 100%;
  }

  #footer_payments_wrp .channel_list {
    gap: 10px;
  }

  .sns-btn {
    --sns-size: 40px;
    font-size: 16px;
  }
}



/* =========================================================
   Mobile Bottom TabBar
   - 手机端：隐藏 PC footer
   - 固定底部菜单（含 iPhone 安全区）
   ========================================================= */
@media (max-width: 768px){

  /* ✅ 手机端不需要 PC footer：直接隐藏 */
  #site_footer{
    display: none !important;
  }

  /* ✅ 给页面底部留空间，避免内容被 TabBar 挡住 */
  body{
    padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important;
  }

  /* TabBar 外壳 */
  #mobile_tabbar{
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    height: 58px;

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;

    border-radius: 18px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(15,23,42,.08);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
  }

  /* 单个 Tab */
  #mobile_tabbar .mb-tab{
    height: 58px;
    display: grid;
    place-items: center;
    gap: 2px;

    text-decoration: none;
    color: rgba(15,23,42,.62);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }

  #mobile_tabbar .mb-tab .material-icons{
    font-size: 22px;
    line-height: 1;
    opacity: .95;
  }

  #mobile_tabbar .mb-tab em{
    font-style: normal;
    font-size: 11px;
    font-weight: 500; /* ✅ 不要粗 */
    letter-spacing: 0;
    transform: translateY(-1px);
  }

  /* 激活态（更克制，不用粗黑） */
  #mobile_tabbar .mb-tab.is-active{
    color: #2563eb;
  }
  #mobile_tabbar .mb-tab.is-active .material-icons{
    transform: translateY(-1px);
  }
}

/* 桌面端默认隐藏 TabBar */
@media (min-width: 769px){
  #mobile_tabbar{ display: none !important; }
}
/* =========================================================
   Mobile Bottom TabBar (4 tabs)
   - 手机端：隐藏 PC footer
   - 固定底部菜单：不遮挡页面内容（#page_main 增加底部安全区）
   ========================================================= */

:root{
  --fm-mbbar-h: 62px;
  --fm-mbbar-side: 12px;
  --fm-mbbar-gap: 10px; /* 距离屏幕底部的外边距 */
}

@media (max-width: 768px){

  /* ✅ 手机端不展示 PC Footer */
  #site_footer{ display:none !important; }

  /* ✅ 核心：所有页面主体都给底部留空间，彻底解决“被底栏盖住” */
  #page_main{
    padding-bottom: calc(var(--fm-mbbar-h) + var(--fm-mbbar-gap) + env(safe-area-inset-bottom)) !important;
  }

  /* 底栏容器 */
  #mobile_tabbar{
    position: fixed;
    left: var(--fm-mbbar-side);
    right: var(--fm-mbbar-side);
    bottom: calc(var(--fm-mbbar-gap) + env(safe-area-inset-bottom));
    height: var(--fm-mbbar-h);

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;

    border-radius: 18px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(15,23,42,.08);
    box-shadow: 0 14px 34px rgba(15,23,42,.12);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
  }

  /* 单个 Tab：中文更舒服（不粗） */
  #mobile_tabbar .mb-tab{
    height: var(--fm-mbbar-h);
    display: grid;
    grid-template-rows: 26px 16px;
    place-items: center;
    gap: 2px;

    text-decoration: none;
    color: rgba(15,23,42,.55);
    -webkit-tap-highlight-color: transparent;
    user-select: none;

    border-radius: 14px;
    margin: 6px 6px; /* 让每个 tab 自己有一点“呼吸” */
    transition: transform 120ms ease, background-color 120ms ease, color 120ms ease;
  }

  #mobile_tabbar .mb-tab:active{
    transform: scale(.98);
  }

  #mobile_tabbar .mb-tab .material-icons{
    font-size: 22px;
    line-height: 1;
    opacity: .92;
  }

  #mobile_tabbar .mb-tab em{
    font-style: normal;
    font-size: 11px;
    font-weight: 500; /* ✅ 不要粗 */
    letter-spacing: 0;
    line-height: 1;
  }

  /* 激活态：更“App”一点，但不俗 */
  #mobile_tabbar .mb-tab.is-active{
    color: #2563eb;
    background: rgba(37,99,235,.08);
  }

  /* 激活态小指示点 */
  #mobile_tabbar .mb-tab.is-active em{
    position: relative;
  }
  #mobile_tabbar .mb-tab.is-active em::after{
    content:"";
    position:absolute;
    left:50%;
    bottom:-6px;
    width: 14px;
    height: 3px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(37,99,235,.85);
    box-shadow: 0 10px 18px rgba(37,99,235,.18);
  }
}

@media (min-width: 769px){
  #mobile_tabbar{ display:none !important; }
}
@media (max-width: 768px){
  #fm_chat_widget_wrap{ display:none !important; }
}
/* ===== Mobile TabBar 微调：贴底 + 更小 ===== */
:root{
  --fm-mbbar-h: 56px;         /* 原 62 -> 56 */
  --fm-mbbar-side: 12px;
  --fm-mbbar-gap: 0px;        /* ✅ 原 10 -> 0：去掉底部空隙 */
}

@media (max-width: 768px){

  /* ✅ 内容区底部安全距离也跟着变小 */
  #page_main{
    padding-bottom: calc(var(--fm-mbbar-h) + var(--fm-mbbar-gap) + env(safe-area-inset-bottom)) !important;
  }

  /* ✅ 贴底（把 gap 去掉） */
  #mobile_tabbar{
    bottom: env(safe-area-inset-bottom) !important; /* 原来是 gap + safe-area */
    height: var(--fm-mbbar-h) !important;
    border-radius: 16px !important;                 /* 稍微小一点更利落 */
  }

  /* ✅ 每个 tab 更紧凑 */
  #mobile_tabbar .mb-tab{
    height: var(--fm-mbbar-h) !important;
    grid-template-rows: 24px 14px !important;
    gap: 1px !important;
    margin: 5px 5px !important;                     /* 原 6 6 -> 5 5 */
    border-radius: 12px !important;
  }

  /* ✅ 图标更小 */
  #mobile_tabbar .mb-tab .material-icons{
    font-size: 20px !important;                     /* 原 22 -> 20 */
  }

  /* ✅ 字更小、更细 */
  #mobile_tabbar .mb-tab em{
    font-size: 10.5px !important;                   /* 原 11 -> 10.5 */
    font-weight: 500 !important;
  }

  /* ✅ 激活态小指示条也缩小一点 */
  #mobile_tabbar .mb-tab.is-active em::after{
    width: 12px !important;
    height: 3px !important;
    bottom: -5px !important;
  }
}
