﻿/*!
 * 前台商城样式 shop.css
 * ---------------------------------------------------------------------------
 * 依赖：/shared/tokens.css 必须先于本文件加载（提供 --brand-* / --price /
 *       --surface / --border / --r-* / --shadow-* / --font / --mono 等令牌）。
 *
 * 约定：
 *   1. 所有颜色一律取自令牌变量；半透明玻璃/遮罩用 color-mix() 从令牌派生，
 *      并用 @supports 提供退化为不透明的兜底，绝不写死十六进制色值。
 *   2. 间距遵循 8px 节奏；金额/计数一律 tabular-nums。
 *   3. 过渡统一 200ms cubic-bezier(.2,.8,.2,1)。
 */

/* ======================================================================
   0. 本地常量（从令牌推导半透明色，避免硬编码）
   ==================================================================== */

:root {
  /* 只用于「品牌渐变之上的前景色」与二维码专用底色。
     这两个值不随明暗主题变化，本就不属于主题令牌，因此在此集中声明一次，
     避免在组件里散落硬编码色值。 */
  --sh-on-brand: #ffffff;
  --sh-qr-bg: #ffffff;
}

/* ======================================================================
   1. 基础
   ==================================================================== */

.sh-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-app);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.sh-noscroll {
  overflow: hidden;
}
.sh-shell {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
.sh-main {
  flex: 1 1 auto;
  padding: 24px 0 64px;
}

.sh-muted {
  color: var(--text-3);
}


.sh-linkbtn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.sh-linkbtn:hover {
  color: var(--brand-600);
}
:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

/* ======================================================================
   2. 通用控件：按钮 / 输入 / 徽章 / 面板 / 加载
   ==================================================================== */

.sh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-1);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(.2, .8, .2, 1),
    box-shadow 200ms cubic-bezier(.2, .8, .2, 1),
    background-color 200ms cubic-bezier(.2, .8, .2, 1),
    border-color 200ms cubic-bezier(.2, .8, .2, 1), color 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-btn:active {
  transform: translateY(1px) scale(.99);
}
.sh-btn[disabled],
.sh-btn.is-disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}
.sh-btn--primary {
  background-image: var(--brand-grad);
  border-color: transparent;
  color: var(--sh-on-brand);
  box-shadow: var(--shadow-brand);
}
.sh-btn--primary:hover:not([disabled]) {
  filter: brightness(1.06);
}
.sh-btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}
.sh-btn--ghost:hover:not([disabled]) {
  border-color: var(--brand-300);
  color: var(--brand-600);
}
.sh-btn--soft {
  background: var(--brand-50);
  border-color: transparent;
  color: var(--brand-600);
}

.sh-btn--sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: var(--r-sm);
}
.sh-btn--lg {
  height: 48px;
  padding: 0 24px;
  font-size: 16px;
  border-radius: var(--r-lg);
}
.sh-btn--block {
  display: flex;
  width: 100%;
}
.sh-btn--loading {
  pointer-events: none;
  opacity: .82;
}

.sh-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: all 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-iconbtn:hover {
  border-color: var(--brand-300);
  color: var(--brand-600);
}

.sh-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-1);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 200ms cubic-bezier(.2, .8, .2, 1),
    box-shadow 200ms cubic-bezier(.2, .8, .2, 1);
}

.sh-input::placeholder {
  color: var(--text-3);
}
.sh-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.sh-input.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-bg);
}
.sh-field {
  margin-bottom: 16px;
}
.sh-field:last-child {
  margin-bottom: 0;
}
.sh-field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}
.sh-field__req {
  color: var(--danger);
}
.sh-field__hint {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 400;
}
.sh-field__err {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}
.sh-field__err::before {
  content: '⚠ ';
}
.sh-field.is-invalid .sh-input {
  border-color: var(--danger);
}

.sh-panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.sh-panel + .sh-panel {
  margin-top: 16px;
}
.sh-panel__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
}
.sh-panel__title::before {
  content: '';
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background-image: var(--brand-grad);
}

.sh-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.sh-badge--s0 {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning);
}
.sh-badge--s1 {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info);
}
.sh-badge--s2,
.sh-badge--auto {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success);
}
.sh-badge--s3 {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success);
  filter: saturate(.7);
}
.sh-badge--s4 {
  background: var(--surface-2);
  color: var(--text-3);
  border-color: var(--border-strong);
}
.sh-badge--brand {
  background: var(--brand-50);
  color: var(--brand-600);
  border-color: var(--brand-200);
}

.sh-spin {
  display: inline-block;
  border: 2px solid var(--brand-200);
  border-top-color: var(--brand-500);
  border-radius: var(--r-pill);
  animation: sh-spin .7s linear infinite;
  vertical-align: -2px;
}
@keyframes sh-spin {
  to {
    transform: rotate(360deg);
  }
}

.sh-sk {
  border-radius: var(--r-sm);
  background: var(--surface-2);
  background-image: linear-gradient(90deg, transparent, var(--border), transparent);
  background-size: 240px 100%;
  background-repeat: no-repeat;
  animation: sh-shimmer 1.3s infinite linear;
}
.sh-sk--cover {
  aspect-ratio: 16 / 10;
  border-radius: 0;
}
.sh-sk--line {
  height: 12px;
  margin-bottom: 8px;
}
@keyframes sh-shimmer {
  from {
    background-position: -240px 0;
  }
  to {
    background-position: calc(100% + 240px) 0;
  }
}

