/* =========================================================
   H5 预览层：只做「浏览器里能看」的适配，不改小程序样式
   ========================================================= */

/* ---------- 申请页头部：金色品牌条 + 左图右按钮 ---------- */
.apply-hero__row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  min-height: 95px;
}

.apply-hero__mascot {
  position: static !important;
  right: auto !important;
  bottom: auto !important;
  width: 95px !important;
  height: 95px !important;
  margin-left: -8px;
  flex: none;
}

.apply-hero__cta {
  margin-left: auto !important;
  margin-top: 0 !important;
}

.apply-hero__tip {
  display: none !important;
}

/* 加盟政策页标题字体（方案 B：华文细黑） */
@font-face {
  font-family: 'XiHeiDemo';
  src: url('/assets/fonts/STXIHEI.ttf') format('truetype');
  font-display: swap;
}

.psec__title,
.phead__label,
.phead__amount,
.ptab__text {
  font-family: 'XiHeiDemo', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #eef1f5;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 手机屏容器：桌面端居中，移动端铺满 */
.h5-screen {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
  overflow-x: hidden;
  box-shadow: 0 0 40px rgba(17, 24, 39, 0.08);
}

/* 固定底栏在居中容器内 */
.tabbar,
.ctb,
.cart-bar,
.join-bar {
  max-width: 430px;
  width: 100%;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
}

/* 隐藏态：确保 display 被覆盖 */
[hidden] {
  display: none !important;
}

/* 顶部左上角品牌条（H5 无状态栏，固定 22px） */
.brand-bar {
  top: 22px !important;
}

/* 首页招募艺术字：品牌条下方、人物上方 */
.home__art {
  position: absolute;
  left: 50%;
  top: 92px;
  transform: translateX(-50%);
  width: 300px;
  height: auto;
  z-index: 6;
  pointer-events: none;
}

/* ---------------- 右下角「电话 / 客服」悬浮条 ---------------- */
.cfab {
  position: fixed;
  right: 12px;
  bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  width: 48px;
  padding: 17px 0 15px;
  border-radius: 24px;
  background: linear-gradient(180deg, #5581ea 0%, #2e5bd4 100%);
  box-shadow: 0 6px 15px rgba(18, 44, 110, 0.32);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 35;
}

.cfab__item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.cfab__item:active {
  opacity: 0.74;
}

.cfab__icon {
  width: 19px;
  height: 19px;
}

.cfab__label {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  letter-spacing: 0.5px;
}

.cfab__split {
  width: 17px;
  height: 1px;
  margin: 13px 0;
  background: rgba(255, 255, 255, 0.3);
}

/* ---------------- 底部三个胶囊按钮（H5 复刻自定义 tabBar） ---------------- */
.ctb {
  position: fixed;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  box-shadow: 0 -3px 12px rgba(16, 32, 80, 0.08);
}

.ctb__btn {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #1c3fb8;
  background: #fff;
  color: #1c3fb8;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-decoration: none;
}

.ctb__btn--primary {
  background: #1c3fb8;
  border-color: #1c3fb8;
  color: #fff;
}

.ctb__btn:active {
  opacity: 0.86;
}

.h5-screen.has-tab {
  padding-bottom: calc(54px + env(safe-area-inset-bottom, 0px));
}

/* ---------------- 原生 tabBar 的 H5 复刻 ---------------- */
.tabbar {
  position: fixed;
  bottom: 0;
  z-index: 40;
  display: flex;
  height: 52px;
  background: #fff;
  border-top: 1px solid #eceff3;
}

.tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: #9aa3af;
}

.tabbar__item img {
  width: 22px;
  height: 22px;
}

.tabbar__item.is-active {
  color: #14181f;
}

.h5-screen.has-tab {
  padding-bottom: 52px;
}

/* ---------------- 顶部返回栏（H5 用，小程序里是原生导航） ---------------- */
.h5-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid #eceff3;
}

.h5-nav__back {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #14181f;
  text-decoration: none;
  font-size: 22px;
  line-height: 1;
}

.h5-nav__title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #14181f;
  margin-right: 28px;
}

/* ---------------- 轮播 ---------------- */
.hero__swiper {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.hero__slide {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero__slide.is-active {
  opacity: 1;
}

.hero__dot {
  display: inline-block;
}

/* ---------------- 点单页：H5 里改成整页滚动 ---------------- */
.page-menu {
  height: auto;
  display: block;
}

.menu-body {
  display: flex;
  min-height: calc(100vh - 190px);
  align-items: flex-start;
}

.cat,
.goods {
  height: auto;
}

.goods {
  padding-bottom: 130px;
}

/* 分类分组显隐 */
.goods-group[hidden] {
  display: none;
}

/* ---------------- 通用 ---------------- */
a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

input.field__input,
select.field__input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: inherit;
  text-align: right;
  width: 100%;
}

select.field__input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2px;
}

select.field__input option {
  color: #14181f;
}

