/* ==========================================================================
   WEKING 威王 — commerce.css
   下单模块样式：页头购物车按钮、购物车抽屉、轻提示、产品卡快捷加购、
   结算页（order.html）、订单查询页（orders.html）。
   依赖 assets/css/main.css 的设计 token 与基础组件；不改动 main.css。
   ========================================================================== */

/* ==========================================================================
   1. 页头购物车按钮（Lead 在 site.js 的 header 中注入 markup，此处只负责样式）
   ========================================================================== */
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(16, 19, 22, 0.16);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.cart-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.cart-btn:hover {
  color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-1px);
}

.cart-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.cart-btn__count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-family: var(--ff-num);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
  box-shadow: 0 0 0 2px #fff;
}

.cart-btn__count[hidden] {
  display: none;
}

/* 深色页头（page-hero 上方）使用白色描边 */
.site-header--light .cart-btn {
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
}

.site-header--light .cart-btn:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.site-header--light .cart-btn__count {
  box-shadow: 0 0 0 2px var(--ink);
}

/* 吸顶后页头为白底，恢复深色描边 */
.site-header.is-stuck .cart-btn {
  border-color: rgba(16, 19, 22, 0.16);
  color: var(--ink);
}

.site-header.is-stuck .cart-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: transparent;
}

.site-header.is-stuck .cart-btn__count {
  box-shadow: 0 0 0 2px #fff;
}

/* ==========================================================================
   2. 购物车抽屉
   ========================================================================== */
body.weking-cart-open {
  overflow: hidden;
}

.cart-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  pointer-events: none;
}

.cart-layer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 14, 0.52);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.cart-layer.is-open .cart-overlay {
  opacity: 1;
}

.cart-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 420px;
  max-width: 100%;
  background: var(--paper);
  box-shadow: -24px 0 64px rgba(16, 19, 22, 0.2);
  transform: translateX(100%);
  transition: transform 0.52s var(--ease-out);
  outline: none;
}

.cart-layer.is-open .cart-drawer {
  transform: translateX(0);
}

.cart-drawer:focus {
  outline: none;
}

.cart-drawer__head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line-2);
  flex: 0 0 auto;
}

.cart-drawer__title {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.cart-drawer__count {
  font-size: 12px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

.cart-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.cart-drawer__close svg {
  width: 16px;
  height: 16px;
}

.cart-drawer__close:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.cart-drawer__close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.cart-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 26px;
  -webkit-overflow-scrolling: touch;
}

.cart-drawer__foot {
  flex: 0 0 auto;
  border-top: 1px solid var(--line-2);
  padding: 18px 26px calc(18px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
}

.cart-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cart-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-2);
}

.cart-item:last-child {
  border-bottom: 0;
}

.cart-item__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: var(--r-sm);
  background: radial-gradient(120% 120% at 30% 20%, #fbfaf8, #f1eeea);
  overflow: hidden;
}

.cart-item__media img {
  width: 100%;
  height: 100%;
  padding: 8px;
  object-fit: contain;
}

.cart-item__noimg {
  font-family: var(--ff-num);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  text-align: center;
  padding: 4px;
}

.cart-item__main {
  min-width: 0;
}

.cart-item__top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cart-item__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.25s;
}

.cart-item__title:hover {
  color: var(--brand);
}

.cart-item__del {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transition: color 0.25s, background 0.25s;
}

.cart-item__del svg {
  width: 15px;
  height: 15px;
}

.cart-item__del:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.cart-item__model {
  margin: 4px 0 0;
  font-family: var(--ff-en);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.cart-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.cart-item__price {
  font-family: var(--ff-num);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.cart-qty {
  display: inline-flex;
  align-items: center;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: #fff;
}

.cart-qty__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--slate);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.cart-qty__btn:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.cart-qty__btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--brand-glow);
}

.cart-qty__input {
  width: 34px;
  height: 30px;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  text-align: center;
  font-family: var(--ff-num);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.cart-qty__input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--brand-glow);
}

.cart-item__sub {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted-2);
}

.cart-item__sub b {
  font-family: var(--ff-num);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-left: 4px;
}

/* 抽屉底部小计 / 运费 / 按钮 */
.cart-foot__rows {
  display: grid;
  gap: 8px;
}

.cart-foot__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--muted);
}

.cart-foot__row b {
  font-family: var(--ff-num);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.cart-foot__hint {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--brand-2);
}

.cart-foot__hint.is-free {
  color: var(--muted);
}

.cart-foot__actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.cart-foot__actions .btn {
  justify-content: center;
}

.cart-foot__note {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted-2);
  text-align: center;
}

/* 空车状态 */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 12px 48px;
}

.cart-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--bone);
  color: var(--muted-2);
}

