/* WorryFree Pay — 手机端全站自适应（禁止左右滑动） */

@media (max-width: 1024px) {
  html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  body.wfp-page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: pan-y pinch-zoom;
    position: relative;
  }

  body.wfp-page > .wfp-page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .wfp-header,
  .wfp-main,
  .wfp-prod-main,
  .wfp-footer,
  .wfp-rp,
  main[class^="wfp-"],
  section,
  .wfp-section,
  .wfp-section__inner,
  .wfp-section__inner--wide {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .wfp-main,
  .wfp-rp,
  .wfp-hero,
  .wfp-section {
    overflow-x: hidden;
  }

  .wfp-grid--2,
  .wfp-grid--3,
  .wfp-grid--4,
  .wfp-grid--6,
  .wfp-arch__layers,
  .wfp-products__layout,
  .wfp-rp-cards__layout,
  .wfp-rp-feature__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .wfp-grid--4,
  .wfp-grid--6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 宣传图满宽 */
  .wfp-promo-banner {
    padding-left: 10px;
    padding-right: 10px;
  }

  .wfp-promo-banner__inner,
  .wfp-promo-banner__frame {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .wfp-promo-banner__frame img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .wfp-hero__inner {
    width: 100%;
    max-width: 100%;
    padding-left: 14px;
    padding-right: 14px;
    box-sizing: border-box;
  }

  .wfp-hero__visual {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
  }

  /* 首页有顶部宣传图：手机端隐藏 Hero 右侧整块（避免重复 + 撑宽） */
  .wfp-main > .wfp-promo-banner + .wfp-hero .wfp-hero__visual {
    display: none;
  }

  .wfp-main > .wfp-promo-banner + .wfp-hero .wfp-hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .wfp-hero-card__main,
  .wfp-hero-card__main:hover {
    width: 100%;
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
    transform: none !important;
  }

  .wfp-hero-card__sub {
    display: none !important;
    margin-left: 0 !important;
    transform: none !important;
  }

  .wfp-media-frame,
  .wfp-media-frame--poster,
  .wfp-media-frame--card {
    width: 100%;
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
  }

  .wfp-media-frame--card img,
  .wfp-hero-card__main img {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center;
  }

  .wfp-flow,
  .wfp-live-stats {
    width: 100%;
    max-width: 100%;
  }

  /* 3D 卡面动画取消，避免撑出横向滚动 */
  .wfp-card-3d__inner {
    animation: none !important;
    transform: none !important;
  }

  .wfp-arch__layer::after {
    display: none;
  }

  /* 对比表只在容器内横滑，不带动整页 */
  .wfp-compare-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .wfp-compare {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 14px;
  }

  .wfp-compare th,
  .wfp-compare td {
    padding: 10px 8px;
    word-break: break-word;
  }

  /* 跑马灯：严格裁剪 */
  .wfp-rp-benefits {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }

  .wfp-rp-benefits__track-wrap {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }

  .wfp-rp-benefits__track {
    max-width: none;
  }

  .wfp-rp-hero-strip {
    padding-left: 10px;
    padding-right: 10px;
    overflow: hidden;
  }

  .wfp-rp-hero-strip img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .wfp-rp-phone__glow {
    inset: 0;
  }

  .wfp-detail-hero {
    min-height: auto;
    padding-left: 14px;
    padding-right: 14px;
  }

  .wfp-detail-hero__card-wrap .wfp-media-frame {
    width: 100% !important;
    max-width: 100% !important;
    animation: none !important;
    transform: none !important;
  }

  .wfp-prod-hero__cards {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto 24px;
    perspective: none;
  }

  .wfp-prod-hero__card {
    position: relative;
    left: auto !important;
    margin-left: 0 !important;
    width: min(100%, 320px);
    margin: 0 auto 16px;
    transform: none !important;
    animation: none !important;
  }

  .wfp-prod-hero__content {
    max-width: 100%;
    padding-top: 40px;
    padding-left: 14px;
    padding-right: 14px;
  }

  /* 产品中心：有顶部宣传图时去重叠 */
  .wfp-prod-main > .wfp-promo-banner + .wfp-prod-hero {
    min-height: auto;
    display: block;
    padding-bottom: 40px;
  }

  .wfp-prod-main > .wfp-promo-banner + .wfp-prod-hero .wfp-prod-hero__cards {
    display: none !important;
  }

  .wfp-prod-main > .wfp-promo-banner + .wfp-prod-hero .wfp-prod-hero__tagline,
  .wfp-prod-main > .wfp-promo-banner + .wfp-prod-hero .wfp-brand-duo--hero {
    display: none !important;
  }

  .wfp-prod-main > .wfp-promo-banner + .wfp-prod-hero .wfp-prod-hero__desc:first-of-type {
    display: none;
  }

  .wfp-prod-main > .wfp-promo-banner + .wfp-prod-hero .wfp-prod-hero__content {
    padding-top: 20px;
    text-align: left;
  }

  .wfp-prod-hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  .wfp-prod-hero__content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .wfp-prod-hero__title {
    font-size: clamp(32px, 8.5vw, 48px);
  }

  .wfp-prod-hero__subtitle {
    font-size: clamp(22px, 6vw, 32px);
    margin-bottom: 16px;
  }

  .wfp-prod-hero__desc,
  .wfp-prod-hero__quote {
    max-width: 100%;
    font-size: 16px;
  }

  /* Privacy Visa 详情：宣传图下隐藏重复卡面 */
  .wfp-prod-main > .wfp-promo-banner + .wfp-detail-hero .wfp-detail-hero__card-wrap,
  .wfp-prod-main > .wfp-promo-banner + .wfp-detail-hero .wfp-brand-duo--hero {
    display: none !important;
  }

  .wfp-prod-main > .wfp-promo-banner + .wfp-detail-hero {
    padding-top: 16px;
  }

  /* 首页宣传图已含品牌语，隐藏重复 pill */
  .wfp-main > .wfp-promo-banner + .wfp-hero .wfp-brand-duo--hero {
    display: none !important;
  }

  picture,
  picture img {
    max-width: 100%;
  }

  /* 双卡 CTA：禁止并排撑破屏宽 */
  .wfp-dual-cta,
  .wfp-dual-cta__inner {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .wfp-dual-cta__inner {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .wfp-two-cards__grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  /* Header：单行布局，左侧裁剪区防与下载按钮重叠 */
  .wfp-header__shell,
  .wfp-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .wfp-header .wfp-logo {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .wfp-header .wfp-logo__brand {
    flex-direction: row;
    align-items: center;
    min-width: 0;
    max-width: 100%;
  }

  .wfp-header .wfp-logo__sub--hero {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .wfp-header__actions {
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .wfp-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .wfp-hero {
    min-height: auto;
  }

  .wfp-hero__inner {
    padding-top: 24px;
    padding-bottom: 40px;
    gap: 24px;
  }

  .wfp-hero__content {
    width: 100%;
    min-width: 0;
  }

  .wfp-hero__title {
    font-size: clamp(32px, 8.8vw, 46px);
    overflow-wrap: anywhere;
  }

  .wfp-hero__sub,
  .wfp-hero__sub--2 {
    max-width: 100%;
    font-size: 16px;
  }

  .wfp-hero__cta {
    width: 100%;
  }

  .wfp-hero__cta .wfp-btn {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .wfp-brand-duo--hero {
    flex-wrap: wrap;
    justify-content: flex-start !important;
  }

  .wfp-grid--4,
  .wfp-grid--6 {
    grid-template-columns: minmax(0, 1fr);
  }

  .wfp-rp-cards,
  .wfp-rp-feature,
  .wfp-rp-trust,
  .wfp-rp-logos,
  .wfp-rp-voices,
  .wfp-rp-app {
    padding-left: 12px;
    padding-right: 12px;
  }

  .wfp-rp-benefit {
    flex: 0 0 min(260px, 78vw);
  }
}
