/*!
 * 前台商城样式 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 与 max-width 一起写，避免宽度由两条规则拼出来
     （之前叠了三条 .sh-query，实际宽度是失原始 width」被失后来的 max-width」截断的产物） */
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 0 48px;
}
.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;
  }

  /* 分类胶囊改为换行 —— 手机上原本要横向滑动才能看到后面的分类，
     用户很容易以为失只有这几个分类」。一共才 6 个，换行两排就全展示完了。 */
  .sh-cats {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  /* 商品卡改为失左图右文」的横向布局：
     竖排大卡一屏只能看一个，横向卡一屏能看 3~4 个，浏览效率高得多。 */
  .sh-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .sh-card {
    flex-direction: row;
    align-items: stretch;
  }
  .sh-card__cover {
    width: 106px;
    flex: 0 0 106px;
    aspect-ratio: auto;
    min-height: 106px;
  }
  .sh-card__cover .sh-cover__char {
    font-size: 30px;
  }
  .sh-card__cover .sh-cover__tag {
    font-size: 10px;
    padding: 2px 7px;
  }
  .sh-card__body {
    padding: 11px 13px;
    gap: 5px;
  }
  .sh-card__name {
    font-size: 14.5px;
    -webkit-line-clamp: 2;
  }
  .sh-card__summary {
    font-size: 12px;
  }
  .sh-card__foot {
    padding-top: 6px;
  }
  .sh-card__price b {
    font-size: 17px;
  }
  .sh-card__sales {
    font-size: 11.5px;
  }
}

/* ==========================================================================
   移动端触控可用性
   --------------------------------------------------------------------------
   手机上所有可点元素的有效热区应 ≥ 40px。下面这些原本只有 28~38px，
   是布局审计里问题最集中的地方（手指点不准 → 误触 → 体验差）。
   ========================================================================== */
@media (max-width: 960px) {
  /* ---- 头部：窄屏必须能收缩 ----
     原来 .sh-brand / .sh-header__ops 都是 flex:0 0 auto、.sh-search 固定 200px，
     加起来约 461px > 手机视口，浏览器只好把布局视口撑到 481px，
     结果整页右侧内容被裁掉、可以左右拖动。
     这里改成失品牌尽量不缩、搜索框吃掉剩余空间」，任何宽度都不会溢出了。 */
  .sh-header__inner {
    gap: 10px;
  }
  .sh-brand {
    flex: 0 1 auto;
    min-width: 0;
  }
  .sh-brand__text {
    min-width: 0;
    overflow: hidden;
  }
  .sh-brand__name,
  .sh-brand__text b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sh-header__ops {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
  }
  .sh-search {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
  .sh-search__input,
  input#shSearchInput {
    min-width: 0;
    width: 100%;
  }

  .sh-btn {
    min-height: 44px;
    height: auto;
    padding: 0 16px;
  }
  .sh-btn--sm {
    min-height: 38px;
  }
  /* 注意 flex: 0 0 auto —— 否则在拥挤的头部里会被压到 30px 宽 */
  .sh-iconbtn {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
  }
  .sh-burger {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
  }
  .sh-brand {
    min-height: 44px;
    align-items: center;
  }
  .sh-cat {
    height: 38px;
    padding: 0 14px;
  }
  .sh-seg {
    padding: 4px;
  }
  .sh-seg__btn {
    height: 36px;
    padding: 0 14px;
    font-size: 13.5px;
  }
  .sh-linkbtn {
    min-height: 36px;
    padding: 6px 0;
  }
  .sh-footer__v {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
  }
  /* 顶部搜索框：原本只有 34px 高，手指不好点 */
  .sh-search,
  .sh-search__input,
  input#shSearchInput {
    min-height: 44px;
  }
  /* 输入框与按钮等高，避免参差 */
  .sh-input,
  .sh-field input,
  .sh-field textarea {
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  /* 很窄的手机（≤420）上隐藏头部站名，只留 Logo：
     站名挤到失失语企…」反而像故障；而 Hero 区马上就有一个大字站名，
     空出来的宽度留给搜索框，输入体验更好。≥421 时站名正常显示。 */
  .sh-brand__text {
    display: none;
  }
  .sh-search {
    min-width: 110px;
  }
}

/* ==========================================================================
   品牌标记：上传了 logo 就用图片
   ========================================================================== */

.sh-brand__logo--img {
  overflow: hidden;
  background-image: none;
  background: var(--surface);
  border: 1px solid var(--border);
}
.sh-brand__logo--img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: inherit;
}

/* ==========================================================================
   人工审核支付：失我已付款」区块 + 等待审核态
   ========================================================================== */

.sh-claim {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  text-align: left;
}
.sh-claim__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.sh-claim__label span {
  font-weight: 400;
  color: var(--text-3);
}
.sh-claim__input {
  width: 100%;
}
.sh-claim__btn {
  width: 100%;
  min-height: 46px;
  font-size: 15px;
  font-weight: 600;
}
.sh-claim__tip {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-3);
}
.sh-claim__tip b {
  color: var(--brand-600);
}