.cart-empty__icon svg {
  width: 32px;
  height: 32px;
}

.cart-empty__title {
  margin: 20px 0 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.cart-empty__desc {
  margin: 8px 0 22px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 240px;
}

/* ==========================================================================
   3. 轻提示 toast
   ========================================================================== */
.shop-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 40px);
  padding: 13px 16px 13px 18px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 20px 46px rgba(16, 19, 22, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px);
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease-out),
    visibility 0.32s;
}

.shop-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.shop-toast__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
}

.shop-toast__mark svg {
  width: 13px;
  height: 13px;
}

.shop-toast__text {
  font-size: 13.5px;
  line-height: 1.5;
  white-space: nowrap;
}

.shop-toast__action {
  flex: 0 0 auto;
  padding: 4px 0 4px 14px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s;
}

.shop-toast__action:hover {
  color: var(--brand-3);
}

.shop-toast__action[hidden] {
  display: none !important;
}

/* ==========================================================================
   4. 产品卡快捷加购（由 commerce.js 的 decorate() 注入）
   ========================================================================== */
.p-card__shop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line-2);
}

.p-card__price {
  font-family: var(--ff-num);
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.p-card__add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.p-card__add svg {
  width: 13px;
  height: 13px;
}

.p-card__add:hover {
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-1px);
}

.p-card__add:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-glow);
}

/* ==========================================================================
   5. 结算页 / 订单查询页共用
   ========================================================================== */
.shop-section {
  background: var(--bone);
}

.demo-bar {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 34px;
  padding: 16px 20px;
  border: 1px solid rgba(196, 28, 79, 0.22);
  border-radius: var(--r-sm);
  background: var(--brand-soft);
}

.demo-bar__tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-family: var(--ff-en);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
}

.demo-bar p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--brand-2);
}

.order-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 28px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--paper);
}

.order-empty[hidden] {
  display: none !important;
}

.order-empty__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--bone);
  color: var(--muted-2);
}

.order-empty__icon svg {
  width: 36px;
  height: 36px;
}

.order-empty__title {
  margin: 22px 0 0;
  font-size: clamp(20px, 2.2vw, 26px);
  color: var(--ink);
}

.order-empty__desc {
  margin: 10px 0 24px;
  max-width: 460px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.order-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.ord-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--bone-2);
  color: var(--slate);
}

.ord-badge.is-pending {
  background: #fdf3e1;
  color: #9a6414;
}

.ord-badge.is-confirmed,
.ord-badge.is-paid {
  background: #e8f1fb;
  color: #1e5a96;
}

.ord-badge.is-shipped {
  background: #e9f4ee;
  color: #226845;
}

.ord-badge.is-done {
  background: #eef1ee;
  color: #3d444b;
}

.ord-badge.is-cancelled {
  background: #f3eeee;
  color: #8a5a5a;
}

/* ==========================================================================
   6. 结算页（order.html）
   ========================================================================== */
.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 0.88fr);
  gap: 48px;
  align-items: start;
}

.order-layout[hidden] {
  display: none !important;
}

.order-main {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.order-block {
  padding: 26px 28px 28px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--paper);
}

.order-block__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
}

.order-block__no {
  font-family: var(--ff-num);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--brand);
}

.order-block__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.order-block__en {
  margin-left: auto;
  font-family: var(--ff-en);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.order-block .form-grid {
  gap: 18px;
}

.order-block__note {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted-2);
}

.field__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted-2);
}

.field__err {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--brand-2);
}

.field__err[hidden] {
  display: none !important;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(196, 28, 79, 0.1);
}

.field:has(input[aria-invalid="true"]) label {
  color: var(--brand-2);
}

/* 配送 / 支付 / 发票选项 */
.pay-list {
  display: grid;
  gap: 10px;
}

.pay-list[aria-invalid="true"] {
  padding: 3px;
  border-radius: var(--r-sm);
  box-shadow: 0 0 0 3px rgba(196, 28, 79, 0.1);
}

.pay-opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.pay-opt:hover {
  border-color: var(--muted-2);
}

.pay-opt.is-selected {
  border-color: var(--brand);
  background: #fffafb;
  box-shadow: 0 0 0 3px rgba(196, 28, 79, 0.08);
}

.pay-opt.is-disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.pay-opt.is-disabled:hover {
  border-color: var(--line);
}

.pay-opt input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--brand);
}

.pay-opt__body {
  min-width: 0;
}