/* ======================================================================
   3. 空状态
   ==================================================================== */

.sh-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 56px 24px;
  text-align: center;
}
.sh-empty__art {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  margin-bottom: 8px;
  border-radius: var(--r-xl);
  background: var(--surface-2);
  color: var(--brand-400);
}
.sh-empty__title {
  margin: 0;
  color: var(--text-1);
  font-size: 15px;
  font-weight: 600;
}
.sh-empty__text {
  margin: 0;
  max-width: 380px;
  color: var(--text-3);
  font-size: 13px;
}
.sh-empty__action {
  margin-top: 12px;
}

/* ======================================================================
   4. 顶栏
   ==================================================================== */

.sh-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 64px;
  border-bottom: 1px solid var(--border);
}
.sh-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--surface);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .sh-header::before {
    background: color-mix(in srgb, var(--surface) 84%, transparent);
  }
}
.sh-header__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}

.sh-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}
.sh-brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background-image: var(--brand-grad);
  color: var(--sh-on-brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: var(--shadow-brand);
}
.sh-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.sh-brand__text b {
  color: var(--text-1);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .01em;
}
.sh-brand__text i {
  color: var(--text-3);
  font-size: 11px;
  font-style: normal;
}

.sh-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
}
.sh-nav__item {
  position: relative;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--r-md);
  background: none;
  color: var(--text-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 200ms cubic-bezier(.2, .8, .2, 1),
    background-color 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-nav__item:hover {
  background: var(--brand-50);
  color: var(--brand-600);
}
.sh-nav__item.is-active {
  color: var(--brand-600);
  font-weight: 600;
}
.sh-nav__item--btn {
  font-family: inherit;
  line-height: inherit;
}
.sh-nav__item.is-active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background-image: var(--brand-grad);
}

.sh-header__ops {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.sh-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 200px;
  height: 36px;
  padding: 0 10px 0 32px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color 200ms cubic-bezier(.2, .8, .2, 1),
    box-shadow 200ms cubic-bezier(.2, .8, .2, 1), width 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-search:focus-within {
  width: 240px;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.sh-search__ico {
  position: absolute;
  left: 9px;
  display: inline-flex;
  color: var(--text-3);
  pointer-events: none;
}
.sh-search input {
  width: 100%;
  height: 100%;
  border: 0;
  background: none;
  color: var(--text-1);
  font-family: inherit;
  font-size: 13px;
}
.sh-search input:focus {
  outline: none;
}
.sh-search input::-webkit-search-cancel-button {
  cursor: pointer;
}
.sh-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-1);
  cursor: pointer;
}

/* ======================================================================
   5. 公告条（横向滚动，hover 暂停）
   ==================================================================== */

.sh-notice {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid var(--brand-100);
  background: var(--brand-50);
}
.sh-notice__inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
}
.sh-notice__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background-image: var(--brand-grad);
  color: var(--sh-on-brand);
  font-size: 11px;
  font-weight: 700;
}
.sh-notice__view {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 24px, black calc(100% - 24px), transparent);
  mask-image: linear-gradient(90deg, transparent, black 24px, black calc(100% - 24px), transparent);
}
.sh-notice__track {
  display: inline-flex;
  white-space: nowrap;
  animation: sh-marquee 30s linear infinite;
  will-change: transform;
}
.sh-notice__view:hover .sh-notice__track {
  animation-play-state: paused;
}
.sh-notice__text {
  padding-right: 80px;
  color: var(--brand-700);
  font-size: 13px;
}
@keyframes sh-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ======================================================================
   6. 移动端抽屉
   ==================================================================== */

.sh-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  /* 必须裁剪：抽屉面板停在 translateX(100%)，不裁剪会给文档造出横向溢出 */
  overflow: hidden;
}
.sh-drawer.is-open {
  visibility: visible;
}
.sh-drawer__overlay {
  position: absolute;
  inset: 0;
  background: var(--text-1);
  opacity: 0;
  transition: opacity 240ms cubic-bezier(.2, .8, .2, 1);
}
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .sh-drawer__overlay {
    background: color-mix(in srgb, var(--text-1) 46%, transparent);
  }
}
.sh-drawer.is-open .sh-drawer__overlay {
  opacity: 1;
}
.sh-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(320px, 84vw);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(.2, .8, .2, 1);
  overflow-y: auto;
}
.sh-drawer.is-open .sh-drawer__panel {
  transform: translateX(0);
}
.sh-drawer__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.sh-drawer__head b {
  flex: 1 1 auto;
  font-size: 15px;
}
.sh-drawer__nav {
  display: flex;
  flex-direction: column;
  padding: 8px;
}
.sh-drawer__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 12px;
  border: 0;
  border-radius: var(--r-md);
  background: none;
  color: var(--text-1);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.sh-drawer__item:hover {
  background: var(--brand-50);
}
.sh-drawer__item.is-active {
  background: var(--brand-50);
  color: var(--brand-600);
  font-weight: 600;
}
.sh-drawer__arrow {
  display: inline-flex;
  color: var(--text-4);
}
.sh-drawer__foot {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--border);
}
.sh-drawer__contact {
  margin: 12px 0 0;
  color: var(--text-3);
  font-size: 13px;
  text-align: center;
}

