/* ============================================================
   阿君商城 首页改版覆盖层  2026-11-21
   只覆盖样式，不改 Vue 组件逻辑；新增节点全部由 wk-home.js 注入
   ============================================================ */

/* 0-1. 分类分页容器原本带 touch-action:pan-x，会连带禁掉该区域的双指缩放和纵向滚动。
   8 个分类已合并成一页（4×2），横向滑动用不上，恢复成正常触控。 */
body .mobile-categories__pages {
  touch-action: auto !important;
  scroll-snap-type: none !important;
  overflow: visible !important;
}

/* 0. 老安卓 / 微信 WebView 兜底：系统字体被放大时不要把排版撑破 */
html {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}
body .mobile-head__brand,
body .product-card__body,
body .wk-buybar__text {
  word-break: break-word;
}

/* ------------------------------------------------------------
   1. 顶栏：左菜单 / 中间商城名 / 右铃铛
   ------------------------------------------------------------ */
body .mobile-head {
  padding: 0 8px !important;
  gap: 4px !important;
}
body .mobile-head__brand {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  max-width: 52% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 16.5px !important;
  text-align: center;
}
body .mobile-head__search { display: none !important; }
body .mobile-head__bell { margin-left: auto !important; }

/* 左侧汉堡按钮：脱离 header 子节点，fixed 对齐 480 容器左缘 */
.wk-menu-btn {
  position: fixed;
  top: 7px;
  left: max(8px, calc(50% - 232px));
  z-index: 55;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  display: grid;
  place-items: center;
  color: #111827;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.16s, transform 0.16s;
}
.wk-menu-btn:active {
  background: rgba(0, 0, 0, 0.07);
  transform: scale(0.94);
}

/* ------------------------------------------------------------
   2. 搜索条（分类图标上方）
   ------------------------------------------------------------ */
