/* =============================================================
   MOBILE 修复（2026-11-23 22:00）
   ① 抽屉菜单链接补齐后的样式：每行 ≥44、分组标题、View all
   ② 导航顺序：logo 左 → (sign in / cart / 汉堡) 右，对标 keeps.com 390
   ③ Place order 全宽
   ④ 抽屉 upsell 加号 44×44
   ⑤ 页脚链接点击区 ≥32
   ============================================================= */
@media (max-width: 900px) {
  /* ② 导航顺序 */
  .kp-nav { display: flex; align-items: center; }
  .kp-nav__logo { order: 1; }
  .kp-nav__right { order: 2; position: static; margin-left: auto; display: flex; align-items: center; gap: 12px; }
  .kp-nav__burger { order: 3; margin: 0 0 0 12px; width: 44px; height: 44px; }

  /* ① 抽屉链接 */
  .kp-drawer__nav details { border-bottom: 1px solid var(--kp-line); }
  .kp-drawer__nav summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 0 20px;
    font-size: 12px;
    line-height: 18px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
  }
  .kp-drawer__nav summary::-webkit-details-marker { display: none; }
  .kp-drawer__nav summary::after {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 1.5px solid var(--kp-ink);
    border-bottom: 1.5px solid var(--kp-ink);
    transform: rotate(45deg);
    transition: transform .18s ease;
  }
  .kp-drawer__nav details[open] summary::after { transform: rotate(-135deg); }

  .kp-drawer__group { padding: 0 20px 12px; }
  .kp-drawer__all {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 15px;
    line-height: 22px;
    font-weight: 700;
    color: var(--kp-ink);
    text-decoration: underline;
  }
  .kp-drawer__title {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 18px;
    font-weight: 300;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--kp-gray-dark);
  }
  .kp-drawer__nav ul { list-style: none; margin: 0; padding: 0; }
  .kp-drawer__nav li a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 6px 0;
    font-size: 16px;
    line-height: 24px;
    color: var(--kp-ink);
    text-decoration: none;
  }
  .kp-drawer__label { flex: 1 1 auto; }
  .kp-drawer__nav li a .kp-mega__new { flex: 0 0 auto; }
  .kp-drawer__nav li + li { border-top: 1px solid rgba(0, 0, 0, .06); }

  /* ③ Place order 全宽 */
  .woocommerce #place_order,
  .woocommerce-checkout #place_order {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
  }
  .woocommerce-checkout #order_review,
  .woocommerce-checkout .woocommerce-checkout-payment { width: 100%; }
  .woocommerce-checkout .place-order,
  .woocommerce-checkout #place_order { margin: 0 !important; }
  .woocommerce-checkout .place-order { padding: 0 !important; }
  .woocommerce-checkout .woocommerce-checkout-payment .place-order { width: 100%; }

  /* ④ 抽屉 upsell 加号 */
  .kp-upsell__add,
  .kp-cartpanel__rec + .kp-upsell .kp-upsell__add,
  button[data-kp-upsell] {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ⑤ 页脚链接点击区 */
  .kp-footer__col a,
  .kp-footer__links a,
  .kp-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 0;
  }
  .kp-footer__legal a { min-height: 32px; padding: 6px 0; }
}

/* ==== MOBILE-OWNER: mobile-audit 追加（2026-11-23）：可点区域 ≥44 + 按压反馈 + 交易控件 ==== */
@media (max-width: 480px) {
  .kp-banner__link { display: inline-flex; align-items: center; min-height: 44px; }
  .kp-nav__logo { display: inline-flex; align-items: center; min-height: 44px; }
  .kp-footer a[href], .kp-footer__legal a[href] { display: inline-flex; align-items: center; min-height: 44px !important; }
  a[href^="tel:"], a[href^="mailto:"], a[href*="/contact"], a[href*="privacy"],
  a[href*="refund"], a[href*="shipping"], a[href*="terms"] { display: inline-flex; align-items: center; min-height: 44px !important; }
  a, button, [role="button"], summary, input[type="submit"] { touch-action: manipulation; }
  .kp-btn:active, .kp-hero__cta:active, .kp-cartpanel__checkout:active, .kp-nav__burger:active,
  .kp-nav__cart:active, .kp-nav__signin:active, .kp-pdp__cta:active,
  .kp-drawer__nav summary:active, .kp-footer a:active, #place_order:active { opacity: .8; }
  input.qty { min-height: 44px; width: 56px; }
  .woocommerce-checkout input.input-text, .woocommerce-checkout select,
  .woocommerce-checkout textarea { min-height: 44px; }
  #place_order { width: 100%; min-height: 48px; }
}
/* ==== MOBILE-OWNER: mobile-audit 追加 v2（2026-11-23）：hero 卖点与 CTA 防重叠 ==== */
/* 现象：.kp-hero__bullets li 写死 height:40px，卖点文案换行（iOS 字体更宽/360 视口）时文字溢出 40px 盒子，
   行与行互相压字，最后一行可一直压到红色 CTA 上（用户截图）。
   对标 keeps.com 390 实测：卖点整块 356..468（3 行 112px），与 CTA 间距 36.19px，CTA 高 60。 */