/* ======================================================================
   7. 页脚
   ==================================================================== */

.sh-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.sh-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 40px;
  padding: 40px 24px 32px;
}
.sh-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.sh-footer__brand b {
  font-size: 16px;
}
.sh-footer__desc {
  margin: 0 0 8px;
  max-width: 380px;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.7;
}
.sh-footer__title {
  margin: 0 0 14px;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 600;
}
.sh-footer__links {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sh-footer__links li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text-3);
  font-size: 13px;
}
.sh-footer__links a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-footer__links a:hover {
  color: var(--brand-600);
}
.sh-footer__k {
  flex: 0 0 76px;
  color: var(--text-3);
}
.sh-footer__v {
  color: var(--text-2);
  word-break: break-all;
  text-decoration: none;
}
.sh-footer__icp {
  color: var(--text-3);
}
.sh-footer__icp a {
  color: var(--text-3);
}
.sh-footer__bar {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.sh-footer__barinner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 16px 24px;
  color: var(--text-3);
  font-size: 12px;
}
.sh-footer__warn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--warning);
}

/* ======================================================================
   8. Toast（内置兜底，仅在 UI.toast 缺失时出现）
   ==================================================================== */

.sh-toastbox {
  position: fixed;
  top: 80px;
  left: 50%;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}
.sh-toast {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  color: var(--text-1);
  font-size: 13px;
  animation: sh-toastin 220ms cubic-bezier(.2, .8, .2, 1);
}
.sh-toast--success {
  border-color: var(--success);
  color: var(--success);
}
.sh-toast--error {
  border-color: var(--danger);
  color: var(--danger);
}
.sh-toast--warning {
  border-color: var(--warning);
  color: var(--warning);
}
.sh-toast--info {
  border-color: var(--brand-300);
  color: var(--brand-600);
}
.sh-toast.is-out {
  opacity: 0;
  transform: translateY(-6px);
  transition: all 220ms cubic-bezier(.2, .8, .2, 1);
}
@keyframes sh-toastin {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ======================================================================
   9. 内置弹窗（仅在 UI.modal 未生效时出现）
   ==================================================================== */

.sh-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--text-1);
  animation: sh-fade 160ms cubic-bezier(.2, .8, .2, 1);
}
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .sh-modal {
    background: color-mix(in srgb, var(--text-1) 46%, transparent);
  }
}
.sh-modal__panel {
  width: min(560px, 92vw);
  max-height: 86vh;
  overflow: auto;
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: sh-pop 160ms cubic-bezier(.2, .8, .2, 1);
}
.sh-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.sh-modal__head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}
.sh-modal__body {
  padding: 20px;
}
.sh-modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}
@keyframes sh-fade {
  from {
    opacity: 0;
  }
}
@keyframes sh-pop {
  from {
    opacity: 0;
    transform: scale(.96);
  }
}

/* 联系客服弹窗内容 */
.sh-contact__lead {
  margin: 0 0 16px;
  color: var(--text-2);
  font-size: 13px;
}
.sh-contact__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sh-contact__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.sh-contact__row + .sh-contact__row {
  margin-top: 8px;
}
.sh-contact__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-600);
}
.sh-contact__meta {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}
.sh-contact__meta em {
  color: var(--text-3);
  font-size: 12px;
  font-style: normal;
}
.sh-contact__meta b {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  word-break: break-all;
}
.sh-contact__ops {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}
.sh-contact__empty {
  padding: 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text-3);
  text-align: center;
}
.sh-contact__tip {
  margin: 16px 0 0;
  color: var(--text-3);
  font-size: 12px;
}

/* ======================================================================
   10. 商品卡片 / 封面
   ==================================================================== */

.sh-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-image: var(--brand-grad);
}
.sh-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sh-cover__char {
  color: var(--sh-on-brand);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: .02em;
  opacity: .92;
}
.sh-cover__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  height: 22px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  background-image: var(--brand-grad);
  color: var(--sh-on-brand);
  font-size: 11px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.sh-cover__stock {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 22px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow-sm);
}
.sh-cover__stock.is-low {
  background: var(--danger-bg);
  color: var(--danger);
}