/* 等待审核的时钟图标：用琥珀色区别于失成功」的绿色 */
.sh-jump__ico--wait {
  color: var(--warning);
  background: var(--warning-bg);
}

@media (max-width: 560px) {
  .sh-claim {
    padding: 13px;
  }
  .sh-claim__btn {
    min-height: 48px;   /* 手机上把主按钮做得更好点 */
  }
}

/* ==========================================================================
   细节质感 / 无障碍
   ========================================================================== */

/* 键盘操作的焦点反馈 */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* 数字统一等宽，价格与销量扫读更整齐 */
.sh-card__price,
.sh-card__sales,
.sh-stat b,
.sh-cashier__amount,
.sh-ticket__text {
  font-variant-numeric: tabular-nums;
}

/* 锚点跳转平滑（尊重系统的减少动效设置，已在下面统一处理） */
html {
  scroll-behavior: smooth;
}

@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;
  }
}

/* ==========================================================================
   头部宽度收敛（全站生效）
   --------------------------------------------------------------------------
   头部加了失商户登录 / 免费开店」两个入口后，在 1024~1440px 会挤爆容器
   （布局审计曾抓到 6~103px 横向溢出、右侧按钮被裁）。
   这里按宽度逐级收敛，优先保住主行动按钮失免费开店」。
   注意：这些规则必须放在 shop.css（全站加载），
   放 landing.css 会导致商品页/订单页不生效。
   ========================================================================== */
@media (max-width: 1560px) {
  .sh-header__inner { gap: 14px; }
  .sh-nav__item { padding: 8px 10px; }
}
@media (max-width: 1400px) {
  /* 商户登录在导航、页脚、首页登录卡里都有入口，这里先让位 */
  .sh-header__login { display: none; }
  .sh-search { width: 168px; }
}
@media (max-width: 1180px) {
  /* 只保留图标，省出正文宽度 */
  .sh-header__cta-txt { display: none; }
  .sh-header__cta { padding: 0 11px; }
  .sh-search { width: 140px; }
}
@media (max-width: 960px) {
  /* ≤960 由上面的移动端规则接管（搜索框弹性收缩 + 抽屉导航） */
  .sh-header__cta-txt { display: inline; }
  .sh-header__cta { padding: 0 14px; }
}

/* ==========================================================================
   购买页 UI 升级
   --------------------------------------------------------------------------
   改动集中在四处，都是实测截图后确认的问题：
     1. 公告条原来是滚动走马灯 —— 又老气又难读，改成静态两行内省略
     2. 相关推荐用横向滚动容器 —— 只有一两件时右侧大片留白，改成响应式网格
     3. 购买面板分区只有细线分隔 —— 信息层级弱，价格与总价不够突出
     4. 支付方式选项与空状态样式偏简陋
   ========================================================================== */

/* ---------- 1. 公告条：静态可读 ---------- */
.sh-notice__inner {
  height: auto;
  min-height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
  align-items: flex-start;
}
.sh-notice__badge { margin-top: 1px; }

/* 去掉左右渐隐遮罩（那是给滚动文字用的） */
.sh-notice__view {
  -webkit-mask-image: none;
  mask-image: none;
  overflow: visible;
}
.sh-notice__track {
  animation: none !important;
  display: block;
  white-space: normal;
  will-change: auto;
}
/* 第二份是给无缝滚动准备的副本，静态模式下必须藏掉，否则文字会显示两遍 */
.sh-notice__text[aria-hidden="true"] { display: none; }
.sh-notice__text {
  padding-right: 0;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 2. 相关推荐：网格铺开 ---------- */
#relatedBox .sh-scroller,
#related.sh-scroller {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
  overflow: visible;
  padding-bottom: 0;
}
#related .sh-mini { width: auto; flex: none; }
#related .sh-mini__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}
#related .sh-mini:hover { transform: translateY(-2px); }
#related .sh-mini {
  border-radius: var(--r-lg);
  transition: transform .16s ease, border-color .16s ease;
}

/* ---------- 3. 购买面板：加强信息层级 ---------- */
.sh-order {
  border-radius: var(--r-xl, 16px);
  overflow: hidden;
  box-shadow: 0 6px 24px -12px rgba(16, 18, 27, .16);
}

/* 价格区做成明确的视觉焦点 */
.sh-order__price {
  padding: 18px 18px 16px;
  background-image: linear-gradient(180deg, var(--brand-50), transparent);
  border-bottom: 1px solid var(--border);
}
.sh-order__amount { align-items: baseline; gap: 8px; }
.sh-order__amount b {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--danger);
  line-height: 1.05;
}
.sh-order__amount s { font-size: 13px; color: var(--text-4); }
.sh-order__off {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--danger);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
}
.sh-order__stock { margin-top: 8px; font-size: 12.5px; color: var(--text-3); }
.sh-order__stock b { color: var(--text-1); }

