/* ═══════════════════════════════════════════════════════════════
   mobile-proto-shop.css —— 商城链路 5 页的页面级样式（2026-10-21）
   来源：mobile-prototype/ 的 mobile-shop.html · mobile-product-detail.html ·
        mobile-cart.html · mobile-checkout.html · mobile-addresses.html 的 <style> 段。

   分工（不重复定义别层的选择器）：
   - 令牌 / 外壳 / .cart-bar / .cart-go / .chips / .chip / .badge / .searchbar /
     .search-field / .sub-hero / .toast / .modal → mobile-proto.css
   - 表单层 .sec / .sec-h / .fld / .ctl / .lnk / .btn-gold / .btn-ghost / .note /
     .rgn-*（地区弹层）→ mobile-proto-form.css
   - 本文件只写这 5 页自己的组件：商城网格 / 商品详情 / 购物车 / 结算 / 地址簿。

   ⚠️ 与原型的两处有意差异（真机是**每页都渲染 .tabbar** 的整套外壳，原型这 5 页没有 TabBar）：
   1. 原型的 .ck-bar / .ab-bar 把底部条压到 `bottom: var(--safe-b)` 并配
      `body.has-bar .app { padding-bottom: calc(var(--safe-b) + 66px) }`。
      真实站 _MobileLayout 每页都渲染 .tabbar，直接用那套会让底部条**压在 TabBar 底下**
      （.cart-bar z-index 55 < .tabbar 60），按钮被 TabBar 盖住、还多出 58px 悬空带。
      这里改用共享 .cart-bar 的默认值 `bottom: calc(var(--tab-h) + var(--safe-b))`
      与共享的 `body.has-cart` 留白规则（页面脚本负责切 has-cart）。
   2. 商品卡 / 空车推荐行右下角的圆形按钮：原型是「快捷加购」，真实站改为
      「进详情选规格」的入口。原因见 Views/Store/Products.cshtml 头注——
      多规格商品在列表页拿不到 skuId，用 skuId=0 加购会写出一行结算时必被拦的脏数据。
   ═══════════════════════════════════════════════════════════════ */

/* ══════════════════ 通用：金额数字 / 描边圆形按钮 / 空态（商城链路共用） ══════════════════ */
.price-n {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
}
/* 圆形描边按钮：视觉 36px，伪元素四周外扩 4px 补到 44px 触摸区 */
.round-btn {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--fg);
  border-radius: 50%;
  color: var(--fg);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.round-btn::after { content: ""; position: absolute; inset: -4px; }
.round-btn svg { width: 16px; height: 16px; }
.round-btn:hover { background: var(--fg); color: var(--on-dark); }
.round-btn:active { background: color-mix(in oklch, #000 22%, var(--fg)); color: var(--on-dark); }

/* 空态：图标 + 标题 + 副题 + 一个次级/主按钮 */
.blank { padding: 40px var(--inset-r) 48px var(--inset-l); text-align: center; }
.blank[hidden] { display: none; }
.blank-mark {
  width: 48px; height: 48px;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--on-ink-06);
  color: var(--muted);
}
.blank-mark svg { width: 24px; height: 24px; }
.blank-title { font-size: 15px; font-weight: 600; }
.blank-sub { margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.blank-act { margin-top: 18px; display: inline-flex; justify-content: center; }

/* ══════════════════ 1. 商城列表页（mobile-shop.html） ══════════════════ */

/* 页头图改成紧凑横幅：132px，让商品区提前露出约 82px */
.shop-hero {
  min-height: 132px;
  padding: calc(var(--bar-h) + var(--safe-t) + 14px) var(--inset-r) 16px var(--inset-l);
  justify-content: flex-end;
}
.shop-hero h1 { font-size: var(--h1-shop-hero); }
.shop-hero .sub-hero-sub { font-size: 12.5px; }

/* 工具条：搜索 + 分类 + 结果数/排序，三段压成一条 */
.shop-tools { background: var(--surface); border-bottom: 1px solid var(--border); }
.shop-search { display: flex; padding: 12px var(--inset-r) 0 var(--inset-l); }
/* 共享 .searchbar 是「一条独立搜索条」，这里已由 .shop-search 定位，去掉它自带的内边距与描边 */
.shop-search .searchbar { flex: 1 1 auto; padding: 0; background: none; border: 0; }
/* 共享 .chips 自带左右内边距与横滑；这里把上下留白收窄，让三段连成一条 */
.shop-tools .chips { padding: 10px var(--inset-r) 6px var(--inset-l); }
/* 工具条白面上胶囊改灰底：白胶囊压白底只剩一道 1px 极淡描边，选中/未选中几乎无从区分 */
.shop-tools .chip { position: relative; background: var(--bg); }
.shop-tools .chip[aria-pressed="true"] { background: var(--fg); }
/* 胶囊视觉高 32px，靠伪元素上下各外扩 6px 撑到 44px 触摸区；横向不外扩，与 8px 间距的邻居不重叠 */
.shop-tools .chip::after { content: ""; position: absolute; inset: -6px 0; }
/* 件数只靠字号与字族拉开层级，不用更浅的颜色：颜色继承胶囊前景，
   选中（深底白字）与未选中（灰底次级字）两种状态下对比度都不降 */
.chip-n {
  margin-left: 5px;
  font-family: var(--font-num);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: inherit;
}

.shop-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px var(--inset-r) 8px var(--inset-l);
}
.shop-count { font-size: 12.5px; color: var(--muted); }
.shop-count b { color: var(--fg); font-family: var(--font-num); font-weight: 600; font-variant-numeric: tabular-nums; }
/* 排序做成可循环按钮（综合 → 价格升 → 价格降），省掉三个胶囊占掉的一整行 */
.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: var(--tap);
  padding: 0 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  transition: color .15s ease;
}
.sort-btn svg { width: 13px; height: 13px; color: var(--muted); transition: color .15s ease; }
.sort-btn:hover svg { color: var(--fg); }
.sort-btn:active { color: var(--muted); }