.sh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.sh-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 200ms cubic-bezier(.2, .8, .2, 1),
    box-shadow 200ms cubic-bezier(.2, .8, .2, 1), border-color 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-200);
  box-shadow: var(--shadow-md);
}
.sh-card:active {
  transform: translateY(-1px);
}
.sh-card__cover {
  aspect-ratio: 16 / 10;
}
.sh-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  padding: 14px 16px 16px;
}
.sh-card__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  min-height: 42px;
  color: var(--text-1);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.sh-card__summary {
  overflow: hidden;
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-card__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.sh-card__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
}
.sh-card__price b {
  color: var(--price);
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.sh-card__price s {
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.sh-card__sales {
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sh-card--skel:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

/* ======================================================================
   11. 首页 Hero
   ==================================================================== */

.sh-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  border-radius: var(--r-xl);
  background-image: var(--brand-grad);
  box-shadow: var(--shadow-md);
}
.sh-hero__blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sh-hero__blobs i {
  position: absolute;
  display: block;
  border-radius: var(--r-pill);
  background: var(--surface);
  opacity: .16;
  filter: blur(2px);
}
.sh-hero__blobs i:nth-child(1) {
  width: 320px;
  height: 320px;
  top: -140px;
  right: 8%;
  opacity: .2;
}
.sh-hero__blobs i:nth-child(2) {
  width: 200px;
  height: 200px;
  bottom: -110px;
  right: 26%;
  opacity: .14;
}
.sh-hero__blobs i:nth-child(3) {
  width: 120px;
  height: 120px;
  top: 24px;
  right: 40%;
  opacity: .1;
}
.sh-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 36px 40px;
  min-height: 200px;
}
.sh-hero__text {
  max-width: 620px;
}
.sh-hero__title {
  margin: 0 0 8px;
  color: var(--sh-on-brand);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.sh-hero__sub {
  margin: 0 0 6px;
  color: var(--sh-on-brand);
  opacity: .9;
  font-size: 15px;
  font-weight: 500;
}
.sh-hero__value {
  margin: 0 0 20px;
  color: var(--sh-on-brand);
  opacity: .76;
  font-size: 13px;
}
.sh-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sh-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--brand-600);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(.2, .8, .2, 1),
    box-shadow 200ms cubic-bezier(.2, .8, .2, 1), background-color 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-hero__btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.sh-hero__btn:active {
  transform: translateY(0);
}
.sh-hero__btn--ghost {
  background: transparent;
  border-color: var(--sh-on-brand);
  color: var(--sh-on-brand);
}
.sh-hero__btn--ghost:hover {
  background: var(--brand-600);
}
/* 支持 color-mix 时，把「渐变之上的半透明白」还原为真正的半透明 */
@supports (background: color-mix(in srgb, red 50%, transparent)) {
  .sh-hero__btn--ghost {
    border-color: color-mix(in srgb, var(--sh-on-brand) 52%, transparent);
  }
  .sh-hero__btn--ghost:hover {
    background: color-mix(in srgb, var(--sh-on-brand) 16%, transparent);
  }
}
.sh-hero__stats {
  display: flex;
  gap: 28px;
  flex: 0 0 auto;
  padding-bottom: 4px;
}
.sh-stat {
  text-align: right;
}
.sh-stat b {
  display: block;
  color: var(--sh-on-brand);
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.sh-stat span {
  color: var(--sh-on-brand);
  opacity: .76;
  font-size: 12px;
}

/* ======================================================================
   12. 分类胶囊 / 工具栏 / 分段控件 / 分页
   ==================================================================== */

.sh-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.sh-cats::-webkit-scrollbar {
  display: none;
}
.sh-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  height: 34px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-cat:hover {
  border-color: var(--brand-300);
  color: var(--brand-600);
}
.sh-cat.is-active {
  border-color: transparent;
  background-image: var(--brand-grad);
  color: var(--sh-on-brand);
  font-weight: 600;
  box-shadow: var(--shadow-brand);
}
.sh-cat__count {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  opacity: .7;
}

.sh-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.sh-toolbar__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}
.sh-toolbar__count {
  color: var(--text-3);
  font-size: 13px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.sh-seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.sh-seg__btn {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-seg__btn:hover {
  color: var(--brand-600);
}
.sh-seg__btn.is-active {
  background-image: var(--brand-grad);
  color: var(--sh-on-brand);
  font-weight: 600;
}

.sh-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}
.sh-pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-pager__btn:hover:not([disabled]) {
  border-color: var(--brand-300);
  color: var(--brand-600);
}
.sh-pager__btn.is-active {
  border-color: transparent;
  background-image: var(--brand-grad);
  color: var(--sh-on-brand);
  font-weight: 600;
}
.sh-pager__btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
}
.sh-pager__gap {
  padding: 0 4px;
  color: var(--text-3);
}

/* ======================================================================
   13. 商品详情页骨架
   ==================================================================== */

.sh-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--text-3);
  font-size: 13px;
}
.sh-crumb a {
  color: var(--text-3);
  text-decoration: none;
}
.sh-crumb a:hover {
  color: var(--brand-600);
}
.sh-crumb__sep {
  color: var(--text-4);
}
.sh-crumb__cur {
  color: var(--text-2);
  max-width: 42ch;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sh-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}
.sh-detail__main {
  min-width: 0;
}