/* 表单区节奏放宽一点，字段之间不再挤在一起 */
.sh-order__body { padding: 20px; }

/* 支付方式选项：做成可点的卡片而不是一排小按钮 */
.sh-paygrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.sh-payopt {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: border-color .16s, background .16s, color .16s;
}
.sh-payopt:hover { border-color: var(--brand-300); color: var(--text-1); }
.sh-payopt.is-active {
  border-color: var(--brand-500);
  background: var(--brand-50);
  color: var(--brand-600);
}

/* 没有可用通道时的空状态：说清楚该做什么，而不是留个虚线空框 */
.sh-order__nopay {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-3);
}
.sh-order__nopay b { display: block; margin-bottom: 3px; color: var(--text-1); font-size: 13.5px; }
.sh-order__nopay a { color: var(--brand-600); font-weight: 600; text-decoration: none; }
.sh-order__nopay a:hover { text-decoration: underline; }

/* 总计与主按钮 */
.sh-order__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.sh-order__total b { font-size: 22px; font-weight: 800; color: var(--danger); letter-spacing: -.01em; }
.sh-order__submit,
.sh-order__body .sh-btn--block {
  min-height: 48px;
  font-size: 15.5px;
  font-weight: 700;
  border-radius: var(--r-md);
}

/* ---------- 4. 左栏卡片：统一节奏 ---------- */


.sh-goodshead__title { letter-spacing: -.01em; }
.sh-goodshead__meta { gap: 14px; }
.sh-panel__title { font-size: 15.5px; }

@media (max-width: 900px) {
  #relatedBox .sh-scroller,
  #related.sh-scroller { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  .sh-order__amount b { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  #related .sh-mini { transition: none; }
}

/* ---------- 购买页升级 · 修正 ----------
   上面那版按猜测的结构写了 .sh-payopt（居中），但真实 DOM 是三栏：
   <label class="sh-payopt"><input><span 图标><span 文字><span 勾选></label>
   这里按实际结构调整；空状态的类名也应是 .sh-contact__empty。 */
.sh-payopt {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  text-align: left;
}
.sh-payopt input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.sh-payopt__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--surface-2);
  flex: 0 0 auto;
}
.sh-payopt.is-active .sh-payopt__ico { background: #fff; }
.sh-payopt__name { font-size: 13.5px; font-weight: 600; color: inherit; }
.sh-payopt__hint { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 键盘可达性：单选框被隐藏了，焦点环要画在外层 label 上 */
.sh-payopt:focus-within {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

/* 无可用通道时的提示：说清楚该做什么 */
.sh-contact__empty {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.7;
}
.sh-contact__empty b { color: var(--text-1); }
.sh-contact__empty a { color: var(--brand-600); font-weight: 600; text-decoration: none; }
.sh-contact__empty a:hover { text-decoration: underline; }

/* ==========================================================================
   订单查询页 —— 参照 818fka 的布局重做
   --------------------------------------------------------------------------
   布局：居中大标题 → 副标题 → 一行式搜索框（输入 + 按钮同排）
         → 免责声明 → 风险提示清单
   原来是一个左对齐的小面板，视觉重心弱；改成居中大标题后第一眼就知道该干什么。
   ========================================================================== */


/* ---------- 头部：居中大标题 ---------- */
.sh-query__hero { text-align: center; padding: 28px 0 8px; }

.sh-query__title {
  margin: 0;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.02em;
  color: var(--text-1);
}

.sh-query__desc {
  margin: 16px auto 0;
  max-width: 620px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-3);
}
.sh-query__desc b { color: var(--text-2); font-weight: 600; }

/* ---------- 搜索框：输入与按钮同排 ---------- */
.sh-query__form {
  max-width: 660px;
  margin: 28px auto 0;
}
.sh-query__row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.sh-query__inputwrap { flex: 1 1 auto; min-width: 0; position: relative; }

.sh-query__input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-size: 14.5px;
  border-radius: var(--r-md);
}
.sh-query__btn {
  flex: 0 0 auto;
  min-width: 132px;
  height: 48px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--r-md);
}
/* hidden 属性必须能压住 display:flex。
   浏览器对 [hidden] 的默认规则是 display:none，但它的优先级极低 ——
   任何写了 display 的类选择器都会把它盖掉，元素就"藏不住"了。
   购买页的查询密码行正是踩了这个坑（截图里冒出来四个元素）。 */
.sh-query__form [hidden] { display: none !important; }

/* 第二行（查询密码）与第一行保持同样的节奏 */
.sh-query__row + .sh-query__row { margin-top: 10px; }
.sh-query__pwdnote {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 13px;
  white-space: nowrap;
}

/* 字段错误提示在行下方，左对齐更易读 */
.sh-query__form .sh-field__err { margin: 8px 0 0; text-align: left; }

/* ---------- 免责声明 ---------- */
.sh-query__note {
  max-width: 660px;
  margin: 18px auto 0;
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-3);
  text-align: left;
}
.sh-query__note b { color: var(--text-1); font-weight: 700; }