/* 商品网格：两列，3:4 竖版图位，卡片等高 */
.goods-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px var(--inset-r) 26px var(--inset-l);
}
.goods {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius-lg);
  transition: transform .16s ease;
}
.goods:active { transform: scale(.99); }
/* 图位整块可点（进详情），名称单独成链；两者不嵌套，避免两条指向同一目标的重复链接 */
.goods-photo-link { display: block; }
.goods-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: color-mix(in oklch, var(--fg) 5%, var(--surface));
  color: var(--on-ink-45);
}
.goods-photo svg { width: 22px; height: 22px; }
.goods-photo span {
  font-family: var(--font-num);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--muted);
}
/* 有真实商品图时只放图，不叠占位文字 */
.goods-photo.is-photo { display: block; }
.goods-img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 优惠角标：用深底白字（约 12:1），不用品牌金——金色压白底只有 1.9:1 */
.goods-badge {
  position: absolute;
  top: 0;
  left: 0;
  padding: 3px 8px;
  border-bottom-right-radius: var(--radius-sm);
  background: color-mix(in oklch, #000000 74%, transparent);
  color: var(--on-dark);
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 600;
  font-style: normal;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}

.goods-body { display: flex; flex-direction: column; gap: 5px; flex: 1 1 auto; padding: 10px 12px 12px; }
/* 名称固定两行高：与 station 端 .store-product-title 同一口径（-webkit-line-clamp: 2） */
.goods-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.goods-name a { color: inherit; }
.goods-name a:hover { text-decoration: underline; text-underline-offset: 2px; }
.goods-desc {
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.goods-foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}
.goods-price {
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.goods-price::before { content: "￥"; font-size: 10px; margin-right: 1px; color: var(--muted); }
.goods-price del {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.goods-price del::before { content: "￥"; font-size: 9px; margin-right: 1px; }

/* 空态：筛选无结果（与「没有商品」是两件事，文案分开） */
.shop-empty { padding: 44px var(--inset-r) 56px var(--inset-l); text-align: center; }
.shop-empty[hidden] { display: none; }
.shop-empty-title { font-size: 15px; font-weight: 600; }
.shop-empty-sub { margin-top: 4px; font-size: 12px; color: var(--muted); }
/* 次级动作：描边而非实心金——本屏唯一的实心主按钮是结算条的「去结算」 */
.shop-empty-reset {
  margin-top: 16px;
  min-height: var(--tap);
  padding: 0 20px;
  border: 1px solid var(--on-ink-45);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg);
  transition: background-color .15s ease, border-color .15s ease;
}
.shop-empty-reset:hover { border-color: var(--fg); background: var(--on-ink-06); }
.shop-empty-reset:active { background: var(--on-ink-12); }

/* 加载触发器（沿用既有 /products/load 无限滚动：id 与既有实现一致） */
.load-more {
  padding: 22px var(--inset-r) 26px var(--inset-l);
  text-align: center;
}
.load-more[hidden] { display: none; }
.load-more-in {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.load-more-in svg { width: 18px; height: 18px; animation: shop-spin 1s linear infinite; }
@keyframes shop-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.load-end { padding: 20px var(--inset-r); text-align: center; font-size: 12px; color: var(--muted); }
.load-end[hidden] { display: none; }

/* ══════════════════ 2. 商品详情页（mobile-product-detail.html） ══════════════════ */
.pd-stage {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 262px;
  padding: calc(var(--bar-h) + var(--safe-t) + 20px) var(--inset-r) 24px var(--inset-l);
  background: var(--navy);
  color: var(--on-dark);
  text-align: center;
}
.pd-stage-ico { width: 54px; height: 54px; color: var(--on-dark-58); }
.pd-photo {
  display: block;
  width: 100%;
  max-width: 302px;
  margin-inline: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .34);
}
.pd-stage-cap {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--on-dark-70);
}

.pd-info { padding: 18px var(--inset-r) 20px var(--inset-l); }
.pd-cat {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.pd-title {
  margin-top: 7px;
  font-family: var(--font-display);
  font-size: var(--h1-product);
  font-weight: 800;
  line-height: 1.38;
  color: var(--fg);
}
/* 价格行：金色不上场，全页唯一金色是吸底条的「加入购物车」 */
.pd-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; margin-top: 11px; }
.pd-price b {
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}
.pd-price b::before { content: "￥"; font-size: 13px; margin-right: 2px; color: var(--muted); }
.pd-price em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); }
.pd-price del { font-family: var(--font-num); font-size: 13px; color: var(--muted); }
.pd-price del::before { content: "￥"; font-size: 10px; margin-right: 1px; }
/* 库存不足时的提示行（真实数据：Stock <= 0） */
.pd-stock { margin-top: 7px; font-size: 12px; color: var(--muted); }
.pd-stock.is-out { color: var(--accent-ink); font-weight: 600; }