@media (max-width: 480px) {
  .kp-hero__bullets li { height: auto; min-height: 40px; }
  .kp-hero__cta { margin-top: 36px; }
  .kp-hero { height: auto; min-height: 792.297px; }
}

/* ==== MOBILE-OWNER: mobile-audit 追加 v4（2026-11-24）：PDP 五处断点微调（仅 ≤480） ====
   对标实测（keeps.com 390）：steps 748 / rx 929 / faq 1117 / note 153 / 整页 8443
   我们（改前）：steps 675 / rx 869 / faq 1230 / note 210 / 整页 8670（+2.69%）
   为什么用 !important：这些间距规则在 pdp-blocks.css 里也有定义，而它在本文件之后加载，同特异性会覆盖；
   本文件是手机端唯一归属文件，故对本区块内的间距属性统一加 !important（仅 ≤480px 生效）。 */
@media (max-width: 480px) {
  /* ① When hair loss：图改全宽（对标 390×166）+ 上下留白 */
  .kp-pdpsteps__img { width: calc(100% + 40px) !important; max-width: none !important;
    margin-left: -20px !important; margin-right: -20px !important; height: auto !important; margin-bottom: 68px !important; }
  .kp-pdpsteps__inner { padding-top: 130px !important; padding-bottom: 150px !important; }

  /* ② Prescription：图宽自适应后的文案间距重排（对标节奏 pad 44/24、图上下 36、行高 30） */
  .kp-pdprx__inner { padding-top: 44px !important; padding-bottom: 12px !important; }
  .kp-pdprx__img { margin-top: 36px !important; margin-bottom: 36px !important; }
  .kp-pdprx__title { margin-bottom: 16px !important; }
  .kp-pdprx__text { font-size: 20px !important; line-height: 30px !important; }

  /* ③ FAQ：11 条展开态 padding 收敛 16→12，区块留白 76/80→48/52 */
  .kp-pdffaq__inner { padding-top: 48px !important; padding-bottom: 52px !important; }
  .kp-pdffaq__title { margin-bottom: 24px !important; }
  .kp-pdffaq summary { padding-top: 12px !important; padding-bottom: 12px !important; }

  /* ④ 免责声明：28/24 → 16/16，段间距 7→4 */
  .kp-pdfnote__inner { padding-top: 4px !important; padding-bottom: 4px !important; }
  .kp-pdfnote__inner p { margin-bottom: 2px !important; }
}
/* ==== MOBILE-OWNER: mobile-audit 追加 v5（2026-11-24）：/faq/ 页 390 对齐对标 ====
   对标 keeps.com/faq 390 实测：整页 3062；分类卡 2 列 155×97（pad 10、gap 20）；网格宽 330
   我们改前：整页 3443；分类卡 2 列 165×140（pad 0 18、gap 20）；网格宽 350 */
@media (max-width: 480px) {
  /* ① 分类卡：140 → 97（对标），列宽 165 → 155（网格两侧各加 10px） */
  .kp-faqhelp__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px !important; padding: 0 10px !important; }
  .kp-faqhelp__card { height: 97px !important; padding: 10px !important; }

  /* ② 四段纵向留白按对标收紧（合计 −153） */
  .kp-faqhero__inner { padding-top: 100px !important; padding-bottom: 100px !important; }
  .kp-faqhelp__inner { padding-top: 25px !important; padding-bottom: 60px !important; }
  .kp-faqlist__inner { padding-bottom: 40px !important; }
  .kp-faqlist h2 { margin-bottom: 32px !important; }
  .kp-faqsupport__inner { padding-top: 50px !important; padding-bottom: 50px !important; }
  .kp-faqsupport h2 { margin-bottom: 20px !important; }
}
/* 360 及更窄：分类卡文字会换行，97px 固定高会裁字 → 自适应（min-height 保底） */
@media (max-width: 380px) {
  .kp-faqhelp__card { height: auto !important; min-height: 97px !important; padding: 8px !important; }
}

/* rx 列宽 350 → 342（对标 keeps.com 同段列宽 342，避免每行多 2 字符导致断行差） */
@media (max-width: 480px) {
  .kp-pdprx__img, .kp-pdprx__body { width: min(342px, 100%) !important; max-width: 100% !important; margin-left: auto !important; margin-right: auto !important; }
}