.stepper__btn {
  cursor: pointer;
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* H5 里 tabBar 在页面内，首页 100vh 要减掉 tabBar 高度 */
.has-tab .page-hero {
  height: calc(100vh - 52px);
}

/* H5 里 tabBar 在页面内，悬浮加盟条要抬起来 */
.has-tab .quick-join {
  bottom: 66px;
}

/* 桌面浏览器是 1x 屏（真机 3x），品牌条适当放大，否则小字只剩 2~3 像素 */
.h5-screen .hero__logo {
  width: 300px;
  height: auto;
}

/* ---------------- 招商美天动态 ---------------- */
.feed__cover .feed__video {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.detail-video {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  border-radius: 12px;
  background: #000;
}

.page-news {
  background: linear-gradient(180deg, #fff7de 0%, #fffbef 42%, #ffffff 100%);
  min-height: 100%;
}

.news-tabs {
  overflow-x: auto;
}

/* ---------------- 加盟政策页：加盟流程图片轮播 ---------------- */
/* 外框高度由 JS 按当前图片比例设置，保证贴合、不留白 */
.pflow-slider {
  position: relative;
  height: 168px;
  overflow: hidden;
}

.pflow-slider .promo,
.pflow-slider .promo__track {
  width: 100%;
  height: 100%;
}

.pflow-slider .promo__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.pflow-slider .promo__img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.news-tab {
  cursor: pointer;
}

.feed__item {
  display: block;
}

/* ---------------- 客服中心 ---------------- */
.faq__item {
  cursor: pointer;
}

/* ---------------- H5 轻提示 ---------------- */
.h5-toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
  z-index: 99;
  max-width: 320px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 24, 31, 0.82);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.h5-toast.is-show {
  opacity: 1;
}

/* ---------------- 网点示意图（H5 用简化地图） ---------------- */
.h5-map {
  position: relative;
  height: 210px;
  margin: 12px;
  border-radius: 14px;
  background: linear-gradient(160deg, #e7eef7 0%, #dbe6f2 100%);
  overflow: hidden;
}

.h5-map::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(15, 139, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 139, 255, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}

.h5-map__pin {
  position: absolute;
  width: 22px;
  height: 28px;
  margin: -28px 0 0 -11px;
  background: url('/assets/img/marker.png') center/contain no-repeat;
}

.h5-map__label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  font-size: 11px;
  color: #6b7280;
}

/* ---------------- 首页整屏主视觉 ---------------- */
/* 手机浏览器地址栏会吃掉高度，优先用 dvh；再扣掉底栏 + iPhone 底部安全区 */
.has-tab .page-home {
  height: calc(100vh - 54px);
  height: calc(100dvh - 54px - env(safe-area-inset-bottom, 0px));
}

.page-home {
  background: #0a255c;
}

.page-home__bg {
  position: absolute;
  left: 0;
  bottom: 0;
  top: auto;
  width: 100%;
  height: auto;
  object-fit: initial;
}

/* iPhone 底部横条：底栏抬高，避免压住内容 */
.h5-screen.has-tab {
  padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
}

.tabbar {
  height: calc(52px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------------- 首页底部 1/4 轮播（H5 复刻 swiper） ---------------- */
.promo {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.promo__track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.promo__slide {
  flex: 0 0 100%;
  height: 100%;
  display: block;
}

.promo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 轮播圆点：蓝色，无底框 */
.promo__dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 5;
  pointer-events: none;
}

.promo__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa6b6;
  transition: width 0.25s ease, background 0.25s ease;
}

.promo__dot.is-active {
  width: 18px;
  border-radius: 4px;
  background: #1b4c8f;
}

/* =========================================================
   桌面端：按小程序真机尺寸（375×812）显示
   —— 宽度 750rpx = 375pt，高度按 iPhone X 逻辑像素
   ========================================================= */
@media (min-width: 520px) {
  html,
  body {
    height: 100%;
  }

  body {
    display: flex;
    background: #e6eaf1;
  }

  .h5-screen {
    width: 375px;
    max-width: 375px;
    height: 812px;
    min-height: 812px;
    margin: auto;
    border-radius: 32px;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow:
      0 0 0 10px #0f1626,
      0 0 0 12px #2a3547,
      0 30px 70px rgba(15, 23, 42, 0.35);
    -webkit-overflow-scrolling: touch;
  }

  /* 100vh 的页面块按机身高度算（812 - 54 底栏） */
  .h5-screen.has-tab .page-hero,
  .h5-screen .page-hero {
    height: 760px;
  }

  .h5-screen .page-home,
  .h5-screen.has-tab .page-home {
    height: 758px;
  }

  .h5-screen.has-tab {
    padding-bottom: 0;
  }

  /* 固定底栏贴在机身底部，而不是浏览器窗口底部 */
  .tabbar,
  .ctb,
  .cart-bar,
  .join-bar {
    left: 50% !important;
    right: auto !important;
    bottom: calc(50vh - 406px) !important;
    width: 375px;
    max-width: 375px;
    transform: translateX(-50%);
  }

  .tabbar,
  .ctb {
    border-radius: 0 0 32px 32px;
  }

  .ctb {
    padding-bottom: 5px;
  }

  /* 悬浮条也跟着进手机框：贴框右边、浮在框底栏之上 */
  .cfab {
    right: auto;
    left: calc(50% + 127.5px);
    bottom: calc(50vh - 336px);
  }
}


/* 无标题区块（图片轮播区）：满幅出血 */
.psec--plain {
  padding: 0;
  border-bottom: 0;
}

.psec--plain .pflow-slider {
  border-radius: 16px;
}

/* 加盟流程：叠层淡入淡出（无位移轨道，图片必然铺满） */
.pflow-slide {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.pflow-slide.is-on {
  opacity: 1;
  z-index: 2;
}

.pflow-slide__img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