/* 规格（ProductSku）：沿用既有 .store-sku-btn 标记（mobile-product-detail.js 依赖），
   这里只把它换成原型 .pd-sku-btn 的形态 */
.pd-sku { margin-top: 16px; }
.pd-sku-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
}
.pd-sku-h i {
  font-family: var(--font-num);
  font-style: normal;
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--muted);
}
.pd-sku-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.store-sku-btn {
  min-height: var(--tap);
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: 13.5px;
  color: var(--fg);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.store-sku-btn:hover { background: var(--on-ink-06); border-color: var(--on-ink-45); }
.store-sku-btn:active { background: var(--on-ink-12); }
/* 选中态：金色描边 + 浅金底，前景不变（金色压白只有 1.9:1，不用于文字） */
.store-sku-btn--active {
  border-color: var(--accent-ink);
  background: var(--accent-soft);
  font-weight: 600;
}
.store-sku-btn--active:hover { background: color-mix(in oklch, var(--accent) 20%, transparent); }
.store-sku-btn[disabled] {
  background: var(--bg);
  border-color: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}
/* 缺货标记：同一个按钮里的小字，不靠删除线重复表达一次 */
.store-sku-btn-soldout { margin-left: 5px; font-size: 11.5px; }
.price-range-suffix { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); }

/* 返回商城：详情页的入口方向，放在信息区之后不抢顶栏那 54px */
.pd-back-row { padding: 16px var(--inset-r) 4px var(--inset-l); background: var(--surface); }
.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: var(--tap);
  padding: 0 16px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg);
  transition: background-color .15s ease, border-color .15s ease;
}
.pd-back:hover { background: var(--on-ink-06); border-color: var(--on-ink-45); }
.pd-back:active { background: var(--on-ink-12); }
.pd-back svg { width: 15px; height: 15px; }

/* 售后说明：文案逐字取自站点常量 AfterSalesPolicy，视图里不另写一份 */
.pd-after {
  display: flex;
  gap: 9px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg);
}
.pd-after svg { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--fg); }
.pd-after p { margin: 0; font-size: 12px; line-height: 1.7; color: var(--ink-2); }
.pd-after .lnk { margin-top: 2px; font-size: 12.5px; }

/* 图文详情：站点描述字段允许富文本详情图，这里按长图顺序渲染（面板之间不留缝） */
.pd-desc-sec { padding-inline: 0; }
.pd-desc-sec .sec-h { padding-inline: var(--inset-r) var(--inset-l); }
.pd-desc { display: block; background: var(--surface); padding: 4px var(--inset-r) 22px var(--inset-l); }
/* 复用既有 .store-detail-desc 的富文本可读性规则（标题/段落/图片/表格全部来自站点描述字段） */
.pd-desc img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: .8em 0; }
.pd-desc p { font-size: 13.5px; line-height: 1.75; color: var(--ink-2); margin: .7em 0; }
.pd-desc :is(h1, h2, h3, h4) { margin: 1.1em 0 .5em; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--fg); }
.pd-desc ul, .pd-desc ol { padding-left: 1.4em; margin: .7em 0; }
.pd-desc li { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.pd-desc ul { list-style: disc; }
.pd-desc ol { list-style: decimal; }
.pd-desc a { color: var(--accent-ink); text-decoration: underline; word-break: break-all; }
.pd-desc table { width: 100%; border-collapse: collapse; margin: 1em 0; }
.pd-desc th, .pd-desc td { border: 1px solid var(--border); padding: 8px; font-size: 13px; }
.pd-desc th { background: var(--bg); }

/* 吸底购买条：左侧去购物车的次级入口，右侧全页唯一实心主按钮 */
.pd-cart {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--on-dark);
  font-size: 14px;
  font-weight: 600;
  transition: background-color .15s ease;
}
.pd-cart:hover { background: var(--on-dark-08); }
.pd-cart:active { background: var(--on-dark-14); }
.pd-cart svg { width: 19px; height: 19px; flex: none; }
/* 购物车件数徽标 */
.pd-cart-n {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--on-dark-14);
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.pd-cart-n[hidden] { display: none; }

/* === 加入购物车飞行动效 (2026-11-06) ===
   起点 = 商品图，终点 = 吸底条购物车按钮。位置由 shop-pages.js 逐帧写 transform，
   这里只管外观；不使用 animation 属性，避免与 JS 的 transform 冲突。 */