.pay-opt__name {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.pay-opt__desc {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
}

.pay-bank {
  margin-top: 12px;
  padding: 16px 18px;
  border-radius: var(--r-sm);
  background: var(--bone);
}

.pay-bank[hidden] {
  display: none !important;
}

.pay-bank strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.pay-bank__rows {
  margin: 0;
  display: grid;
  gap: 6px;
}

.pay-bank__rows > div {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  line-height: 1.7;
}

.pay-bank__rows dt {
  flex: 0 0 76px;
  color: var(--muted-2);
}

.pay-bank__rows dd {
  margin: 0;
  color: var(--slate);
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--slate);
  cursor: pointer;
}

.check-line input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.u-mt-16 {
  margin-top: 16px;
}

/* 右侧订单摘要 */
.order-side {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  min-width: 0;
}

.order-summary {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: 0 14px 34px rgba(16, 19, 22, 0.05);
}

.order-summary__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.order-summary__count {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted-2);
  white-space: nowrap;
}

.order-items {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ord-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-2);
}

.ord-item:first-child {
  padding-top: 0;
}

.ord-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ord-item__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: var(--r-sm);
  background: radial-gradient(120% 120% at 30% 20%, #fbfaf8, #f1eeea);
  overflow: hidden;
}

.ord-item__media img {
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
}

.ord-item__main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ord-item__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  text-decoration: none;
}

.ord-item__name:hover {
  color: var(--brand);
}

.ord-item__meta {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

.ord-item__sum {
  font-family: var(--ff-num);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.order-totals {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.order-totals > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--muted);
}

.order-totals dt {
  margin: 0;
}

.order-totals dd {
  margin: 0;
  font-family: var(--ff-num);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.order-totals__grand {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
}

.order-totals__grand dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.order-totals__grand dd {
  font-size: 28px;
  font-weight: 600;
  color: var(--brand);
}

.order-ship-hint {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--brand-2);
}

.order-summary .btn {
  margin-top: 18px;
}

.order-summary__note {
  margin: 14px 0 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted-2);
  text-align: center;
}

/* 提交成功面板 */
.order-success {
  max-width: 760px;
  margin: 0 auto;
  padding: 52px 48px 46px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: 0 22px 54px rgba(16, 19, 22, 0.07);
  text-align: center;
}

.order-success[hidden] {
  display: none !important;
}

.order-success:focus {
  outline: none;
}

.order-success__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}

.order-success__mark svg {
  width: 32px;
  height: 32px;
}

.order-success__title {
  margin: 22px 0 0;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.order-success__sub {
  margin: 12px auto 0;
  max-width: 460px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.order-success__no {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 0;
  padding: 16px 20px;
  border-radius: var(--r-sm);
  background: var(--bone);
}

.order-success__no-label {
  font-size: 12px;
  color: var(--muted);
}

.order-success__no strong {
  font-family: var(--ff-num);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.ord-copy {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  cursor: pointer;
  transition: color 0.25s;
}

.ord-copy:hover {
  color: var(--brand-2);
}

.ord-copy__ok {
  font-size: 12px;
  color: var(--muted);
}

.ord-copy__ok[hidden] {
  display: none !important;
}

.order-success__rows {
  max-width: 520px;
  margin: 30px auto 0;
  text-align: left;
}

.ord-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.5px;
  line-height: 1.65;
}

.ord-row:last-child {
  border-bottom: 0;
}

.ord-row dt {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
}

.ord-row dd {
  margin: 0;
  color: var(--ink);
  text-align: right;
  word-break: break-word;
}

.ord-row dd b {
  font-family: var(--ff-num);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

.order-success__note {
  max-width: 540px;
  margin: 24px auto 0;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--muted-2);
}

.order-success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
}

/* 打印：只输出成功面板 */
@media print {
  .site-header,
  .site-footer,
  .to-top,
  .page-hero,
  .demo-bar,
  .order-success__actions,
  .order-success__note,
  .cart-layer,
  .shop-toast,
  .ord-copy {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .section {
    padding: 0;
  }

  .shop-section {
    background: #fff;
  }

  .order-success {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}

/* ==========================================================================
   7. 订单查询页（orders.html）
   ========================================================================== */
.ord-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.ord-search {
  display: flex;
  flex: 1 1 320px;
  max-width: 460px;
  gap: 10px;
}

.ord-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
  font-size: 14px;
  color: var(--text);
}

.ord-search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.ord-search .btn {
  flex: 0 0 auto;
  height: 48px;
}

.ord-count {
  margin: 0 0 16px;
  font-size: 12.5px;
  color: var(--muted);
}

.ord-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding: 16px 20px;
  border: 1px solid rgba(196, 28, 79, 0.32);
  border-radius: var(--r-sm);
  background: var(--brand-soft);
}

.ord-confirm[hidden] {
  display: none !important;
}

.ord-confirm p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--brand-2);
}

.ord-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ord-list {
  display: grid;
  gap: 16px;
}

.ord-card {
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--paper);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.ord-card.is-highlight {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.ord-card__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto 20px;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 20px 24px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.25s;
}