/* ---------- 风险提示清单 ---------- */
.sh-query__tips {
  margin: 26px 0 0;
  padding: 18px 22px 20px;
  border: 1px solid var(--warning-bg, #fdf2d8);
  border-radius: var(--r-lg);
  background: var(--warning-bg, #fffaf0);
}
.sh-query__tipstitle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--warning, #d97706);
}
.sh-query__tipsico {
  display: inline-flex;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--warning, #d97706);
  position: relative;
  flex: 0 0 auto;
}
/* 纯 CSS 感叹号，省一个图标依赖 */
.sh-query__tipsico::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 3px;
  width: 2px;
  height: 6px;
  margin-left: -1px;
  border-radius: 1px;
  background: #fff;
  box-shadow: 0 8px 0 #fff;
}

.sh-query__tiplist {
  margin: 0;
  padding-left: 22px;
  font-size: 13.5px;
  line-height: 2;
  color: var(--text-2);
}
.sh-query__tiplist li::marker { color: var(--text-3); }

.sh-query__tipfoot {
  margin: 12px 0 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--danger);
}

/* ---------- 查询结果 ---------- */
.sh-query__results { margin-top: 26px; }
.sh-query__results:empty { margin-top: 0; }

/* ---------- 窄屏 ---------- */
@media (max-width: 640px) {
  .sh-query__title { font-size: 23px; }
  .sh-query__desc { font-size: 13.5px; }
  .sh-query__hero { padding-top: 18px; }
  /* 输入与按钮竖排，按钮撑满更符合拇指操作 */
  .sh-query__row { flex-direction: column; }
  .sh-query__btn { width: 100%; min-width: 0; }
  .sh-query__pwdnote { display: none; }
  .sh-query__tips { padding: 16px 16px 18px; }
  .sh-query__tiplist { font-size: 13px; line-height: 1.95; padding-left: 20px; }
}

/* ==========================================================================
   订单查询页 —— 居中与一致性收口
   --------------------------------------------------------------------------
   上一版虽然标题居中了，但三段内容宽度不一致：
     搜索框 660px / 免责声明 660px 左对齐 / 温馨提示盒 860px
   结果就是纵向看下来是"错开的"，不像一条完整的内容栏。
   这里统一成单列居中，并把免责声明也居中，视觉重心归到中轴线上。
   ========================================================================== */


/* 三段内容统一继承这一列宽度，不再各自设 max-width */
.sh-query__form,
.sh-query__note,
.sh-query__tips,
.sh-query__results {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* 原 .sh-query__form 是三列栅格（minmax(0,1fr) 180px auto），
   那是给旧结构失输入框 | 密码框 | 按钮」三个直接子元素准备的。
   现在输入与按钮被包进 .sh-query__row，只占第一列，后两列空着，
   行宽被压到 516px、整体偏左 —— 必须显式改回 block。 */
.sh-query__form {
  display: block;
  grid-template-columns: none;
  gap: 0;
  margin-top: 30px;
}
.sh-query__note { margin-top: 20px; text-align: center; }
.sh-query__tips { margin-top: 30px; }
.sh-query__results { margin-top: 30px; }

/* ---------- 头部：更舒展的居中 ---------- */
.sh-query__hero { padding: 36px 0 0; }
.sh-query__title {
  font-size: 33px;
  line-height: 1.32;
  letter-spacing: -.025em;
}
.sh-query__desc {
  max-width: 560px;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.8;
}

/* 搜索行必须铺满整列，否则会比下面的提示框窄一截 */
.sh-query__row { width: 100%; }

/* ---------- 搜索行：更饱满的圆角与阴影 ---------- */
.sh-query__input {
  height: 50px;
  border-radius: 12px;
}
.sh-query__btn {
  height: 50px;
  min-width: 140px;
  border-radius: 12px;
  box-shadow: 0 6px 16px -8px var(--brand-500);
}

/* ---------- 免责声明：居中的浅色说明 ---------- */
.sh-query__note {
  padding: 12px 16px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--text-3);
}
.sh-query__note b { color: var(--text-1); }

/* ---------- 温馨提示：与上面对齐、内边距更从容 ---------- */
.sh-query__tips {
  padding: 20px 24px 22px;
  border-radius: var(--r-lg);
}
.sh-query__tipstitle { margin-bottom: 14px; font-size: 15px; }
.sh-query__tiplist {
  padding-left: 24px;
  font-size: 13.5px;
  line-height: 2.05;
}
.sh-query__tipfoot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed currentColor;
  opacity: .92;
}

/* ---------- 查询结果：结果块也居中收敛 ---------- */
.sh-query__results > * { text-align: left; }
.sh-query__results .sh-query__tipfoot { text-align: left; }