.cart-fly-icon {
  /* z-index 100：吸底条 .cart-bar 是 55、Toast 与二维码弹层是 95，
     飞行体必须压在它们之上，否则飞行途中会被吸底条遮住 */
  position: fixed; left: 0; top: 0; z-index: 100;
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  /* 图标用 --accent-ink（#8a6200，压白 5.49:1）而非浅金：浅金压白只有 1.92:1，
     42px 圆内的小图标会更糊 */
  background: #fff; color: var(--accent-ink, #8a6200);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
  pointer-events: none; will-change: transform, opacity;
}
.cart-fly-icon svg { width: 21px; height: 21px; }
/* 落地涟漪：在购物车按钮中心扩散一圈金色光晕 */
.cart-fly-ripple {
  position: fixed; z-index: 99; width: 34px; height: 34px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(249, 178, 51, .9) 0%, rgba(249, 178, 51, 0) 70%);
  transform: translate(-50%, -50%) scale(.4);
  animation: cart-fly-ripple-out .5s ease-out forwards;
}
@keyframes cart-fly-ripple-out {
  0%   { transform: translate(-50%, -50%) scale(.4); opacity: .55; }
  100% { transform: translate(-50%, -50%) scale(2.1); opacity: 0; }
}
/* 加购成功后徽标弹跳（原先靠 900ms 跳转掩盖，现在留在当前页必须有反馈） */
.pd-cart-n.cart-badge-bump { animation: cart-badge-bump .6s ease; }
@keyframes cart-badge-bump {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.35); }
  60%  { transform: scale(.92); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .cart-fly-icon { display: none; }
}

/* 标签留出五字宽：「加入购物车」→「加入中…」等待期间按钮不缩不跳 */
.pd-bar-add { padding-inline: 18px; }
.pd-bar-add span[data-lbl] { min-width: 5em; text-align: center; }
/* 加购等待中的旋转指示：由 JS 切 aria-busy 控制（形态取自 mobile-proto-form.css 的 .spin） */
.pd-bar-add .spin { display: none; width: 15px; height: 15px; flex: none; border-radius: 50%; border: 2px solid var(--on-dark-30); border-top-color: var(--on-dark); animation: shop-spin .8s linear infinite; }
.pd-bar-add[aria-busy="true"] > svg { display: none; }
.pd-bar-add[aria-busy="true"] .spin { display: block; }

/* 提交订单按钮（结算页）等待中的旋转指示：同一条 .spin 口径 */
#ckSubmit[aria-busy="true"] > svg { display: none; }
#ckSubmit .spin { display: none; width: 15px; height: 15px; flex: none; border-radius: 50%; border: 2px solid rgba(0,0,0,.18); border-top-color: #1f1f1f; animation: shop-spin .8s linear infinite; }
#ckSubmit[aria-busy="true"] .spin { display: block; }
#ckSubmit[aria-busy="true"] { background: var(--accent-deep); }
#abSave[aria-busy="true"] { background: var(--accent-deep); }
#abSave[aria-busy="true"] svg { display: none; }
/* 商品已下架/库存不足时主按钮才是唯一允许降对比度的状态 */
.pd-bar-add:disabled { background: var(--on-dark-14); color: var(--on-dark-58); cursor: not-allowed; }

/* ══════════════════ 3. 购物车页（mobile-cart.html） ══════════════════ */
.cart-hero {
  min-height: 150px;
  padding: calc(var(--bar-h) + var(--safe-t) + 12px) var(--inset-r) 16px var(--inset-l);
  justify-content: flex-end;
  gap: 4px;
}
.cart-hero h1 { font-size: var(--h1-cart-hero); }
.cart-hero .sub-hero-sub { font-size: 12.5px; }
.cart-hero .sub-hero-photo { object-position: center 42%; }

/* 选择工具条：与白色商城工具条同一层 */
.cart-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 4px var(--inset-r) 4px var(--inset-l);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.cart-tools[hidden] { display: none; }

.cart-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding-right: 4px;
  font-size: 13.5px;
  color: var(--fg);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.cart-check[hidden] { display: none; }