.wk-searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  margin: 2px 0 10px;
  padding: 0 14px;
  background: #f2f3f5;
  border: 0;
  border-radius: 999px;
  color: #8a8f99;
  box-sizing: border-box;
}
.wk-searchbar svg { flex: none; }
.wk-searchbar input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #111827;
  font-size: 14.5px;
  font-family: inherit;
}
.wk-searchbar input::placeholder { color: #9aa0aa; }

/* ------------------------------------------------------------
   3. 黄色跑马灯（强化配色）
   ------------------------------------------------------------ */
body .home-announcement {
  background: linear-gradient(90deg, #fff6d8, #fff0c2) !important;
  border: 1px solid #ffd84d !important;
  border-radius: 12px !important;
}
body .home-announcement svg { color: #e8890c !important; }
body .home-announcement__viewport p {
  color: #8a4b00 !important;
  font-weight: 800 !important;
}
body .home-announcement button {
  background: #ffd84d !important;
  color: #7a3f00 !important;
  font-weight: 900 !important;
}

/* 320 窄屏：公告条「详情」按钮收窄，否则文字被挤得只剩几个字 */
@media (max-width: 360px) {
  body .home-announcement button {
    font-size: 11px !important; padding: 4px 8px !important;
    min-width: 0 !important; border-radius: 9px !important;
  }
  body .home-announcement__viewport p { font-size: 12px !important; }
}

/* ------------------------------------------------------------
   4. 购买记录滚动条
   ------------------------------------------------------------ */
.wk-buybar {
  position: sticky;
  top: 50px;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  margin: 0 0 10px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid #eef0f4;
  border-radius: 999px;
  font-size: 12.5px;
  color: #5b6472;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(16, 24, 40, 0.05);
  box-sizing: border-box;
}
.wk-buybar__dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}
.wk-buybar__text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.wk-buybar__text.is-out {
  opacity: 0;
  transform: translateY(-8px);
}
.wk-buybar__text b { color: #111827; font-weight: 800; }
.wk-buybar__text em { font-style: normal; color: #98a2b3; }

/* ------------------------------------------------------------
   5. 分类九宫格：一排四个，默认两排（8 个）
   ------------------------------------------------------------ */
/* 广告位只有一条时占满整行，避免右侧留白 */
body .desktop-promos {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
}
body .mobile-categories { margin: 0 0 16px !important; }
body .mobile-categories__pages {
  display: block !important;
  overflow: visible !important;
  scroll-snap-type: none !important;
}
body .mobile-categories__page {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: none !important;
  gap: 12px 2px !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 2px 2px 0 !important;
  scroll-snap-align: none !important;
}
body .mobile-categories__dots { display: none !important; }
body .mobile-category .category-icon {
  width: 50px !important;
  height: 50px !important;
}
body .mobile-category strong { font-size: 11.5px !important; }

/* 折叠态：第 9 个起隐藏 */
.wk-cat-hidden { display: none !important; }

/* 查看更多 / 收起 */
.wk-cats-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin: 6px 0 0;
  padding: 6px 0 2px;
  border: 0;
  background: transparent;
  color: #1d66d6;
  font-size: 13px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wk-cats-toggle svg {
  transition: transform 0.22s ease;
}
.wk-cats-toggle.is-open svg { transform: rotate(180deg); }

/* ------------------------------------------------------------
   6. 商品区：三行横滑，一屏三个商品
   ------------------------------------------------------------ */
body .mall-home { min-height: 0 !important; }
body .product-panel__head { display: none !important; }
body .product-panel {
  padding: 0 !important;
  min-height: 0 !important;
}
body .product-grid {
  display: grid !important;
  grid-auto-flow: column !important;
  grid-template-columns: none !important;
  grid-template-rows: repeat(3, minmax(0, auto)) !important;
  grid-auto-columns: 100% !important;
  gap: 8px 0 !important;
  width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding-bottom: 2px !important;
  min-height: 0 !important;
  align-content: start !important;
}
body .product-grid::-webkit-scrollbar { display: none; }
body .product-grid > * { scroll-snap-align: start; }

/* 商品卡改横排：左图右文 */
body .product-grid .product-card {
  display: flex !important;
  align-items: stretch !important;
  gap: 0 !important;
  min-height: 104px;
  border-radius: 12px !important;
  border: 1px solid #eef0f4 !important;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04) !important;
  overflow: hidden !important;
  background: #fff !important;
}
body .product-grid .product-card .product-image {
  flex: 0 0 104px !important;
  width: 104px !important;
  height: 104px !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  align-self: stretch;
}
body .product-grid .product-card .product-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
body .product-grid .product-card__body {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 8px 12px !important;
  overflow: hidden !important;
}
body .product-grid .product-card h3 {
  font-size: 14px !important;
  line-height: 1.34 !important;
  min-height: 0 !important;
  max-height: 38px;
  margin: 0 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 700;
}
body .product-grid .product-card__body > div {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  justify-content: flex-start !important;
  gap: 2px 5px !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
body .product-grid .product-card__body strong {
  font-size: 18px !important;
  line-height: 1.1;
  font-weight: 900;
  flex: none;
}
body .product-grid .product-card__body span {
  font-size: 10.5px !important;
  max-width: 100% !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 圆点指示器 */
.wk-pdots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 9px 0 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.wk-pdots::-webkit-scrollbar { display: none; }
.wk-pdots i {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #d0d3da;
  transition: width 0.2s, background-color 0.2s;
  display: block;
}
/* 屏数过多时改成「当前 / 总数」胶囊 */
.wk-pdots--num {
  justify-content: center !important;
  margin: 9px 0 2px !important;
}
.wk-pdots__num {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: #eef1f6;
  color: #6b7480;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .3px;
}
.wk-pdots i.on { width: 16px; background: #1d66d6; }

/* ------------------------------------------------------------
   7. 底部操作栏：半透明悬浮
   ------------------------------------------------------------ */
body .shop-shell__mobile-nav {
  background: rgba(255, 255, 255, 0.82) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.6) !important;
  backdrop-filter: blur(20px) saturate(1.6) !important;
  border-top: 1px solid rgba(210, 210, 215, 0.6) !important;
  box-shadow: 0 -6px 24px rgba(16, 24, 40, 0.07) !important;
  grid-template-columns: repeat(4, 1fr) !important;
}

/* 注入的「分类」项：原样式挂在 scoped 属性上，这里补全一份 */
body .shop-shell__mobile-nav .wk-nav-cat {
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 2px !important;
  color: #6e6e73 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  border-radius: 14px !important;
  padding-bottom: env(safe-area-inset-bottom) !important;
}
body .shop-shell__mobile-nav .wk-nav-cat svg {
  width: 20px !important;
  height: 20px !important;
}
body .shop-shell__mobile-nav .wk-nav-cat span {
  font-size: 12px !important;
  line-height: 1.2 !important;
  transform: none !important;
}

/* ------------------------------------------------------------
   8. 侧边菜单抽屉
   ------------------------------------------------------------ */
.wk-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(16, 24, 40, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.wk-drawer-mask.on { opacity: 1; pointer-events: auto; }
.wk-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 201;
  width: 74%;
  max-width: 300px;
  background: #fff;
  transform: translateX(-102%);
  transition: transform 0.26s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 6px 0 28px rgba(16, 24, 40, 0.16);
}
.wk-drawer.on { transform: none; }
.wk-drawer__hd {
  padding: 22px 20px 18px;
  background: linear-gradient(135deg, #ff8a1f, #ff4d2d);
  color: #fff;
}
.wk-drawer__hd b {
  display: block;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.5px;
}
.wk-drawer__hd span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.92;
}
.wk-drawer__list { flex: 1; overflow-y: auto; padding: 8px 0; }
.wk-drawer__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  border: 0;
  background: transparent;
  font-size: 15px;
  color: #1f2937;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wk-drawer__item:active { background: #f5f6f8; }
.wk-drawer__item i {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #fff3ea;
  color: #ff5a1f;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 15px;
}
.wk-drawer__ft {
  padding: 14px 20px 22px;
  font-size: 11.5px;
  color: #9ca3af;
  line-height: 1.7;
  border-top: 1px solid #f1f2f4;
}

/* ------------------------------------------------------------
   10. 下单页赠送码
   ------------------------------------------------------------ */
.wk-gift {
  margin: 12px 0 0;
  padding: 14px 16px 16px;
  background: #fff8ef;
  border: 1px dashed #ffc98c;
  border-radius: 14px;
}
.wk-gift__hd {
  font-size: 13.5px;
  font-weight: 800;
  color: #b45309;
  margin-bottom: 10px;
}
.wk-gift__hd span {
  margin-left: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #b07a3c;
}
.wk-gift__row { display: flex; gap: 8px; }
.wk-gift__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #ffd9a8;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  color: #111827;
  outline: none;
  font-family: inherit;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.wk-gift__input:focus { border-color: #ff8a1f; }
.wk-gift__btn {
  flex: none;
  width: 78px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff8a1f, #ff4d2d);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.wk-gift__btn:disabled { opacity: 0.6; }
.wk-gift__msg {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  display: none;
}
.wk-gift__msg.is-ok { display: block; color: #15803d; }
.wk-gift__msg.is-bad { display: block; color: #dc2626; }

/* ------------------------------------------------------------
   11. 订单查询口令门禁
   ------------------------------------------------------------ */
.wk-qgate {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.wk-qgate__card {
  width: min(360px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 24px 20px 18px;
  text-align: center;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.26);
}
.wk-qgate__hd {
  font-size: 17px;
  font-weight: 900;
  color: #111827;
  margin-bottom: 14px;
}
.wk-qgate__qr {
  width: 190px;
  height: 190px;
  object-fit: contain;
  border-radius: 12px;
  background: #f8fafc;
  display: block;
  margin: 0 auto 12px;
}
.wk-qgate__tip {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
}
.wk-qgate__row { display: flex; gap: 8px; }
.wk-qgate__input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #e0e3e8;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  outline: none;
  letter-spacing: 1px;
}
.wk-qgate__input:focus { border-color: #1d66d6; }
.wk-qgate__btn {
  flex: none;
  width: 96px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: #1d66d6;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.wk-qgate__btn:disabled { opacity: 0.6; }
.wk-qgate__msg {
  margin-top: 10px;
  font-size: 12.5px;
  color: #dc2626;
  display: none;
}
.wk-qgate__msg.is-bad { display: block; }
.wk-qgate__back {
  display: inline-block;
  margin-top: 14px;
  font-size: 12.5px;
  color: #98a2b3;
  text-decoration: none;
}

/* ------------------------------------------------------------
   12. 公告弹窗：背景虚化 + 系统通知卡片质感
   ------------------------------------------------------------ */
body .notice-mask {
  background: rgba(15, 23, 42, 0.38) !important;
  -webkit-backdrop-filter: blur(7px) saturate(1.1) !important;
  backdrop-filter: blur(7px) saturate(1.1) !important;
}
body .notice-modal {
  border-radius: 18px !important;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.26) !important;
  padding: 26px 22px 18px !important;
}
body .notice-modal h2 {
  font-size: 19px !important;
  font-weight: 900 !important;
  letter-spacing: 0.3px;
}
body .notice-modal__icon {
  width: 50px !important;
  height: 50px !important;
  border-radius: 16px !important;
}
body .notice-modal__image {
  border-radius: 12px !important;
}
body .notice-modal__button {
  border-radius: 12px !important;
  height: 44px !important;
  font-size: 15px !important;
  background: linear-gradient(135deg, #ff8a1f, #ff4d2d) !important;
}
body .notice-modal__button:hover {
  background: linear-gradient(135deg, #ff7d0a, #f0401f) !important;
}
/* 客户要求：底部两个按钮（一天内不弹出 / 知道了），所以做成描边按钮而不是文字链接 */
.wk-ann-later {
  display: block;
  width: 100%;
  height: 42px;
  margin: 9px 0 0;
  border: 1px solid #d8dce4;
  border-radius: 999px;
  background: #fff;
  color: #5b6472;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .16s ease, border-color .16s ease;
}
.wk-ann-later:active { background: #f2f4f8; border-color: #c3c9d4; }

/* ------------------------------------------------------------
   11. 动画
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  /* 38 底部操作栏切换 */
  body .shop-shell__mobile-item {
    transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
  }
  body .shop-shell__mobile-item:active { transform: scale(0.93); }
  body .shop-shell__mobile-item svg {
    transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
  }
  body .shop-shell__mobile-item--active svg { transform: translateY(-2px) scale(1.1); }
  body .shop-shell__mobile-item span { transition: transform 0.18s ease; }
  body .shop-shell__mobile-item--active span { transform: translateY(-1px) scale(1.04); }

  /* 39 进入商品页时图片展开 */
  .detail-card__media,
  .detail-card__media img,
  .product-detail__media,
  .product-detail__media img {
    animation: wk-zoom-in 0.42s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }
  @keyframes wk-zoom-in {
    from { opacity: 0; transform: scale(1.06); }
    to { opacity: 1; transform: none; }
  }

  /* 40 分类图标错峰出现 */
  body .mobile-category {
    animation: wk-fade-up 0.32s ease both;
  }
  body .mobile-category:nth-child(1) { animation-delay: 0.02s; }
  body .mobile-category:nth-child(2) { animation-delay: 0.05s; }
  body .mobile-category:nth-child(3) { animation-delay: 0.08s; }
  body .mobile-category:nth-child(4) { animation-delay: 0.11s; }
  body .mobile-category:nth-child(5) { animation-delay: 0.14s; }
  body .mobile-category:nth-child(6) { animation-delay: 0.17s; }
  body .mobile-category:nth-child(7) { animation-delay: 0.2s; }
  body .mobile-category:nth-child(8) { animation-delay: 0.23s; }
  @keyframes wk-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }

  /* 商品卡进入 */
  body .product-grid .product-card {
    animation: wk-fade-up 0.3s ease both;
  }
  body .wk-cats-expanded .product-grid .product-card { animation: none; }

  /* 购物车/确认栏出现 */
  body .checkout-bottombar { animation: wk-rise 0.28s ease both; }
  @keyframes wk-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
  }
}

/* 启动动画层 */
.wk-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #fff;
  transition: opacity 0.3s ease;
}
.wk-splash.out { opacity: 0; pointer-events: none; }
.wk-splash__logo {
  display: grid;
  place-items: center;
  gap: 12px;
  animation: wk-splash-in 0.5s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}
.wk-splash__mark {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(135deg, #ff8a1f, #ff4d2d);
  box-shadow: 0 12px 30px rgba(255, 90, 31, 0.28);
}
.wk-splash__name {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #111827;
}
@keyframes wk-splash-in {
  from { opacity: 0; transform: scale(0.86); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .wk-drawer__item { transition: background-color 0.14s ease; }
}

/* 只在小屏生效：桌面端保持原有版式 */
@media (min-width: 900px) {
  .wk-menu-btn,
  .wk-searchbar,
  .wk-buybar,
  .wk-pdots,
  .wk-cats-toggle { display: none !important; }
  body .mobile-head__brand { position: static !important; transform: none !important; }
}

/* ------------------------------------------------------------
   电脑版网页自救提示（手机误开「电脑版网站」时出现）
   ------------------------------------------------------------ */
.wk-dmbar {
  position: fixed !important;
  left: 0; right: 0; top: 0;
  z-index: 99999;
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: #fef3c7;
  border-bottom: 1px solid #fcd34d;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  font-size: 14px;
  line-height: 1.6;
  color: #7c2d12;
  text-align: left;
}
.wk-dmbar__tx { flex: 1; min-width: 0; }
.wk-dmbar__tx b { color: #b45309; }
.wk-dmbar__x {
  flex: none;
  padding: 4px 10px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fff;
  color: #b45309;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

/* ------------------------------------------------------------
   空路由兜底（旧链接失效 / 商品下架 / 地址拼错时不再白屏）
   ------------------------------------------------------------ */
.wk-blank {
  position: fixed !important;
  inset: 0;
  z-index: 900 !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 28px 80px;
  background: #f5f6f8;
  text-align: center;
}
.wk-blank__ico {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e8eef7; color: #94a3b8;
}
.wk-blank__t {
  font-size: 16px; font-weight: 700; color: #1f2430; letter-spacing: -.2px;
}
.wk-blank__d {
  font-size: 13.5px; color: #7a8291; line-height: 1.7; max-width: 280px;
}
.wk-blank__btns { display: flex !important; gap: 10px; margin-top: 6px; }
.wk-blank__btn {
  display: inline-flex !important; align-items: center; justify-content: center;
  padding: 9px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600; font-family: inherit;
  text-decoration: none; cursor: pointer; line-height: 1.2;
}
.wk-blank__btn--p { background: #f59e0b; color: #fff; border: 1px solid #f59e0b; }
.wk-blank__btn--s { background: #fff; color: #374151; border: 1px solid #d8dce4; }

/* 购买记录条要吸顶。sticky 会被「最近一个 overflow 不是 visible 的祖先」锁死在它的盒子里，
   打包给 body / .shop-shell__main / .mall-home 都写了 overflow:hidden auto，
   三层一起挡住，所以之前一直没吸住（表现为跟着页面滚走）。
   实测全站 scrollWidth - clientWidth = 0，没有横向溢出，放开安全。 */
body,
body .shop-shell__main,
body .mall-home.page-view {
  overflow: visible !important;
}

/* ------------------------------------------------------------
   15. 2026-11-22 客户第二轮：首页改版
      - 大类图标一行 5 个（最多 3 行），不再折叠
      - 搜索框加边框
      - 底部导航改透明悬浮，去掉「分类」项
      - 公告弹窗压扁图标区、两个按钮左右排
      - 首页商品改成「按分类分组」的三列小卡片
   ------------------------------------------------------------ */

/* --- 大类：5 列 --- */
body .mobile-categories { margin: 0 0 14px !important; }
body .mobile-categories__page {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px 0 !important;
  padding: 4px 0 2px !important;
}
body .mobile-category { padding: 0 !important; }
body .mobile-category .category-icon {
  width: 46px !important; height: 46px !important; border-radius: 14px !important;
}
body .mobile-category strong {
  font-size: 10.5px !important; line-height: 1.25 !important; margin-top: 5px !important;
  max-width: 100% !important; white-space: nowrap !important;
  overflow: hidden !important; text-overflow: ellipsis !important;
}
body .wk-cats-toggle { display: none !important; }
body .wk-cat-hidden { display: flex !important; }

/* --- 搜索条：加边框 --- */
body .wk-searchbar {
  background: #fff !important;
  border: 1px solid #e2e6ec !important;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .05) !important;
  transition: border-color .16s ease, box-shadow .16s ease;
}
body .wk-searchbar:focus-within {
  border-color: #ff5a1f !important;
  box-shadow: 0 0 0 3px rgba(255, 90, 31, .12) !important;
}

/* --- 底部导航：透明悬浮胶囊 + 去掉分类项 --- */
body .shop-shell__mobile-nav {
  left: 12px !important; right: 12px !important;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  width: auto !important; max-width: none !important;
  height: 58px !important; padding: 0 4px !important;
  border: 1px solid rgba(255, 255, 255, .72) !important;
  border-top: 1px solid rgba(210, 210, 215, .5) !important;
  border-radius: 19px !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .16) !important;
  grid-template-columns: repeat(3, 1fr) !important;
}
body .shop-shell__mobile-nav .wk-nav-cat { display: none !important; }
body .shop-shell__mobile-nav .shop-shell__mobile-item,
body .shop-shell__mobile-nav .wk-nav-cat {
  padding-bottom: 0 !important;
  border-radius: 15px !important;
}
body .shop-shell__mobile-nav .shop-shell__mobile-item span,
body .shop-shell__mobile-nav .wk-nav-cat span { font-size: 11px !important; }
body .mall-home { padding-bottom: 88px !important; }

/* --- 公告弹窗：图标缩小、按钮左右排 --- */
body .notice-modal { padding: 18px 18px 16px !important; }
body .notice-modal--platform {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  column-gap: 8px !important;
}
body .notice-modal--platform .notice-modal__close {
  position: absolute !important; top: 8px !important; right: 8px !important;
  grid-column: auto !important;
}
body .notice-modal--platform .notice-modal__body { grid-column: 1 / -1 !important; }
body .notice-modal--platform .notice-modal__button {
  grid-column: 1 !important;
  width: 100% !important; height: 42px !important;
  margin: 14px 0 0 !important;
}
body .notice-modal__icon {
  width: 36px !important; height: 36px !important; border-radius: 11px !important;
  margin: 0 auto 7px !important; padding: 0 !important;
}
body .notice-modal__icon svg { width: 19px !important; height: 19px !important; }
body .notice-modal h2 { font-size: 15.5px !important; margin: 0 0 8px !important; }
body .notice-modal p { font-size: 13px !important; line-height: 1.62 !important; }
body .notice-modal__image { max-height: 28vh !important; object-fit: contain !important; }
body .wk-ann-later {
  grid-column: 2 !important;
  width: 100% !important; height: 42px !important;
  margin: 14px 0 0 !important;
}

/* --- 首页：隐藏原来的左右两栏商品区，改成分组小卡片 --- */
body .catalog-area { display: none !important; }

.wk-cat-groups { margin: 4px 0 0; }
.wk-cat-group { margin: 0 0 20px; }
.wk-cat-group__hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2px 10px;
}
.wk-cat-group__t {
  display: flex; align-items: center; gap: 7px;
  font-size: 15px; font-weight: 900; color: #111827; letter-spacing: .2px;
}
.wk-cat-group__t i {
  width: 4px; height: 15px; border-radius: 2px; display: block;
  background: linear-gradient(180deg, #ff8a1f, #ff4d2d);
}
.wk-cat-group__more {
  display: flex; align-items: center; gap: 1px;
  font-size: 12.5px; color: #98a2b3; text-decoration: none; font-weight: 600;
}
.wk-cat-group__more svg { width: 13px; height: 13px; }
.wk-cat-group__g {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
}
.wk-gcard {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 6px 9px;
  background: #fff; border: 1px solid #eef0f4; border-radius: 13px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .04);
  text-decoration: none; transition: transform .12s ease;
}
.wk-gcard:active { transform: scale(.97); }
.wk-gcard img {
  width: 46px; height: 46px; border-radius: 12px; object-fit: cover;
  background: #f6f7f9; display: block;
}
.wk-gcard b {
  font-size: 11.5px; line-height: 1.32; font-weight: 700; color: #1f2937;
  text-align: center; width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere;
}
.wk-gcard em { font-style: normal; font-size: 11.5px; font-weight: 900; color: #ff4d2f; }
.wk-gcard em s { font-weight: 400; font-size: 9.5px; color: #9aa0a6; margin-left: 2px; }

@media (max-width: 344px) {
  body .mobile-category .category-icon { width: 42px !important; height: 42px !important; }
  body .mobile-category strong { font-size: 9.5px !important; }
  .wk-gcard img { width: 40px !important; height: 40px !important; }
  .wk-gcard b { font-size: 10.5px !important; }
  .wk-cat-group__g { gap: 6px !important; }
}

/* 宽屏（平板 / 电脑版网页）下卡片不要被拉成一条一条，按 120px 自动铺列 */
@media (min-width: 620px) {
  .wk-cat-groups { max-width: 760px; margin-left: auto; margin-right: auto; }
  .wk-cat-group__g { flex-wrap: nowrap; }
  .wk-gcard img { width: 56px !important; height: 56px !important; }
  .wk-gcard b { font-size: 12.5px !important; }
}

/* ------------------------------------------------------------
   16. 2026-11-23 客户第三轮反馈
      - 公告弹窗：图片别再撑满，机型不同也不能把按钮挤出屏幕
      - 首页大类：3 行布局（每页 15 个），超过就左右滑动
      - 首页下方：改成「分组 + 大项卡片」，点卡片跳第二页
      - 右侧悬浮客服
   ------------------------------------------------------------ */

/* --- 公告弹窗：图片限高，按钮一定可见 --- */
body .notice-modal {
  max-height: 88vh !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}
body .notice-modal__image {
  max-height: 18vh !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 8px auto 0 !important;
  object-fit: contain !important;
}

/* --- 首页大类：自绘 3 行分页 --- */
body .mobile-categories { display: none !important; }

.wk-catwall { margin: 2px 0 12px; }
.wk-catwall__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.wk-catwall__track::-webkit-scrollbar { display: none; }
.wk-catwall__page {
  flex: 0 0 100%; scroll-snap-align: start;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px 0; align-content: flex-start;
}
.wk-cw {
  width: 25%; display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.wk-cw:active { transform: scale(.95); }
.wk-cw .ic {
  width: 54px; height: 54px; border-radius: 15px; overflow: hidden;
  background: #fff; display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .07);
}
.wk-cw .ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wk-cw b {
  font-size: 11.5px; line-height: 1.25; font-weight: 700; color: #1f2937;
  max-width: 100%; text-align: center;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; word-break: break-all;
}
.wk-catwall__page.is-partial { align-content: center; }
/* 圆点是「还能左右滑」的唯一提示，原来 5px 太细、灰点几乎看不见，放大加深 */
.wk-catdots { display: flex; justify-content: center; gap: 7px; margin-top: 10px; }
.wk-catdots i { width: 6px; height: 6px; border-radius: 50%; background: #c7ced9; transition: all .2s ease; }
.wk-catdots i.on { width: 18px; border-radius: 3px; background: #1d66d6; }

/* --- 首页下方：分组 + 大项卡片 --- */
.wk-cat-groups { margin: 6px 0 0; }
.wk-cat-group { margin: 0 0 20px; }
.wk-cat-group__hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2px 9px;
}
.wk-cat-group__t {
  display: flex; align-items: center; gap: 7px;
  font-size: 15px; font-weight: 900; color: #111827; letter-spacing: .2px;
}
.wk-cat-group__t i {
  width: 4px; height: 15px; border-radius: 2px; display: block;
  background: linear-gradient(180deg, #ff8a1f, #ff4d2d);
}
.wk-cat-group__g {
  display: flex; flex-wrap: nowrap; gap: 8px;
  justify-content: flex-start; align-items: stretch;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scroll-padding-left: 0;
  padding: 0 0 5px;
  scrollbar-width: none;
}
.wk-cat-group__g::-webkit-scrollbar { display: none; height: 0; }
/* 客户 2026-11-28：每组里多余的商品左右滑不出来，只能看到 4 个。
   现在改成一行横着划：一屏正好 2 张，右边露出半张暗示还能滑。 */
.wk-cat-group__g .wk-tile {
  flex: 0 0 47%;
  scroll-snap-align: start;
}
.wk-tile {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  padding: 9px 8px; background: #fff; border: 1px solid #eef0f4; border-radius: 13px;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .04); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.wk-tile:active { transform: scale(.97); }
.wk-tile img {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  object-fit: cover; background: #f6f7f9; display: block;
}
.wk-tile .tt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wk-tile b {
  font-size: 11.5px; line-height: 1.25; font-weight: 800; color: #1f2937;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere;
}
.wk-tile em { font-style: normal; font-size: 9.5px; color: #98a2b3; white-space: nowrap; }

/* --- 右侧悬浮客服（全站） --- */
.wk-fab {
  position: fixed; right: 8px; z-index: 60;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .94); color: #1d66d6;
  border: 1px solid rgba(238, 240, 244, .9);
  box-shadow: 0 8px 22px rgba(16, 24, 40, .18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.wk-fab svg { width: 20px; height: 20px; }
.wk-fab--up { bottom: calc(158px + env(safe-area-inset-bottom, 0px)) !important; }
.wk-fab:active { transform: scale(.93); }

@media (max-width: 344px) {
  .wk-cw .ic { width: 46px !important; height: 46px !important; }
  .wk-cw b { font-size: 9.5px !important; }
  .wk-tile img { width: 34px !important; height: 34px !important; }
  .wk-tile b { font-size: 10.5px !important; }
  .wk-cat-group__g { gap: 6px !important; }
  .wk-cat-group__g .wk-tile { flex: 0 0 48% !important; }
}

/* --- 赠送码：一行小字 + 弹窗（客户：别占一大块，有免单次数时不出现） --- */
.wk-gift { padding: 2px 2px 8px; text-align: right; margin: 0;
  background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.wk-gift__link {
  border: 0; background: transparent; padding: 4px 2px;
  font-size: 12px; color: #98a2b3; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.wk-gift__link:active { color: #1d66d6; }

.wk-giftpop-mask {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(15, 23, 42, .45);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 0 24px;
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
}
.wk-giftpop-mask.on { opacity: 1; pointer-events: auto; }
.wk-giftpop {
  position: relative; width: 100%; max-width: 330px;
  background: #fff; border-radius: 18px; padding: 20px 18px 16px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .26);
  transform: translateY(8px) scale(.98); transition: transform .18s ease;
}
.wk-giftpop-mask.on .wk-giftpop { transform: none; }
.wk-giftpop__x {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border: 0; border-radius: 9px;
  background: transparent; color: #98a2b3; font-size: 20px; line-height: 1;
  cursor: pointer;
}
.wk-giftpop h3 { margin: 4px 0 8px; font-size: 16px; font-weight: 900; color: #111827; text-align: center; }
.wk-giftpop__tip {
  margin: 0 0 14px; font-size: 12.5px; line-height: 1.6; color: #667085; text-align: center;
}
.wk-giftpop__tip a { color: #1d66d6; font-weight: 700; text-decoration: none; }
.wk-giftpop__row { display: flex; gap: 8px; }
.wk-giftpop__input {
  flex: 1; min-width: 0; height: 42px; padding: 0 12px;
  border: 1px solid #e2e6ec; border-radius: 11px;
  font-size: 14px; color: #111827; outline: none; background: #fff;
}
.wk-giftpop__input:focus { border-color: #ff8a1f; box-shadow: 0 0 0 3px rgba(255, 138, 31, .14); }
.wk-giftpop__btn {
  flex: none; height: 42px; padding: 0 18px; border: 0; border-radius: 11px;
  background: linear-gradient(135deg, #ff9a3c, #ff5a1f); color: #fff;
  font-size: 14px; font-weight: 800; cursor: pointer;
}
.wk-giftpop__btn:disabled { opacity: .6; }
.wk-giftpop__msg { display: none; margin-top: 10px; font-size: 12.5px; text-align: center; }
.wk-giftpop__msg.is-ok { display: block; color: #15803d; }
.wk-giftpop__msg.is-bad { display: block; color: #dc2626; }


/* --- 支付结果页：长时间检测不到结果时的兜底提示 --- */
.wk-pay-escape {
  position: fixed !important; left: 12px; right: 12px;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  margin: 0 !important;
  padding: 14px 15px 13px;
  background: #fff7ed; border: 1px solid #fdba74; border-radius: 14px;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; color: #7c2d12; line-height: 1.6; text-align: left;
  box-shadow: 0 10px 30px rgba(120, 53, 15, .2);
  z-index: 9999;
}
.wk-pay-escape b { font-size: 13.5px; font-weight: 800; color: #9a3412; }
.wk-pay-escape span { color: #b45309; }
.wk-pay-escape a {
  align-self: flex-start; margin-top: 6px; padding: 9px 22px;
  background: #ea580c; color: #fff !important; font-weight: 700; font-size: 13.5px;
  border-radius: 20px; text-decoration: none;
}


/* ------------------------------------------------------------
   2026-11-29 客户：首页「热门平台 / 其他平台」这两块原来放的是平台入口卡，
   跟上方 15 个图标完全重复。改成直接列课程（图 + 课程名 + 价格 + 已售），
   点进去就是商品详情。卡片仍然一行横滑、一屏 2 张、右露半张。
   ------------------------------------------------------------ */
.wk-cat-group__g { align-items: stretch; }
.wk-cat-group__g .wk-pc {
  flex: 0 0 47%;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid #eef0f4; border-radius: 13px;
  overflow: hidden; text-decoration: none;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .04);
  transition: transform .12s ease;
}
.wk-cat-group__g .wk-pc:active { transform: scale(.975); }
.wk-pc__img {
  display: block; width: 100%; aspect-ratio: 1 / 1;
  background: #f4f5f7; overflow: hidden;
}
.wk-pc__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wk-pc__t {
  padding: 8px 9px 0;
  font-size: 12.5px; line-height: 1.42; color: #101828; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 35px;
}
.wk-pc__p {
  padding: 5px 9px 0;
  display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap;
}
.wk-pc__p em {
  font-style: normal; font-size: 15px; font-weight: 800;
  color: #e5342b; letter-spacing: -.2px;
}
.wk-pc__p s { font-size: 11px; color: #98a2b3; }
.wk-pc__s { padding: 3px 9px 9px; font-size: 11px; color: #98a2b3; }

@media (max-width: 360px) {
  .wk-cat-group__g .wk-pc { flex: 0 0 48%; }
  .wk-pc__t { font-size: 12px; }
  .wk-pc__p em { font-size: 14px; }
}


/* ------------------------------------------------------------
   2026-11-30 客户（第三次纠正）：下面「热门平台 / 其他平台」要的是大分类卡片，
   跟最上面那排图标墙长得一样（图标在上、名字在下），不是课程卡。
   上面那排显示全部平台，下面按他自己分的热门 / 冷门再列一遍。
   所以这里把横滑容器改回 5 列网格，直接复用 .wk-cw 的样式。
   ------------------------------------------------------------ */
.wk-cat-groups .wk-cat-group__g {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 14px 0 !important;
  overflow: visible !important;
  padding: 0 !important;
  scroll-snap-type: none !important;
}
.wk-cat-groups .wk-cat-group__g .wk-cw { width: 20%; flex: 0 0 20%; }


/* ------------------------------------------------------------
   2026-12-01 图标墙改 4 列后图标放到 54px，下方「热门平台/其他平台」
   借的是同一个 .wk-cw 类，会跟着变大、5 列显得挤。
   这里把分组区锁回原来的 46px / 10.5px，保持客户已认可的样子。
   ------------------------------------------------------------ */
.wk-cat-groups .wk-cw .ic { width: 46px !important; height: 46px !important; border-radius: 14px !important; }
.wk-cat-groups .wk-cw b { font-size: 10.5px !important; }

/* ---------------------------------------------------------------
   2026-12-01 320 极窄屏轮播裁字（客户 11-24 反馈的第二张 banner）
   轮播容器在窄屏被压到 106px 高、图片 object-fit:cover，976×549 的图
   垂直方向裁掉近四成，图上文字只剩中间一块。≤360 时改成按图片比例撑开，
   320 下高度 106 → 约 171，整张图完整可见。
   ------------------------------------------------------------ */
@media (max-width: 360px) {
  .hero-card,
  .hero-card__image-button { height: auto !important; }
  .hero-card__image-button img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block;
  }
}