.sh-goodshead {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.sh-goodshead__text {
  flex: 1 1 auto;
  min-width: 0;
}
.sh-goodshead__title {
  margin: 0 0 12px;
  color: var(--text-1);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
}
.sh-goodshead__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--text-3);
  font-size: 13px;
}
.sh-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}
.sh-meta b {
  color: var(--text-2);
  font-weight: 600;
}
.sh-goodshead__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.sh-goodshead__cover {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.sh-goodshead__cover .sh-cover__char {
  font-size: 34px;
}

/* Tabs */
.sh-tabs__nav {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: -24px -24px 20px;
  padding: 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sh-tabs__nav::-webkit-scrollbar {
  display: none;
}
.sh-tabs__btn {
  position: relative;
  flex: 0 0 auto;
  height: 52px;
  padding: 0 16px;
  border: 0;
  background: none;
  color: var(--text-2);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-tabs__btn:hover {
  color: var(--brand-600);
}
.sh-tabs__btn.is-active {
  color: var(--brand-600);
  font-weight: 600;
}
.sh-tabs__btn.is-active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background-image: var(--brand-grad);
}
.sh-tabs__pane {
  display: none;
}
.sh-tabs__pane.is-active {
  display: block;
}

/* 富文本内容 */
.sh-rich {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.8;
  word-break: break-word;
}
.sh-rich h1,
.sh-rich h2,
.sh-rich h3,
.sh-rich h4 {
  margin: 20px 0 10px;
  color: var(--text-1);
  font-weight: 600;
  line-height: 1.4;
}
.sh-rich h1 {
  font-size: 20px;
}
.sh-rich h2 {
  font-size: 18px;
}
.sh-rich h3 {
  font-size: 16px;
}
.sh-rich p {
  margin: 0 0 12px;
}
.sh-rich ul,
.sh-rich ol {
  margin: 0 0 12px;
  padding-left: 22px;
}
.sh-rich li {
  margin-bottom: 6px;
}
.sh-rich img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-md);
}
.sh-rich a {
  color: var(--brand-600);
}
.sh-rich table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}
.sh-rich th,
.sh-rich td {
  padding: 8px 10px;
  border: 1px solid var(--border);
  text-align: left;
}
.sh-rich th {
  background: var(--surface-2);
}
.sh-rich blockquote {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 3px solid var(--brand-300);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-2);
}
.sh-rich code {
  padding: 1px 5px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 13px;
}

/* 富文本内图片的失败占位（绝不留裂图图标） */
.sh-imgfallback {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  padding: 20px 24px;
  border-radius: var(--r-md);
  overflow: hidden;
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
}
.sh-imgfallback::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--brand-grad);
  opacity: .12;
}
.sh-imgfallback > span {
  position: relative;
  z-index: 1;
}