.cart-check input {
  position: absolute;
  width: 1px; height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.cart-check-box {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--muted);
  border-radius: 6px;
  background: var(--surface);
  transition: background-color .15s ease, border-color .15s ease;
}
.cart-check-box svg {
  grid-area: 1 / 1;
  width: 12px; height: 12px;
  color: var(--on-dark);
  opacity: 0;
  transform: scale(.72);
  transition: opacity .14s ease, transform .14s ease;
}
.cart-check-box .dash { display: none; }
.cart-check input:checked + .cart-check-box,
.cart-check input:indeterminate + .cart-check-box { background: var(--fg); border-color: var(--fg); }
.cart-check input:checked + .cart-check-box .tick { opacity: 1; transform: none; }
.cart-check input:indeterminate + .cart-check-box .tick { opacity: 0; }
.cart-check input:indeterminate + .cart-check-box .dash { display: block; opacity: 1; transform: none; }
.cart-check input:focus-visible + .cart-check-box { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.cart-check:hover .cart-check-box { border-color: var(--fg); }

.cart-tools-count {
  flex: 0 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cart-tools-count b { color: var(--fg); font-family: var(--font-num); font-weight: 600; }
.cart-manage {
  flex: 0 0 auto;
  min-width: var(--tap);
  min-height: var(--tap);
  margin-left: auto;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg);
  transition: background-color .15s ease;
}
.cart-manage:hover { background: var(--on-ink-06); text-decoration: underline; text-underline-offset: 3px; }
.cart-manage:active { background: var(--on-ink-12); }
.cart-manage[aria-pressed="true"] { background: var(--on-ink-06); }

/* 分组：组头吸顶（top 落在固定顶栏下缘，不是视口顶缘——顶栏 z-index 60 会把它盖住） */
.cart-list {
  display: flex;
  flex-direction: column;
  padding: 0 var(--inset-r) 0 var(--inset-l);
}
.cart-list[hidden] { display: none; }
.cart-group { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.cart-group + .cart-group { margin-top: 6px; }
.cart-group-head {
  position: sticky;
  top: calc(var(--bar-h) + var(--safe-t));
  z-index: 20;
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 0;
  padding: 9px 2px 7px;
  background: var(--bg);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--fg);
}
.cart-group-n {
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cart-group-sum {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
}
.cart-group-sum b {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.cart-group-sum b::before { content: "￥"; font-size: 9.5px; margin-right: 1px; color: var(--muted); }
/* 本组一条都没勾选时：不显示 ￥ 与金额，只留一句「未选」（管理态才会出现） */
.cart-group-sum.is-none b { color: var(--muted); font-weight: 600; }
.cart-group-sum.is-none b::before { content: none; }

.cart-item {
  position: relative;
  padding: 12px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.cart-item.is-picked { border-color: var(--border); }
.cart-item:not(.is-picked) { background: color-mix(in oklch, var(--surface) 55%, var(--bg)); }
@media (hover: hover) {
  .cart-item:hover { border-color: color-mix(in oklch, var(--fg) 16%, var(--border)); box-shadow: 0 2px 12px color-mix(in oklch, var(--fg) 5%, transparent); }
}

.cart-item-top { display: flex; align-items: flex-start; gap: 10px; }
.cart-item-product {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: inherit;
}
/* 勾选列：视觉 22px，触摸区 44×44（伪元素左右各扩 10px，与右侧 12px 间隙不重叠） */
.cart-pick {
  flex: 0 0 auto;
  position: relative;
  width: 24px;
  height: 76px;
  display: flex;
  align-items: center;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
/* 只在管理态出现：常态没有勾选语义，就不摆一个不会生效的勾选框 */
.cart-pick[hidden] { display: none; }
.cart-pick::before {
  content: "";
  position: absolute;
  top: 50%; left: -10px;
  width: var(--tap); height: var(--tap);
  transform: translateY(-50%);
  border-radius: var(--radius-sm);
}
.cart-pick input {
  position: absolute;
  width: 1px; height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.cart-pick .cart-check-box { width: 22px; height: 22px; }
.cart-pick input:checked + .cart-check-box { background: var(--fg); border-color: var(--fg); }
.cart-pick input:checked + .cart-check-box .tick { opacity: 1; transform: none; }
.cart-pick input:focus-visible + .cart-check-box { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

.cart-item-photo {
  flex: 0 0 auto;
  width: 76px; height: 76px;
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--fg) 4%, var(--surface));
  transition: border-color .15s ease;
}
.cart-item-product:hover .cart-item-photo { border-color: var(--muted); }
.cart-item-ph {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--muted);
}
.cart-item-ph svg { width: 21px; height: 21px; opacity: .8; }
.cart-item-ph span { font-family: var(--font-num); font-size: 9.5px; letter-spacing: .02em; white-space: nowrap; }
.cart-item-img { display: block; width: 100%; height: 100%; object-fit: cover; }

.cart-item-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 1px;
}
.cart-item-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item-product:hover .cart-item-name { text-decoration: underline; text-underline-offset: 2px; }

/* 失效行（2026-10-25 QA 修复 P2-5）：商品下架 / 规格停用。
   原先静默渲染成空名称 + 0.00 元，用户无法判断为何金额是 0。 */
.cart-item.is-invalid .cart-item-name,
.cart-item.is-invalid .cart-item-unit { color: var(--muted); }
.cart-item.is-invalid .cart-item-photo { opacity: .45; }
.cart-item.is-invalid .qty { opacity: .45; pointer-events: none; }
.cart-item-invalid {
  display: inline-block;
  margin-left: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--on-ink-12);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  vertical-align: 2px;
  white-space: nowrap;
}
.cart-bar .cart-go[aria-disabled="true"] { opacity: .55; }

.cart-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 0;
  padding-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.cart-item-cat {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: .02em;
  color: var(--muted);
}
.cart-item-unit { font-variant-numeric: tabular-nums; }
.cart-item-unit b { font-family: var(--font-num); font-weight: 600; color: var(--fg); }

/* 单条删除：贴在卡片右上角，图标 + 44×44 触摸区；管理态收起但保留占位 */
.cart-item-del {
  flex: 0 0 auto;
  width: var(--tap);
  height: var(--tap);
  margin: -8px -8px 0 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--muted);
  transition: color .15s ease, background-color .15s ease;
}
.cart-item-del:hover { color: var(--fg); background: var(--on-ink-06); }
.cart-item-del:active { color: var(--fg); background: var(--on-ink-12); }
/* 图标本身 17×17（原型 SVG_TRASH 同尺寸）：svg 无显式尺寸时会撑满 44×44 按钮 */
.cart-item-del svg { width: 17px; height: 17px; }
.cart-list.is-manage .cart-item-del { visibility: hidden; }
.cart-list.is-manage .cart-pick { display: flex; }

.cart-item-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
/* 步进器：减号 / 数量 / 加号三段各 44px，中间数量可直接输入 */
.qty {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
}
.qty-btn {
  width: var(--tap);
  height: var(--tap);
  display: grid;
  place-items: center;
  color: var(--fg);
  background: var(--bg);
  transition: background-color .15s ease;
}
.qty-btn:hover { background: var(--on-ink-12); }
.qty-btn:active { background: var(--on-ink-12); }
.qty-btn[disabled] { color: var(--on-ink-45); cursor: not-allowed; background: var(--bg); }
.qty-btn:first-of-type { border-right: 1px solid var(--border); }
.qty-btn:last-of-type { border-left: 1px solid var(--border); }
.qty-num {
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  font-family: var(--font-num);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  appearance: none;
  -moz-appearance: textfield;
}
.qty-num::-webkit-outer-spin-button,
.qty-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-num:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: -2px; }

