/* 默认隐藏（桌面端） */
.vanvc-bnav { display: none; }

/* 页面过渡遮罩（无感切换） */
.vanvc-pagefx {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 99998; /* 低于bnav(99999)，高于页面内容 */
}

/* 进入/离开动画状态（由JS控制） */
html.vanvc-nav-leaving .vanvc-pagefx { opacity: 1; }
html.vanvc-nav-entering .vanvc-pagefx { opacity: 0; }

/* 手机端显示 */
@media (max-width: 768px) {
  :root { --vanvc-bnav-h: 64px; }

  /* 只在实际有底部导航的页面启用留白（由 body_class 控制） */
  body.vanvc-has-bnav .site-content,
  body.vanvc-has-bnav .site-main,
  body.vanvc-has-bnav #content,
  body.vanvc-has-bnav #primary,
  body.vanvc-has-bnav .content-area,
  body.vanvc-has-bnav .entry-content,
  body.vanvc-has-bnav .woocommerce,
  body.vanvc-has-bnav .woocommerce-page {
    /*padding-bottom: calc(var(--vanvc-bnav-h) + env(safe-area-inset-bottom));*/
    padding-bottom: 20px;
  }

  /* 避免某些模板被 body padding-bottom 影响布局：明确不使用 body padding-bottom */
  body { padding-bottom: 0 !important; }

  .vanvc-bnav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--vanvc-bnav-h);
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.08);
    z-index: 99999;
    width: 100vw;
    overflow: hidden;
  }

  .vanvc-bnav__item {
    flex: 1;
    text-decoration: none;
    color: rgba(0,0,0,.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }

  .vanvc-bnav__icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
  }

  .vanvc-bnav__text {
    font-size: 12px;
    line-height: 1;
  }

  .vanvc-bnav__item.is-active {
    color: #111;
    font-weight: 600;
  }

  .vanvc-bnav__cart { position: relative; }

  .vanvc-bnav__badge {
    position: absolute;
    top: 8px;
    left: 52%;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
  }

  /* 0 时隐藏（可选，不要隐藏就删掉这段） */
  .vanvc-bnav__badge.is-zero { display: none; }
  
    .bottom-footer{
        margin-bottom: var(--vanvc-bnav-h);
    }
}

@media (prefers-reduced-motion: reduce) {
  .vanvc-pagefx { transition: none; }
}