/* FAQ 折叠 */
.sh-faq__item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  overflow: hidden;
}
.sh-faq__item + .sh-faq__item {
  margin-top: 10px;
}
.sh-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: none;
  color: var(--text-1);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.sh-faq__q i {
  display: inline-flex;
  color: var(--text-3);
  transition: transform 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-faq__item.is-open .sh-faq__q i {
  transform: rotate(180deg);
}
.sh-faq__a {
  display: none;
  padding: 0 16px 16px;
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.8;
}
.sh-faq__item.is-open .sh-faq__a {
  display: block;
}

/* 相关推荐横向滚动 */
.sh-scroller {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.sh-mini {
  display: flex;
  flex-direction: column;
  flex: 0 0 200px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
  transition: transform 200ms cubic-bezier(.2, .8, .2, 1),
    box-shadow 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-mini:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.sh-mini__cover {
  aspect-ratio: 16 / 10;
}
.sh-mini__cover .sh-cover__char {
  font-size: 30px;
}
.sh-mini__body {
  padding: 10px 12px 12px;
}
.sh-mini__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 6px;
  min-height: 38px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}
.sh-mini__price {
  margin: 0;
  color: var(--price);
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ======================================================================
   14. 下单卡（右栏）
   ==================================================================== */

.sh-order {
  position: sticky;
  top: 88px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.sh-order__price {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--brand-50);
}
.sh-order__amount {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.sh-order__amount b {
  color: var(--price);
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.sh-order__amount s {
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.sh-order__off {
  height: 20px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-sm);
  background: var(--price);
  color: var(--sh-on-brand);
  font-size: 11px;
  font-weight: 700;
}
.sh-order__stock {
  margin-top: 8px;
  color: var(--text-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.sh-order__stock b {
  color: var(--text-1);
}
.sh-order__body {
  padding: 20px;
}
.sh-order__foot {
  padding: 16px 20px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.sh-order__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sh-order__total span {
  color: var(--text-2);
  font-size: 13px;
}
.sh-order__total b {
  color: var(--price);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.sh-order__agree {
  margin: 10px 0 0;
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
}
.sh-order__agree a {
  color: var(--brand-600);
  text-decoration: none;
}
.sh-order__bar {
  display: none;
}

/* 数量步进器 */
.sh-stepper {
  display: flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}
.sh-stepper__btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: var(--surface-2);
  color: var(--text-1);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 200ms cubic-bezier(.2, .8, .2, 1),
    color 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-stepper__btn:hover:not([disabled]) {
  background: var(--brand-50);
  color: var(--brand-600);
}
.sh-stepper__btn[disabled] {
  color: var(--text-4);
  cursor: not-allowed;
}
.sh-stepper__input {
  width: 60px;
  height: 36px;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-1);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.sh-stepper__input:focus {
  outline: none;
  background: var(--brand-50);
}

/* 支付方式卡片单选 */
.sh-paygrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.sh-payopt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  transition: all 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-payopt:hover {
  border-color: var(--brand-300);
}
.sh-payopt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.sh-payopt__ico {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--text-2);
}
.sh-payopt.is-active .sh-payopt__ico {
  color: var(--brand-600);
}
.sh-payopt__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  /* 给右上角的勾选角标让位 */
  padding-right: 12px;
}
.sh-payopt__name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-1);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
}
.sh-payopt__hint {
  align-self: flex-start;
  height: 16px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-sm);
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 10px;
  font-weight: 700;
}
.sh-payopt__check {
  position: absolute;
  top: -1px;
  right: -1px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-bottom-left-radius: var(--r-md);
  border-top-right-radius: var(--r-md);
  background-image: var(--brand-grad);
  color: var(--sh-on-brand);
}
.sh-payopt.is-active {
  border-color: var(--brand-500);
  background: var(--brand-50);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.sh-payopt.is-active .sh-payopt__check {
  display: inline-flex;
}
.sh-payopt.is-disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ======================================================================
   15. 收银台
   ==================================================================== */

.sh-cashier {
  width: min(520px, 94vw);
  margin: 24px auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.sh-cashier__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.sh-cashier__no {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sh-cashier__no em {
  color: var(--text-3);
  font-size: 12px;
  font-style: normal;
  flex: 0 0 auto;
}
.sh-cashier__no b {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-cashier__copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-cashier__copy:hover {
  border-color: var(--brand-300);
  color: var(--brand-600);
}
.sh-cashier__copy.is-copied {
  border-color: var(--success);
  color: var(--success);
}
.sh-cashier__body {
  padding: 26px 22px 22px;
  text-align: center;
}
.sh-cashier__label {
  margin: 0 0 6px;
  color: var(--text-3);
  font-size: 13px;
}
.sh-cashier__amount {
  margin: 0 0 4px;
  color: var(--price);
  font-size: 36px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.sh-cashier__goods {
  margin: 0 0 20px;
  color: var(--text-3);
  font-size: 13px;
}
.sh-cashier__goods b {
  color: var(--text-2);
  font-weight: 500;
}

.sh-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: 0 auto 16px;
}
.sh-qr__frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--sh-qr-bg);
  box-shadow: var(--shadow-sm);
}
.sh-qr__frame canvas,
.sh-qr__frame svg {
  display: block;
  border-radius: 4px;
}
.sh-qr__nub {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--sh-qr-bg);
  border-radius: var(--r-md);
  background-image: var(--brand-grad);
  color: var(--sh-on-brand);
  font-size: 11px;
  font-weight: 700;
  transform: translate(-50%, -50%);
}
.sh-qr__scan {
  color: var(--text-3);
  font-size: 13px;
}
.sh-qr__open {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-600);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.sh-qr__open:hover {
  text-decoration: underline;
}

.sh-jump {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin: 0 auto 16px;
}
.sh-jump__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: var(--r-xl);
  background: var(--brand-50);
  color: var(--brand-600);
  animation: sh-breathe 1.8s ease-in-out infinite;
}
@keyframes sh-breathe {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}
.sh-jump__text {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}
.sh-jump__text b {
  color: var(--brand-600);
}

.sh-countdown {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 0 auto 18px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 13px;
  font-weight: 600;
}
.sh-countdown b {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}
.sh-countdown.is-expired {
  background: var(--danger-bg);
  color: var(--danger);
}

.sh-cashier__foot {
  padding: 16px 22px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
}
.sh-cashier__foot a {
  color: var(--brand-600);
  text-decoration: none;
}
.sh-cashier__help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 10px;
}
.sh-cashier__sect {
  padding: 18px 22px;
  border-top: 1px solid var(--border);
  text-align: left;
}
.sh-cashier__sectitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}

/* 成功态 */
.sh-success {
  padding: 30px 22px 24px;
  text-align: center;
}
.sh-check {
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  display: block;
}
.sh-check__circle {
  fill: none;
  stroke: var(--success);
  stroke-width: 3;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: sh-draw .6s cubic-bezier(.2, .8, .2, 1) forwards;
}
.sh-check__tick {
  fill: none;
  stroke: var(--success);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: sh-draw .36s cubic-bezier(.2, .8, .2, 1) .45s forwards;
}
.sh-check--warn .sh-check__circle,
.sh-check--warn .sh-check__tick {
  stroke: var(--warning);
}
@keyframes sh-draw {
  to {
    stroke-dashoffset: 0;
  }
}
.sh-success__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
}
.sh-success__sub {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
}

/* ======================================================================
   16. 卡密券（虚线剪裁边框票券）
   ==================================================================== */

.sh-ticket {
  position: relative;
  padding: 14px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}
.sh-ticket::before,
.sh-ticket::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  transform: translateY(-50%);
}
.sh-ticket::before {
  left: -8px;
  clip-path: inset(0 0 0 50%);
}
.sh-ticket::after {
  right: -8px;
  clip-path: inset(0 50% 0 0);
}
.sh-ticket__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-strong);
}
.sh-ticket__head span {
  color: var(--text-3);
  font-size: 12px;
}
.sh-ticket__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.sh-ticket__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}
.sh-ticket__row + .sh-ticket__row {
  border-top: 1px solid var(--border);
}
.sh-ticket__idx {
  flex: 0 0 26px;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.sh-ticket__text {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-1);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
  user-select: all;
}
.sh-ticket__copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-ticket__copy:hover {
  border-color: var(--brand-300);
  color: var(--brand-600);
}
.sh-ticket__copy.is-copied {
  border-color: var(--success);
  color: var(--success);
}
.sh-ticket__warn {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: var(--r-md);
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 12.5px;
  text-align: left;
}