.ord-card__head:hover {
  background: #fcfbf9;
}

.ord-card__head:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--brand-glow);
}

.ord-card__lead {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ord-card__no {
  font-family: var(--ff-num);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.ord-card__meta {
  font-size: 12.5px;
  color: var(--muted-2);
}

.ord-card__status {
  justify-self: end;
}

.ord-card__total {
  font-family: var(--ff-num);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.ord-card__chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-2);
  transition: transform 0.35s var(--ease);
}

.ord-card__chev svg {
  width: 16px;
  height: 16px;
}

.ord-card__head[aria-expanded="true"] .ord-card__chev {
  transform: rotate(180deg);
}

.ord-card__panel {
  padding: 4px 24px 24px;
  border-top: 1px solid var(--line-2);
}

.ord-card__panel[hidden] {
  display: none !important;
}

.ord-card__items {
  display: grid;
  gap: 2px;
  padding-top: 8px;
}

.ord-card__items .ord-item {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  padding: 10px 0;
}

.ord-card__items .ord-item__media {
  width: 46px;
  height: 46px;
}

.ord-card__rows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 32px;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}

.ord-card__rows .ord-row {
  padding: 7px 0;
  border-bottom: 0;
  font-size: 13px;
}

.ord-card__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
}

.ord-link {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.25s;
}

.ord-link:hover {
  color: var(--brand-2);
  text-decoration: underline;
}

.ord-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-glow);
  border-radius: 2px;
}

/* ==========================================================================
   8. 响应式
   ========================================================================== */
@media (max-width: 1024px) {
  .order-layout {
    gap: 34px;
  }

  .order-block {
    padding: 24px 22px 26px;
  }

  .order-summary {
    padding: 22px;
  }

  .ord-card__head {
    gap: 14px;
    padding: 18px 20px;
  }
}

/* ≤900px：结算页单栏 */
@media (max-width: 900px) {
  .order-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .order-side {
    position: static;
  }

  .order-items {
    max-height: none;
  }

  .ord-card__rows {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 720px) {
  .cart-btn {
    width: 40px;
    height: 40px;
  }

  .cart-btn svg {
    width: 18px;
    height: 18px;
  }

  .cart-btn__count {
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    font-size: 10px;
  }

  /* 抽屉：手机宽度 92vw */
  .cart-drawer {
    width: 92vw;
  }

  .cart-drawer__head {
    padding: 18px 20px;
  }

  .cart-drawer__body {
    padding: 0 20px;
  }

  .cart-drawer__foot {
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .cart-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    padding: 16px 0;
  }

  .cart-item__media {
    width: 72px;
    height: 72px;
  }

  .shop-toast {
    bottom: 18px;
    padding: 12px 14px;
  }

  .shop-toast__text {
    white-space: normal;
  }

  .p-card__shop {
    margin-top: 12px;
    padding-top: 11px;
  }

  .p-card__price {
    font-size: 19px;
  }

  .demo-bar {
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 26px;
  }

  .demo-bar p {
    font-size: 12.5px;
  }

  .order-block {
    padding: 20px 18px 22px;
  }

  .order-block__head {
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-bottom: 16px;
  }

  .order-block__en {
    display: none;
  }

  .order-summary {
    padding: 20px;
  }

  .order-totals__grand dd {
    font-size: 24px;
  }

  .order-success {
    padding: 36px 20px 30px;
  }

  .order-success__no {
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
  }

  .order-success__no strong {
    font-size: 23px;
  }

  .order-success__actions {
    flex-direction: column;
  }

  .order-success__actions .btn {
    width: 100%;
  }

  .ord-tools {
    align-items: stretch;
  }

  .ord-search {
    max-width: none;
  }

  .ord-card__head {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "lead chev"
      "status total";
    gap: 10px 14px;
    padding: 16px 18px;
  }

  .ord-card__lead {
    grid-area: lead;
  }

  .ord-card__status {
    grid-area: status;
    justify-self: start;
  }

  .ord-card__total {
    grid-area: total;
    justify-self: end;
    font-size: 18px;
  }

  .ord-card__chev {
    grid-area: chev;
  }

  .ord-card__panel {
    padding: 4px 18px 20px;
  }

  .ord-confirm {
    align-items: flex-start;
  }

  .order-empty {
    padding: 52px 20px;
  }

  .order-empty__actions {
    flex-direction: column;
    width: 100%;
  }

  .order-empty__actions .btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .ord-card__no {
    font-size: 18px;
  }

  .ord-card__head {
    grid-template-areas:
      "lead chev"
      "status status"
      "total total";
  }

  .ord-card__status,
  .ord-card__total {
    justify-self: start;
  }
}
