/* yike 会员端手机自适应 — 纯 CSS 覆盖，不改 JS/API */

@media (max-width: 768px) {
  html,
  body,
  #app {
    overflow-x: hidden;
    max-width: 100vw;
  }

  .homeBox {
    background-size: 100% auto !important;
    overflow-x: hidden;
  }

  /* 1200px 容器统一收窄 */
  .homeBox .contentBox,
  .homeBox .searchBox,
  .homeBox .header .headerBox > div,
  .homeBox .bannerBox,
  .homeBox .noticeBox,
  .homeBox .recomondBox,
  .homeBox .cb,
  .carBox,
  .noticeDetail,
  .orderDetail,
  .userBox,
  .globpadding {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .homeBox .padding,
  .globpadding {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* 顶栏链接 */
  .homeBox .header .headerBox > div {
    padding: 0 12px !important;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .homeBox .header .headerBox a {
    white-space: nowrap;
    font-size: 11px !important;
  }

  /* logo + 搜索 */
  .homeBox .searchBox {
    height: auto !important;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px !important;
  }

  .homeBox .searchBox > div:first-child img {
    height: 48px !important;
  }

  .homeBox .searchBox > div:last-child {
    width: 100% !important;
    flex-wrap: wrap;
    gap: 8px;
  }

  .homeBox .searchInput {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
  }

  .homeBox .searchBtn {
    flex: 1 1 auto;
    min-width: 72px;
  }

  /* 首页导航：横向滑动，避免裁切 */
  .homeBox .contentBox.navBox {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 8px 12px !important;
    gap: 8px;
    scrollbar-width: none;
  }

  .homeBox .contentBox.navBox::-webkit-scrollbar {
    display: none;
  }

  .homeBox .navBox .navItem,
  .homeBox .contentBox.navBox .navItem {
    width: auto !important;
    min-width: 72px;
    padding: 0 14px !important;
    flex: 0 0 auto;
    margin-right: 0 !important;
    font-size: 14px !important;
    height: 38px !important;
    line-height: 38px !important;
  }

  .homeBox .categoryBox {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    left: 12px !important;
    height: auto !important;
    max-height: 70vh;
  }

  /* 轮播 + 用户卡纵向堆叠 */
  .homeBox .bannerBox {
    height: auto !important;
    flex-direction: column !important;
    padding: 0 12px !important;
    gap: 12px;
  }

  .homeBox .bannerBox > div:first-child {
    width: 100% !important;
    height: 180px !important;
  }

  .homeBox .bannerBox > div:first-child .el-carousel,
  .homeBox .bannerBox > div:first-child .el-carousel__container {
    height: 180px !important;
  }

  .homeBox .bannerBox > div:last-child {
    width: 100% !important;
    padding: 12px !important;
    box-sizing: border-box;
  }

  .homeBox .bannerBox .orderMini {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-around !important;
  }

  .homeBox .bannerBox .navMini {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-around !important;
  }

  .homeBox .noticeBox {
    width: calc(100% - 24px) !important;
    margin: 12px auto 0 !important;
    padding: 0 12px !important;
    height: auto !important;
    min-height: 44px;
  }

  /* 商品区两列 */
  .homeBox .recomondBox {
    padding: 0 12px 24px !important;
  }

  .homeBox .goodBox .goodItem {
    width: calc(50% - 8px) !important;
    margin-right: 8px !important;
    min-height: auto !important;
  }

  .homeBox .goodBox .goodItem:nth-child(2n) {
    margin-right: 0 !important;
  }

  .homeBox .goodBox .goodItem:nth-child(6n) {
    margin-right: 8px !important;
  }

  .homeBox .goodBox .goodItem:nth-child(2n) {
    margin-right: 0 !important;
  }

  .homeBox .recomondBox .titleBox > div:last-child {
    padding: 0 16px !important;
  }

  .homeBox .recomondBox .titleBox > div:last-child > div:first-child {
    font-size: 20px !important;
  }

  /* 分类页 */
  .homeBox .categoryBox > div,
  .cb .categoryBox > div {
    margin-right: 8px !important;
    margin-bottom: 8px !important;
    height: auto !important;
    min-height: 36px;
    padding: 8px 10px !important;
  }

  /* 个人中心 */
  .userBox {
    flex-direction: column !important;
    padding: 12px !important;
  }

  .userBox > div:first-child,
  .userBox > div:last-child {
    width: 100% !important;
  }

  /* 登录页 */
  .loginBox {
    align-items: flex-start !important;
    padding: 12px 0 !important;
    min-height: 100vh;
    box-sizing: border-box;
  }

  .loginBox > div {
    width: 100% !important;
    flex-direction: column !important;
    padding: 0 12px !important;
    box-sizing: border-box;
  }

  .loginBox > div > div:first-child {
    width: 100% !important;
    padding-bottom: 20px !important;
    margin-bottom: 12px;
  }

  .loginBox > div > div:first-child .siteName {
    width: auto !important;
    font-size: 24px !important;
  }

  .loginBox > div > div:last-child {
    width: 100% !important;
    padding: 24px 16px 32px !important;
    box-sizing: border-box;
  }

  .loginBox > div > div:last-child .tabBox {
    margin-bottom: 32px !important;
  }

  .loginBox > div > div:last-child .tabBox > div {
    margin: 0 16px !important;
    font-size: 18px !important;
  }

  /* 验证码弹层 */
  .captchaPopover {
    max-width: calc(100vw - 24px) !important;
  }
}