/* ======================================================================
   17. 支付结果页
   ==================================================================== */

.sh-result {
  width: min(680px, 94vw);
  margin: 24px auto;
}
.sh-result__card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.sh-result__hero {
  padding: 34px 24px 26px;
  text-align: center;
}
.sh-result__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
}
.sh-result__sub {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
}
.sh-result__amount {
  margin: 12px 0 0;
  color: var(--price);
  font-size: 30px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.sh-sumgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--border);
  overflow: hidden;
}
/* 支付结果页里摘要网格是卡片的直接子级，需要自行留边 */
.sh-result__card > .sh-sumgrid {
  margin: 0 24px 24px;
}
.sh-sumgrid__item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  background: var(--surface);
}
.sh-sumgrid__item span {
  color: var(--text-3);
  font-size: 12px;
}
.sh-sumgrid__item b {
  color: var(--text-1);
  font-size: 13.5px;
  font-weight: 600;
  word-break: break-all;
}
.sh-sumgrid__item--mono b {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.sh-sumgrid__item--full {
  grid-column: 1 / -1;
}
.sh-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 0 24px 26px;
}
.sh-result__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.7;
}
.sh-result__note svg {
  flex: 0 0 auto;
  margin-top: 2px;
}

/* ======================================================================
   18. 订单查询页
   ==================================================================== */

.sh-query {
  width: min(760px, 100%);
  margin: 0 auto;
}
.sh-query__panel {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}
.sh-query__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
}
.sh-query__desc {
  margin: 0 0 22px;
  color: var(--text-3);
  font-size: 13px;
}
.sh-query__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px auto;
  gap: 12px;
  align-items: end;
}
.sh-query__results {
  margin-top: 24px;
}
.sh-resultcount {
  margin: 0 0 12px;
  color: var(--text-2);
  font-size: 13px;
}
.sh-resultcount b {
  color: var(--brand-600);
  font-variant-numeric: tabular-nums;
}

.sh-ocard {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-ocard + .sh-ocard {
  margin-top: 14px;
}
.sh-ocard:hover {
  box-shadow: var(--shadow-md);
}
.sh-ocard__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.sh-ocard__no {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.sh-ocard__no b {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}
.sh-ocard__body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
}
.sh-ocard__cover {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
}
.sh-ocard__cover .sh-cover__char {
  font-size: 22px;
}
.sh-ocard__info {
  flex: 1 1 auto;
  min-width: 0;
}
.sh-ocard__name {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.sh-ocard__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  color: var(--text-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.sh-ocard__price {
  flex: 0 0 auto;
  text-align: right;
}
.sh-ocard__price b {
  display: block;
  color: var(--price);
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.sh-ocard__price span {
  color: var(--text-3);
  font-size: 12px;
}

.sh-ocard__toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-600);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.sh-ocard__toggle i {
  display: inline-flex;
  transition: transform 200ms cubic-bezier(.2, .8, .2, 1);
}
.sh-ocard.is-open .sh-ocard__toggle i {
  transform: rotate(180deg);
}
.sh-ocard__panel {
  display: none;
  margin-top: 12px;
}
.sh-ocard.is-open .sh-ocard__panel {
  display: block;
}
.sh-ocard__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 18px 16px;
}

/* ======================================================================
   19. 响应式
   ==================================================================== */

@media (max-width: 1100px) {
  .sh-search {
    width: 160px;
  }
  .sh-search:focus-within {
    width: 190px;
  }
  .sh-hero__inner {
    padding: 30px 32px;
  }
}

@media (max-width: 1024px) {
  .sh-nav__item {
    padding: 8px 9px;
    font-size: 13.5px;
  }
  .sh-header__cta {
    display: none;
  }
  .sh-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .sh-footer__col:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 960px) {
  .sh-nav {
    display: none;
  }
  .sh-burger {
    display: inline-flex;
  }
  .sh-search {
    width: 100%;
    max-width: 260px;
  }
  .sh-search:focus-within {
    width: 100%;
  }
  .sh-detail {
    grid-template-columns: minmax(0, 1fr);
  }
  .sh-detail__side {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    padding: 0;
    pointer-events: none;
  }
  .sh-order {
    position: static;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    border-bottom: 0;
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
  }
  .sh-order__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
  }
  .sh-order__barprice {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
  }
  .sh-order__barprice b {
    color: var(--price);
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }
  .sh-order__barprice span {
    color: var(--text-3);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }
  .sh-order__baract {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--brand-600);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
  }
  .sh-order__baract i {
    display: inline-flex;
    transition: transform 200ms cubic-bezier(.2, .8, .2, 1);
  }
  /* 折叠态：只露出吸底条（箭头默认朝上，展开后翻回朝下） */
  .sh-order__baract i {
    display: inline-flex;
    transform: rotate(180deg);
  }
  .sh-order__price,
  .sh-order__body,
  .sh-order__foot {
    display: none;
  }
  .sh-order.is-open {
    overflow-y: auto;
  }
  .sh-order.is-open .sh-order__price,
  .sh-order.is-open .sh-order__body,
  .sh-order.is-open .sh-order__foot {
    display: block;
  }
  .sh-order.is-open .sh-order__baract i {
    transform: rotate(0deg);
  }
  .sh-order__amount b {
    font-size: 26px;
  }
  .sh-order__baract {
    display: inline-flex;
  }
  .sh-sheet-mask {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: var(--text-1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms cubic-bezier(.2, .8, .2, 1);
  }
  @supports (background: color-mix(in srgb, red 50%, transparent)) {
    .sh-sheet-mask {
      background: color-mix(in srgb, var(--text-1) 46%, transparent);
    }
  }
  .sh-sheet-mask.is-open {
    opacity: 1;
    visibility: visible;
  }
  .sh-main {
    padding-bottom: 96px;
  }
  .sh-goodshead__title {
    font-size: 20px;
  }
  .sh-query__form {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .sh-shell {
    padding: 0 16px;
  }
  .sh-main {
    padding: 16px 0 88px;
  }
  .sh-panel {
    padding: 18px;
  }
  .sh-tabs__nav {
    margin: -18px -18px 16px;
  }
  .sh-hero__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 26px 22px;
    min-height: 0;
  }
  .sh-hero__title {
    font-size: 26px;
  }
  .sh-hero__stats {
    gap: 22px;
  }
  .sh-stat {
    text-align: left;
  }
  .sh-stat b {
    font-size: 20px;
  }
  .sh-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
  }
  .sh-card__price b {
    font-size: 18px;
  }
  .sh-footer__grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 16px 24px;
  }
  .sh-footer__barinner {
    padding: 14px 16px;
  }
  .sh-footer__warn {
    margin-left: 0;
  }
  .sh-cashier__amount {
    font-size: 32px;
  }
  .sh-sumgrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sh-result__card > .sh-sumgrid {
    margin: 0 16px 18px;
  }
  .sh-result__hero {
    padding: 26px 18px 22px;
  }
  .sh-result__note {
    padding: 12px 16px;
  }
  .sh-query__panel {
    padding: 20px;
  }
  .sh-ocard__body {
    flex-wrap: wrap;
  }
  .sh-ocard__price {
    text-align: left;
    width: 100%;
  }
  .sh-ocard__price b {
    display: inline;
    margin-right: 8px;
  }
}