/* 小计：标签在上、金额在下，与步进器底边对齐 */
.cart-item-sub { flex: 1 1 auto; min-width: 0; margin: 0; text-align: right; line-height: 1.25; }
.cart-item-sub .k { display: block; font-size: 11px; color: var(--muted); }
.cart-item-sub .v {
  display: block;
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cart-item-sub .v::before { content: "￥"; font-size: 10px; margin-right: 1px; color: var(--muted); }

/* 继续购物：列表后的安静出口，不与结算条抢主按钮 */
.cart-after { padding: 14px var(--inset-r) 20px var(--inset-l); }
.cart-after[hidden] { display: none; }
.cart-continue {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: var(--tap);
  font-size: 13px;
  color: var(--muted);
  transition: color .15s ease;
}
.cart-continue svg { width: 14px; height: 14px; }
.cart-continue:hover { color: var(--fg); }
.cart-continue:active { color: var(--fg); background: var(--on-ink-06); border-radius: 3px; }

/* 空车 */
.cart-empty { padding: 34px 22px 8px; text-align: center; }
.cart-empty[hidden] { display: none; }
.cart-empty-ico { width: 56px; height: 56px; margin: 0 auto; color: var(--muted); }
.cart-empty-title { margin: 16px 0 0; font-size: 15px; font-weight: 600; }
.cart-empty-sub { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }
.cart-empty-go { display: inline-flex; margin-top: 20px; }

/* 空车推荐：用商城真实商品接住「车空了」的下一步（行是详情入口，不带快捷加购） */
.cart-rec { padding: 26px var(--inset-r) 4px var(--inset-l); }
.cart-rec[hidden] { display: none; }
.cart-rec-head {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg);
}
.cart-rec-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cart-rec-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
}
.cart-rec-photo {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: color-mix(in oklch, var(--fg) 4%, var(--surface));
  color: var(--muted);
}
.cart-rec-photo svg { width: 20px; height: 20px; }
.cart-rec-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cart-rec-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cart-rec-name {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-rec-item:hover .cart-rec-name { text-decoration: underline; text-underline-offset: 2px; }
.cart-rec-price {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.cart-rec-price::before { content: "￥"; font-size: 10px; margin-right: 1px; color: var(--muted); }
.cart-note { margin: 14px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--muted); }

/* 结算条左侧：合计（常态）/ 已选件数（管理态） */
.cart-bar-left { flex: 1 1 auto; min-width: 0; }
.cart-bar-meta { margin: 0; font-size: 11px; line-height: 1.35; color: var(--on-dark-70); font-variant-numeric: tabular-nums; }
.cart-bar-meta b { font-family: var(--font-num); font-weight: 600; color: var(--on-dark); }
.cart-bar-total { display: flex; align-items: baseline; gap: 5px; margin: 1px 0 0; }
.cart-bar-total span { font-size: 11px; color: var(--on-dark-70); }
.cart-bar-total b {
  font-family: var(--font-num);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--on-dark);
  font-variant-numeric: tabular-nums;
}
.cart-bar-total b::before { content: "￥"; font-size: 11px; margin-right: 1px; }
/* 管理态的「删除」：深色描边（金色让给去结算） */
.cart-go.is-manage { background: var(--on-dark-14); border-color: var(--on-dark-30); color: var(--on-dark); }
.cart-go.is-manage:hover { background: var(--on-dark-22); }
.cart-go.is-manage:active { background: var(--on-dark-30); }
.cart-go.is-manage .ico-go { display: none; }
.cart-go .ico-del { display: none; }
.cart-go.is-manage .ico-del { display: block; }
.cart-go:disabled { opacity: .5; cursor: not-allowed; }

/* 撤销条：浮在结算条之上，白实底与深色结算条分层 */
.cart-undo {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
  z-index: 56;
  width: calc(100% - 24px);
  max-width: 456px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg);
  box-shadow: 0 10px 30px color-mix(in oklch, var(--fg) 18%, transparent);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