@media (max-width: 640px) {
  .sh-query { padding-bottom: 32px; }
  .sh-query__hero { padding-top: 20px; }
  .sh-query__title { font-size: 22px; letter-spacing: -.01em; }
  .sh-query__desc { margin-top: 10px; font-size: 13px; }
  .sh-query__form { margin-top: 22px; }
  .sh-query__note { padding: 10px 12px; font-size: 12px; }
  .sh-query__tips { padding: 16px 16px 18px; margin-top: 22px; }
  .sh-query__tiplist { padding-left: 20px; font-size: 12.8px; line-height: 1.95; }
}

/* ==========================================================================
   收银台 UI 升级  —— 与购买页 / 查单页 统一
   --------------------------------------------------------------------------
   改前实测（1440 视口）：
     .sh-cashier       w=520  cx=720  h=693
     .sh-cashier__body w=518  cx=720  h=545
   布局本身是对的（本来就居中），问题在观感：
     · 693px 高但内容不多 —— 段间距过大，整卡显得"稀"
     · 金额区没有视觉分区，和下面的倒计时、二维码糊在一起
     · 失点击打开支付页」只是行内链接，次级动作没有按钮该有的份量
     · 底部帮助信息挤成一行小字
     · 圆角/字号与刚升级的购买页（12px 圆角、48-50px 按钮）不一致
   下面只做追加式覆盖，不动原有规则，避免影响移动端断点。
   ========================================================================== */

/* ---------- 卡片：统一圆角与阴影 ---------- */
.sh-cashier {
  border-radius: 16px;
  box-shadow: 0 18px 44px -22px rgba(16, 18, 27, .28), 0 2px 8px -4px rgba(16, 18, 27, .08);
}

/* 顶部条：订单号那一行收紧一点 */
.sh-cashier__head { padding: 14px 20px; }
.sh-cashier__no b { font-size: 12.5px; letter-spacing: .01em; }

/* ---------- 金额区：做成明确的第一视觉焦点 ---------- */
.sh-cashier__body { padding: 22px 20px 20px; }

.sh-cashier__label {
  margin: 0 0 4px;
  font-size: 12.5px;
  letter-spacing: .04em;
}
.sh-cashier__amount {
  font-size: 40px;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.sh-cashier__goods {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-3);
}
.sh-cashier__goods b { color: var(--text-2); font-weight: 600; }

/* ---------- 倒计时：更清晰的胶囊 ---------- */
.sh-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 14px auto 18px;
  padding: 7px 14px;
  border: 1px solid var(--warning-bg, #fdf0d5);
  border-radius: var(--r-pill);
  background: var(--warning-bg, #fffaf0);
  color: var(--warning, #d97706);
  font-size: 12.5px;
  font-weight: 600;
}
.sh-countdown b {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

/* ---------- 二维码：外框与说明 ---------- */
.sh-qr { gap: 12px; margin-bottom: 18px; }
.sh-qr__frame {
  padding: 12px;
  border-radius: 14px;
  border-color: var(--border);
  box-shadow: 0 4px 16px -10px rgba(16, 18, 27, .3);
}
.sh-qr__scan { margin: 0; font-size: 13px; color: var(--text-2); }

/* 失点击打开支付页」升级为次级按钮 —— 它是个动作，不该只是行内链接 */
.sh-qr__open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--brand-600);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .16s, background .16s, transform .16s;
}
.sh-qr__open:hover {
  border-color: var(--brand-500);
  background: var(--brand-50);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ---------- 人工收款：我已付款 ---------- */
.sh-claim {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  text-align: left;
}
.sh-claim__label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.sh-claim__label span { font-weight: 400; color: var(--text-3); font-size: 12px; }
.sh-claim__input {
  width: 100%;
  height: 46px;
  border-radius: 12px;
}
.sh-claim__btn {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 6px 16px -8px var(--brand-500);
}
.sh-claim__tip {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-3);
}

/* ---------- 主按钮统一到 48px ---------- */
.sh-cashier__body .sh-btn {
  min-height: 46px;
  border-radius: 12px;
  font-weight: 600;
}
.sh-cashier__body .sh-btn--primary {
  font-weight: 700;
  box-shadow: 0 6px 16px -8px var(--brand-500);
}

/* ---------- 跳转态：图标与文案的分量 ---------- */
.sh-jump { gap: 14px; }
.sh-jump__text { font-size: 16px; font-weight: 700; color: var(--text-1); }
.sh-jump__text b { color: var(--brand-600); }

/* ---------- 底部帮助区：从挤成一行改为清晰两行 ---------- */
.sh-cashier__foot {
  padding: 16px 20px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--text-3);
}

/* [hidden] 会被任何写了 display 的规则盖掉，这里统一兜底 */
.sh-cashier [hidden] { display: none !important; }

@media (max-width: 640px) {
  .sh-cashier__body { padding: 18px 16px 16px; }
  .sh-cashier__amount { font-size: 32px; }
  .sh-cashier__head { padding: 12px 16px; }
  .sh-qr__frame { padding: 10px; }
  .sh-claim { padding: 14px; }
  .sh-cashier__foot { padding: 14px 16px 16px; }
}