@media (max-width: 560px) {
  .sh-goodshead {
    gap: 14px;
  }
  .sh-goodshead__cover {
    width: 72px;
    height: 72px;
  }
  .sh-goodshead__cover .sh-cover__char {
    font-size: 26px;
  }
  .sh-goodshead__meta {
    gap: 6px 12px;
  }
  .sh-card__name {
    min-height: 0;
  }
  .sh-paygrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sh-cashier {
    width: 100%;
    margin: 0;
    border-radius: var(--r-lg);
  }
  .sh-cashier__body {
    padding: 22px 16px 18px;
  }
  .sh-ticket {
    padding: 12px;
  }
  .sh-ticket__idx {
    display: none;
  }
  .sh-hero__cta {
    width: 100%;
  }
  .sh-hero__btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0 14px;
    font-size: 14px;
  }
}

@media (max-width: 390px) {
  .sh-shell {
    padding: 0 14px;
  }
  .sh-brand__text i {
    display: none;
  }
  .sh-brand__logo {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }
  .sh-brand__text b {
    font-size: 15px;
  }
  .sh-search {
    max-width: 100%;
  }
  .sh-header__inner {
    gap: 10px;
  }
  .sh-notice__badge {
    display: none;
  }
  .sh-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sh-hero__title {
    font-size: 23px;
  }
  .sh-hero__stats {
    flex-wrap: wrap;
    gap: 14px 22px;
  }
  .sh-toolbar {
    gap: 10px;
  }
  .sh-toolbar__title {
    font-size: 18px;
  }
  .sh-seg {
    width: 100%;
    overflow-x: auto;
  }
  .sh-query__panel {
    padding: 16px;
  }
  .sh-pager__btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
  }
  .sh-input {
    font-size: 16px;
  }
}

/* 输入框在移动端避免 iOS 自动放大 */
@media (max-width: 480px) {
  .sh-input,
  .sh-search input,
  .sh-stepper__input {
    font-size: 16px;
  }
}

/* ======================================================================
   20. 打印 / 动效偏好
   ==================================================================== */

@media print {
  .sh-header,
  .sh-notice,
  .sh-footer,
  .sh-drawer,
  .sh-detail__side,
  .sh-order__baract,
  .sh-hero__cta,
  .sh-toastbox,
  .sh-modal,
  .sh-sheet-mask {
    display: none !important;
  }
  .sh-body {
    background: var(--sh-qr-bg);
  }
  .sh-card,
  .sh-panel,
  .sh-ticket,
  .sh-cashier,
  .sh-result__card {
    box-shadow: none;
    break-inside: avoid;
  }
  .sh-main {
    padding: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sh-notice__track {
    animation: none;
  }
  .sh-jump__ico,
  .sh-sk,
  .sh-spin {
    animation: none;
  }
  .sh-check__circle,
  .sh-check__tick {
    animation-duration: .01ms;
    animation-delay: 0ms;
  }
  * {
    transition-duration: .01ms !important;
  }
}