body.has-cart .cart-undo { bottom: calc(var(--tab-h) + var(--safe-b) + 76px); }
.cart-undo.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.cart-undo-msg {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 12.5px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-undo-btn {
  flex: 0 0 auto;
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: 999px;
  background: var(--on-ink-06);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  transition: background-color .15s ease;
}
.cart-undo-btn:hover { background: var(--on-ink-12); }
.cart-undo-btn:active { background: var(--on-ink-12); }

/* ══════════════════ 4. 结算页（mobile-checkout.html） ══════════════════ */
/* 页头：把首屏让给收货信息，副标题直接给订单事实 */
.ck-hero { min-height: 132px; }
.ck-hero h1 { font-size: var(--h1-ck-hero); }
.ck-hero .sub-hero-sub { font-size: 12.5px; }
.ck-hero .sub-hero-photo { object-position: center 44%; }

/* 地址簿：点选回填；默认地址自动选中并高亮 */
.addr-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.addr-list[hidden] { display: none; }
.addr {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.addr:hover { border-color: var(--on-ink-45); background: var(--on-ink-06); }
/* 选中态是金色描边 + 浅金底（暗底纹），前景不变 */
.addr.is-on { border-color: var(--accent-ink); background: var(--accent-soft); }
.addr.is-on:hover { border-color: var(--accent-ink); background: color-mix(in oklch, var(--accent) 20%, transparent); }
.addr-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.addr-phone { font-family: var(--font-num); font-size: 12.5px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.addr-tag {
  flex: none;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--on-ink-06);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.addr.is-on .addr-tag { background: var(--accent); color: #1f1f1f; }
.addr-detail { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.addr.is-on .addr-detail { color: var(--ink-2); }

/* 商品清单 / 金额明细 */
.il { margin-top: 14px; border-top: 1px solid var(--border); }
.il-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.il-ico {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--on-ink-06);
  color: var(--muted);
}
.il-ico svg { width: 21px; height: 21px; }
.il-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.il-main { flex: 1 1 auto; min-width: 0; }
.il-name { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.il-meta { display: block; margin-top: 2px; font-family: var(--font-num); font-size: 12px; color: var(--muted); }
.il-sub { flex: none; font-family: var(--font-num); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.sum { margin-top: 14px; }
.sum-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13.5px; color: var(--muted); }
.sum-row b { font-family: var(--font-num); font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
/* 合计单独一块：靠分隔线与上方条目区分，不用另一种底色 */
.sum-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.sum-total span { font-size: 14px; font-weight: 700; }
.sum-total b { font-family: var(--font-num); font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sum-total b::before { content: "￥"; font-size: 12px; margin-right: 1px; }

/* 空车：站点在这一步把表单整体换成空态 */
.ck-empty { padding: 52px var(--inset-r) 60px var(--inset-l); background: var(--surface); text-align: center; }
.ck-empty[hidden] { display: none; }
.ck-empty-ico { width: 54px; height: 54px; margin: 0 auto; color: var(--on-ink-45); }
.ck-empty-title { margin-top: 14px; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.ck-empty-sub { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.ck-empty .cart-go { display: inline-flex; margin-top: 20px; }

/* 结算页底部的表单表单区（沿用 .sec/.fld/.ctl，只补本页特有的 3 列地区回退栅格间距） */
.ck-form[hidden] { display: none; }
.ck-form .sec:first-child { padding-top: 18px; }

/* ══════════════════ 5. 地址簿页（mobile-addresses.html） ══════════════════ */
/* 页头：这一屏没有照片，用纯深色块把首屏让给地址列表。
   覆盖共享 .sub-hero 的 padding 时必须把 --safe-t 带上：顶栏占 safe-t + bar-h。 */
.ab-hero { padding: calc(var(--bar-h) + var(--safe-t) + 20px) var(--inset-r) 20px var(--inset-l); }
.ab-hero h1 { font-size: var(--h1-ab-hero); }
.ab-hero .sub-hero-sub { font-size: 12.5px; }
/* 选用态（?from=checkout）时顶栏左侧多一个返回结算的图标按钮 */
.appbar-back {
  flex: 0 0 auto;
  width: var(--tap);
  height: var(--tap);
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--on-dark);
  transition: background-color .15s ease;
}
.appbar-back[hidden] { display: none; }
.appbar-back:hover { background: var(--on-dark-14); }
.appbar-back svg { width: 22px; height: 22px; }

.ab-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; list-style: none; }
.ab {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .15s ease, background-color .15s ease;
}
.ab:hover { border-color: var(--on-ink-45); }
.ab.is-on { border-color: var(--accent-ink); background: var(--accent-soft); }
.ab.is-on:hover { border-color: var(--accent-ink); }
.ab-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ab-name { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 15px; font-weight: 600; }
.ab-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-phone { flex: none; font-family: var(--font-num); font-size: 13px; color: var(--muted); letter-spacing: .02em; }
.ab-tag {
  flex: none;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--on-ink-06);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.ab-detail { margin-top: 5px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.ab-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 10px;
  padding-top: 7px;
  border-top: 1px solid var(--border);
}
.ab-act {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: var(--tap);
  padding: 0 9px;
  border-radius: var(--radius-sm);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  transition: background-color .15s ease;
}
.ab-act svg { width: 14px; height: 14px; }
.ab-act:hover { background: var(--on-ink-06); }
.ab-act:active { background: var(--on-ink-12); }
.ab-act--del { color: var(--err); }
.ab-act--del:hover { background: var(--err-soft); }
.ab-act--del:active { background: color-mix(in oklch, var(--err) 16%, transparent); }
/* 选用：描边胶囊而不是实心，实心金色留给唯一的主按钮 */
.ab-act--pick { border: 1px solid var(--border); }
.ab-act--pick:hover { border-color: var(--on-ink-45); }

/* 删除二次确认：就地替换操作行，不用弹层，也就不会有焦点陷阱 */
.ab-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); }
.ab-confirm-q { margin-right: auto; font-size: 13px; color: var(--fg); }

.ab-empty { padding: 40px 0 34px; text-align: center; }
.ab-empty[hidden] { display: none; }
.ab-empty-ico { width: 48px; height: 48px; margin: 0 auto; color: var(--on-ink-45); }
.ab-empty-title { margin-top: 12px; font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.ab-empty-sub { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.ab-add { width: 100%; margin-top: 16px; }

/* 设为默认：整行可点的开关，44px 高 */
.ab-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  margin-top: 14px;
  padding: 0 2px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--fg);
  cursor: pointer;
  transition: background-color .15s ease;
}
.ab-switch:hover { background: var(--on-ink-06); }
.ab-switch input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent-ink);
  cursor: pointer;
}

/* 表单态 / 列表态的区块切换 */
.ab-sec[hidden] { display: none; }
/* 底部保存条的「取消」是描边次级按钮，主按钮仍是 .cart-go */
.ab-cancel {
  flex: 0 0 auto;
  min-height: var(--tap);
  padding: 0 16px;
  border: 1px solid var(--on-dark-22);
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-dark);
  transition: background-color .15s ease, border-color .15s ease;
}
.ab-cancel:hover { background: var(--on-dark-14); border-color: var(--on-dark-40); }
.ab-cancel:active { background: var(--on-dark-22); }
.ab-bar .cart-go { flex: 1 1 auto; justify-content: center; }
/* 列表态不显示保存条（用 [hidden] 而不是 aria-hidden：
   条里有可聚焦按钮，aria-hidden 会把焦点留在不可见控件上） */
.ab-bar[hidden] { display: none; }

/* ══════════════════ 适配层 ══════════════════ */
/* 触屏上 :hover 会粘住：只还原本文件新增的悬停，按压反馈保留 */
@media (hover: none) {
  .round-btn:hover { background: none; color: var(--fg); }
  .goods:hover { transform: none; }
  .goods-name a:hover { text-decoration: none; }
  .sort-btn:hover svg { color: var(--muted); }
  .shop-empty-reset:hover { border-color: var(--on-ink-45); background: none; }
  .qty-btn:hover { background: var(--bg); }
  .cart-item-del:hover { color: var(--muted); background: none; }
  .cart-item:hover { border-color: transparent; box-shadow: none; }
  .cart-item.is-picked:hover { border-color: var(--border); }
  .cart-item-product:hover .cart-item-name { text-decoration: none; }
  .cart-item-product:hover .cart-item-photo { border-color: var(--border); }
  .cart-manage:hover { background: none; text-decoration: none; }
  .cart-check:hover .cart-check-box { border-color: var(--muted); }
  .cart-continue:hover { color: var(--muted); }
  .cart-undo-btn:hover { background: var(--on-ink-06); }
  .cart-rec-item:hover .cart-rec-name { text-decoration: none; }
  .addr:hover { border-color: var(--border); background: var(--surface); }
  .addr.is-on:hover { border-color: var(--accent-ink); background: var(--accent-soft); }
  .ab:hover { border-color: var(--border); }
  .ab.is-on:hover { border-color: var(--accent-ink); }
  .ab-act:hover { background: none; }
  .ab-act--del:hover { background: none; }
  .store-sku-btn:hover { background: var(--surface); border-color: var(--border); }
  .store-sku-btn--active:hover { background: var(--accent-soft); border-color: var(--accent-ink); }
  .pd-back:hover { background: var(--surface); border-color: var(--border); }
  .cart-go.is-manage:hover { background: var(--on-dark-14); }
  .ab-cancel:hover { background: transparent; border-color: var(--on-dark-22); }
}

/* 超窄机型（≤359px）：只收间隙与字号，触摸区保持 44px */
@media (max-width: 359px) {
  .goods-grid { gap: 8px; }
  .goods-body { padding: 9px 10px 10px; }
  .goods-name { font-size: 13.5px; }
  .cart-item { padding: 11px; }
  .cart-item-top { gap: 8px; }
  .cart-item-product { gap: 10px; }
  .cart-item-foot { gap: 8px; }
  .cart-item-sub .v { font-size: 15px; }
  .cart-item-del { margin-right: -6px; }
  .cart-item-name { font-size: 13.5px; }
  .cart-item-meta { font-size: 11.5px; }
  .cart-tools { gap: 8px; }
  .cart-bar-meta { font-size: 10.5px; }
  .cart-bar-total span { font-size: 10px; }
  .cart-bar-total b { font-size: 17px; }
  .cart-go { padding-inline: 16px; font-size: 14px; }
  .cart-rec-item { gap: 8px; padding: 8px; }
  .cart-rec-name { font-size: 13px; }
  .pd-title { font-size: var(--h1-product-narrow); }
  .pd-price b { font-size: 23px; }
  .pd-photo { max-width: 232px; }
}

/* 横屏矮视口：页头与条目收紧，底部条仍保持一行 */
@media (orientation: landscape) and (max-height: 560px) {
  .shop-hero { min-height: 106px; }
  .cart-hero { min-height: 112px; padding-top: calc(var(--bar-h) + var(--safe-t) + 8px); padding-bottom: 12px; }
  .cart-hero h1 { font-size: var(--h1-article-narrow); }
  .cart-group { padding-top: 6px; }
  .cart-item { padding: 10px; }
  .cart-item-foot { margin-top: 8px; padding-top: 8px; }
  .cart-empty { padding: 20px 16px 4px; }
  .cart-empty-ico { width: 44px; height: 44px; }
  .cart-empty-go { margin-top: 14px; }
  .cart-rec { padding-top: 16px; }
  .pd-stage { min-height: 214px; }
  .ck-hero, .ab-hero { min-height: 112px; }
}