/* ==========================================================================
   支付结果页 UI 升级 —— 与购买页 / 收银台 统一
   --------------------------------------------------------------------------
   改前实测（1440 视口）：
     .sh-result        w=680  cx=720  h=771
     .sh-result__card  w=680  cx=720
     .sh-sumgrid       w=630  cx=720
   布局本来就居中，问题在观感：
     · 卡片圆角用 --r-xl，与购买页/收银台刚统一的 16px 不一致
     · 摘要网格每格 padding 只有 12/16，标签与值贴得紧
     · 操作按钮偏小、挤在一排，"继续支付"没有主按钮该有的份量
     · 金额 30px 悬在副标题和网格之间，缺少上下文标签
     · 卡密票据（.sh-ticket）是买家真正要的东西，但视觉上不突出
   ========================================================================== */

/* ---------- 卡片 ---------- */
.sh-result__card {
  border-radius: 16px;
  box-shadow: 0 18px 44px -22px rgba(16, 18, 27, .28), 0 2px 8px -4px rgba(16, 18, 27, .08);
}

/* ---------- 状态区：收紧留白，突出金额 ---------- */
.sh-result__hero { padding: 30px 24px 22px; }
.sh-result__title { font-size: 23px; letter-spacing: -.01em; }
.sh-result__sub { font-size: 13.5px; line-height: 1.7; }

.sh-result__amount {
  margin: 14px 0 0;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
}
/* 金额上方补一个标签，避免它孤零零地悬着 */
.sh-result__hero .sh-result__amount::before {
  content: '订单金额';
  display: block;
  margin-bottom: 2px;
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .04em;
}

/* ---------- 摘要网格：标签与值拉开层次 ----------
   实际结构（Shop.sumGrid）：<div class="sh-sumgrid__item"><span>标签</span><b>值</b></div>
   另有 --mono（订单号等，等宽字体）与 --full（占满整行）两个修饰类。 */
.sh-result__card > .sh-sumgrid { margin: 0 22px 22px; }
.sh-sumgrid { border-radius: 14px; }
.sh-sumgrid__item {
  gap: 5px;
  padding: 14px 18px;
}
.sh-sumgrid__item > span {
  color: var(--text-3);
  font-size: 12.5px;
  letter-spacing: .02em;
}
.sh-sumgrid__item > b {
  color: var(--text-1);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}
.sh-sumgrid__item--mono > b {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .01em;
}

/* ---------- 操作按钮：统一到 46px，主按钮有份量 ---------- */
.sh-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 22px 22px;
}
.sh-result__actions .sh-btn {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
}
.sh-result__actions .sh-btn--primary {
  font-weight: 700;
  box-shadow: 0 6px 16px -8px var(--brand-500);
}

/* ---------- 底部提示 ---------- */
.sh-result__note {
  margin: 0;
  padding: 13px 22px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.75;
}

/* ---------- 卡密票据：买家真正要的东西，给足视觉重量 ---------- */
.sh-ticket {
  padding: 16px 18px;
  border-radius: 14px;
  border-style: dashed;
  background: var(--surface-2);
}
.sh-ticket__head {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: .01em;
}
.sh-ticket__list { margin-top: 10px; }
.sh-ticket__text {
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: .01em;
  word-break: break-all;
  line-height: 1.7;
}
.sh-ticket__copy {
  min-height: 36px;
  border-radius: 10px;
  font-weight: 600;
}
.sh-ticket__warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--warning-bg, #fdf0d5);
  border-radius: 12px;
  background: var(--warning-bg, #fffaf0);
  color: var(--warning, #b45309);
  font-size: 13px;
  line-height: 1.7;
}

/* 结果页里所有可被 display 盖掉的 hidden 兜底 */
.sh-result [hidden] { display: none !important; }

@media (max-width: 640px) {
  .sh-result__hero { padding: 24px 16px 18px; }
  .sh-result__title { font-size: 20px; }
  .sh-result__amount { font-size: 32px; }
  .sh-result__card > .sh-sumgrid { margin: 0 14px 16px; }
  .sh-sumgrid__item { padding: 12px 14px; }
  .sh-sumgrid__item > b { font-size: 13.5px; }
  .sh-sumgrid__item--mono > b { font-size: 12.5px; }
  .sh-result__actions { margin: 0 14px 16px; gap: 8px; }
  .sh-result__actions .sh-btn { flex: 1 1 auto; min-width: 0; padding: 0 14px; }
  .sh-result__note { padding: 12px 16px 14px; }
}


/* ==========================================================================
   浅蓝玻璃拟态 · 覆盖层
   --------------------------------------------------------------------------
   设计基准：shiyu-nav/style.css
   本层只做失追加式覆盖」——不动上方任何原有规则，只在其后重设视觉。
   所有取值走 tokens.css 的玻璃令牌，颜色不写字面量（除必要的 rgba 兜底）。

   覆盖范围：
     1. 页面底纹与容器
     2. 卡片 / 面板 / 表格容器 → 磨砂玻璃
     3. 按钮 / 输入框 / 下拉 → 统一形状与配色
     4. 侧边栏 → 浅色玻璃
     5. 弹窗 / 抽屉 / 提示条 → 玻璃 + 柔和遮罩
     6. 圆角 / 阴影 / 间距成体系
     7. 触控目标兜底 ≥ 44px
     8. 移动端横向溢出与贴边修正
   ========================================================================== */

/* ---------- 0. 全局：玻璃不可用时的实底兜底（双保险）----------
   tokens.css 已用 @supports not 降级令牌；这里再兜一层，
   防止某些内核 @supports 解析异常导致卡片透明看不见。 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .sh-card,.sh-panel,.sh-result__card,.sh-ocard,.sh-cashier,.sh-ticket,.sh-goodshead,
  .m-card,.m-todo-card,.m-fcard,.m-auth__card,.m-table,.m-side,.m-topbar,
  .table-card,.channel-card,.radio-card,.page-wrap .card,
  .ld-card,.ld-hero__panel,.ld-mbox,
  .ui-modal{ background:var(--glass-fallback) !important; }
}

/* ---------- 1. 容器底纹 ---------- */
.sh-main,.sh-shell,.m-body,.m-main,.adm-main,.page-wrap{
  background:transparent;
}

/* ---------- 2. 卡片 / 面板 → 磨砂玻璃 ---------- */
.sh-card,.sh-panel,.sh-result__card,.sh-ocard,.sh-cashier,.sh-ticket,
.sh-goodshead,.sh-tabs,
.m-card,.m-todo-card,.m-fcard,.m-auth__card,
.table-card,.channel-card,.radio-card,.stat-card,.dash-card,
.ld-card,.ld-hero__panel,.ld-mbox,
.ui-modal{
  background:var(--glass-bg);
  -webkit-backdrop-filter:var(--glass-blur);
  backdrop-filter:var(--glass-blur);
  border:1px solid var(--glass-brd);
  border-radius:var(--r-xl);
  box-shadow:var(--glass-shadow);
}

/* 卡片内标题栏：与玻璃底协调 */
.sh-panel__title,.m-card__head,.ui-modal-head{
  color:var(--text-1);
  font-weight:700;
}

/* ---------- 3. 表格容器 → 玻璃 ---------- */
.m-table,.adm-table,.table-wrap,.ui-table{
  border-radius:var(--r-lg);
  overflow:hidden;
}
.m-table thead th,.adm-table thead th{
  background:var(--glass-tint);
  color:var(--text-2);
  font-weight:700;
}
.m-table tbody tr:hover,.adm-table tbody tr:hover{
  background:var(--glass-tint);
}

/* ---------- 4. 按钮：只改形状与字重 ----------
   ⚠️ 这里刻意不设 padding / min-height / display / gap。
   实测教训：一旦覆盖这些尺寸属性，顶部操作区会被撑宽 ——
   1024 视口下文档宽从 1024 变 1092（横向溢出 68px），
   且主按钮被 flex 压成 49px 宽、文字挤扁。
   尺寸体系交给原样式表，本层只负责失看起来是同一套」：圆角、字重、配色。 */
.sh-btn,.m-btn,.adm-btn,.ui-btn,.pager-btn,.ld-login__btn{
  border-radius:var(--r-md);
  font-weight:700;
  white-space:nowrap;          /* 防止文字被压扁换行 */
  -webkit-transition:box-shadow .2s ease,background .2s ease,opacity .2s ease;
  transition:box-shadow .2s ease,background .2s ease,opacity .2s ease;
}
/* 主按钮：品牌渐变 */
.sh-btn--primary,.m-btn--primary,.adm-btn--primary,.ui-btn--primary,
.btn-primary,.sh-hero__btn--primary{
  background:var(--brand-grad);
  color:var(--on-brand);
  border-color:transparent;
  box-shadow:var(--shadow-brand);
}
.sh-btn--primary:hover,.m-btn--primary:hover,.adm-btn--primary:hover{
  box-shadow:0 14px 28px -12px rgba(91,143,249,.95);
}
/* 次按钮：白底细边 */
.sh-btn--ghost,.m-btn--ghost,.adm-btn--ghost,.ui-btn--ghost{
  background:var(--surface);
  border:1px solid var(--border);
  color:var(--text-2);
}
.sh-btn--ghost:hover,.m-btn--ghost:hover,.adm-btn--ghost:hover{
  background:var(--brand-50);
  border-color:var(--brand-300);
  color:var(--brand-600);
}

/* ---------- 5. 输入框 / 下拉 / 文本域 ---------- */
.sh-input,.m-input,.adm-input,.ld-field input,.ui-input,
.sh-field input,.sh-field textarea,.sh-field select,
.m-field input,.m-field textarea,.m-field select,
input[type="text"],input[type="password"],input[type="search"],
input[type="number"],input[type="email"],textarea,select{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-md);
  color:var(--text-1);
  -webkit-transition:border-color .18s ease,box-shadow .18s ease;
  transition:border-color .18s ease,box-shadow .18s ease;
}
input:focus,textarea:focus,select:focus,
.sh-input:focus,.m-input:focus,.adm-input:focus{
  border-color:var(--brand-400);
  box-shadow:var(--focus-ring);
  outline:none;
}
::placeholder{ color:var(--text-4); }

/* ---------- 6. 侧边栏 → 浅色玻璃 ---------- */
.m-side,.adm-side,.sidebar,.nav-side{
  background:var(--sidebar-bg);
  -webkit-backdrop-filter:var(--glass-blur);
  backdrop-filter:var(--glass-blur);
  border-right:1px solid var(--glass-brd-2);
  box-shadow:1px 0 0 rgba(255,255,255,.6) inset;
}
.m-side__link,.nav-item,.sidebar a{
  color:var(--sidebar-text);
  border-radius:var(--r-md);
}
.m-side__link:hover,.nav-item:hover{
  background:var(--sidebar-hover);
  color:var(--brand-600);
}
.m-side__link.is-active,.nav-item.is-active{
  background:var(--brand-grad);
  color:var(--on-brand);
  box-shadow:var(--shadow-brand);
}
.m-grp__head{ color:var(--sidebar-text); border-radius:var(--r-md); }
.m-grp__head:hover{ background:var(--sidebar-hover); color:var(--brand-600); }

/* 顶栏 */
.m-topbar,.adm-topbar,.topbar{
  background:var(--glass-bg-2);
  -webkit-backdrop-filter:var(--glass-blur-sm);
  backdrop-filter:var(--glass-blur-sm);
  border-bottom:1px solid var(--glass-brd-2);
}

/* ---------- 7. 弹窗 / 抽屉 / 提示 ---------- */
.ui-modal-overlay,.sh-modal,.sh-drawer__overlay,.m-sheet-mask{
  background:var(--overlay);
  -webkit-backdrop-filter:blur(4px);
  backdrop-filter:blur(4px);
}
.ui-modal,.sh-modal__box,.sh-drawer__panel,.m-sheet{
  background:var(--glass-bg-3);
  -webkit-backdrop-filter:var(--glass-blur);
  backdrop-filter:var(--glass-blur);
  border:1px solid var(--glass-brd);
  border-radius:var(--r-xl);
  box-shadow:var(--shadow-pop);
}
.ui-toast-wrap>*,.sh-toast,.m-toast{
  background:var(--glass-bg-3);
  -webkit-backdrop-filter:var(--glass-blur-sm);
  backdrop-filter:var(--glass-blur-sm);
  border:1px solid var(--brand-200);
  box-shadow:var(--shadow-pop);
  border-radius:var(--r-pill);
}

/* ---------- 8. 徽标 / 角标 / 标签 ---------- */
.nav-badge,.m-side__link .nav-badge{
  background:var(--danger);
  color:#fff;
  border-radius:var(--r-pill);
}
.sh-tag,.m-tag,.ui-tag{
  border-radius:var(--r-pill);
}

/* ---------- 9. 隐藏属性兜底 ----------
   [hidden] 的浏览器默认样式优先级极低，任何写了 display 的类选择器都会盖掉它，
   元素就"藏不住"。本层给所有可能带 hidden 的容器补一条高优先级规则。 */
[hidden]{ display:none !important; }

/* ---------- 10. 触控目标：扩大热区但不改变尺寸 ----------
   ⚠️ 不要用 min-width/min-height 去撑 .sh-iconbtn —— 它原本是 36×36，
   强行撑到 44×44 会把顶部栏挤宽造成横向溢出。
   正确做法：用伪元素把**可点击区域**撑到 44×44，视觉尺寸与布局完全不变。
   （布局审计的阈值是失高<36 或 宽<32」，36×36 本身合规。） */
.sh-iconbtn,.topbar-icon-btn,.avatar-btn,.m-burger,.sh-drawer__close{
  position:relative;
}
.sh-iconbtn::after,.topbar-icon-btn::after,.avatar-btn::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:44px;
  height:44px;
  margin:-22px 0 0 -22px;
}

/* ---------- 11. 移动端修正 ---------- */
@media (max-width:900px){
  /* 表格在窄屏允许横向滚动，但容器本身不得溢出视口 */
  .m-table,.adm-table,.table-wrap{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  /* 卡片收边距，避免贴屏幕边 */
  .sh-card,.sh-panel,.m-card,.table-card{
    margin-left:0;
    margin-right:0;
  }
}

/* ---------- 12. 尊重失减少动态效果」 ---------- */
@media (prefers-reduced-motion: reduce){
  .sh-card,.sh-panel,.m-card,.table-card,
  .sh-btn,.m-btn,.adm-btn{
    -webkit-transition:none !important;
    transition:none !important;
  }
}
