/* ==========================================================================
   设计令牌
   ========================================================================== */

:root {
  --background: #fafafa;
  --foreground: #1d1d1f;
  --card: #ffffff;
  --primary: #0071e3;
  --primary-hover: #0066cc;
  --primary-foreground: #ffffff;
  --muted: #f3f3f5;
  --muted-foreground: #6e6e73;
  --border: #e5e5e8;
  --border-strong: #d6d6db;
  --success: #1f7a4d;
  --success-bg: #edf7f1;
  --warning: #966018;
  --warning-bg: #fbf4e8;
  --danger: #c0392b;
  --danger-bg: #fdeeec;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.1);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
code, pre, .mono { font-family: var(--font-mono); font-size: 12.5px; }
img { max-width: 100%; display: block; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted-foreground); }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------ 顶栏 */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(250, 250, 250, 0.84);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.site-header__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.brand__mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(135deg, #0071e3, #46a2ff);
  box-shadow: 0 4px 10px rgba(0, 113, 227, 0.28);
}

.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }

.nav a {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted-foreground);
  transition: background 0.18s, color 0.18s;
}

.nav a:hover { background: var(--muted); color: var(--foreground); }
.nav a.is-active { color: var(--foreground); font-weight: 500; }

/* ------------------------------------------------------------ 通用 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, transform 0.08s, filter 0.16s;
}

.btn:hover { background: var(--muted); }
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
  height: 48px;
  padding: 0 26px;
}

.btn--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn--block { width: 100%; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn--ghost { border-color: transparent; background: transparent; color: var(--muted-foreground); }
.btn--ghost:hover { background: var(--muted); color: var(--foreground); }
.btn--danger { color: var(--danger); }
.btn--danger:hover { background: var(--danger-bg); }

.input, textarea, select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--foreground);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12);
}

.input::placeholder { color: #b9b9c0; }

textarea {
  height: auto;
  min-height: 100px;
  padding: 11px 14px;
  line-height: 1.6;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.field { display: grid; gap: 7px; }

.field > label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.check-row {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 13.5px;
}

.check-row input {
  width: auto;
  height: auto;
}

/* 收款码上传槽（后台设置） */
.qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.qr-slot {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #fbfbfd;
}

.qr-slot__box {
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.qr-slot__box span {
  font-size: 12px;
  color: var(--muted-foreground);
}

.qr-slot__box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-slot__acts {
  display: flex;
  gap: 6px;
}

/* 订单页 · 待支付的收款指引 */
.pay-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.pay-panel__head {
  font-size: 12.5px;
  color: var(--muted-foreground);
}

.pay-panel__amount {
  margin: 2px 0 14px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.pay-panel__amount small {
  margin-left: 6px;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted-foreground);
}

.pay-qr {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.pay-qr__item {
  text-align: center;
}

.pay-qr__item img {
  display: block;
  width: 156px;
  height: 156px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.pay-qr__item span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted-foreground);
}

.pay-memo {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid #f3e0a8;
  border-radius: 10px;
  background: #fff8e6;
  font-size: 13px;
  line-height: 1.6;
  color: #7a5c00;
}

.pay-memo b {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* 订单页 · 售后区（服务期 / 换号 / 退款） */
.ac {
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.ac__row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.ac__k {
  font-size: 12.5px;
  color: var(--muted-foreground);
}

.ac__v {
  line-height: 1.5;
}

.ac__v small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted-foreground);
}

.ac__policy {
  padding: 11px 14px;
  background: #fbfbfd;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.ac__row:last-of-type {
  border-bottom: 0;
}

/* 报障内联表单：让客户说清哪里出问题 */
.ac__form {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #fbfbfd;
}

.ac__formlabel {
  font-size: 12.5px;
  font-weight: 600;
}

.ac__form .input {
  width: 100%;
  height: 36px;
  font-size: 13px;
}

.ac__formacts {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 2px;
}

@media (max-width: 560px) {
  .ac__row {
    grid-template-columns: 1fr auto;
  }

  .ac__k {
    grid-column: 1 / -1;
  }

  .ac__formacts .btn {
    flex: 1;
  }
}

@media (max-width: 560px) {
  .qr-grid {
    grid-template-columns: 1fr;
  }

  .pay-qr__item img {
    width: 132px;
    height: 132px;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.alert {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 12px 15px;
  border-radius: var(--radius);
  font-size: 13.5px;
  border: 1px solid transparent;
}

.alert--error { background: var(--danger-bg); border-color: #f5d5d0; color: #8f2d22; }
.alert--warn { background: var(--warning-bg); border-color: #f0e0c4; color: var(--warning); }
.alert--ok { background: var(--success-bg); border-color: #cfe8db; color: var(--success); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.badge--ok { background: var(--success-bg); color: var(--success); }
.badge--warn { background: var(--warning-bg); color: var(--warning); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--muted { background: var(--muted); color: var(--muted-foreground); }
.badge--info { background: #eaf3fd; color: #1a5fa8; }

/* ------------------------------------------------------------ 首页英雄 */

.hero { padding: 64px 0 40px; }

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #eaf3fd;
  color: #1a5fa8;
  font-size: 11.5px;
  font-weight: 500;
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(32px, 4.2vw, 48px);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.hero h1 span {
  background: linear-gradient(120deg, #0071e3, #46a2ff 60%, #7cc4ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin-top: 16px;
  max-width: 460px;
  color: var(--muted-foreground);
  font-size: 15px;
}

.hero__actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }

/* 首页扫码块：只给电脑看，手机上本来就在手机里，不用扫自己 */
.qr-hint {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 9px 16px 9px 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.qr-hint img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  display: block;
}

.qr-hint__t {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

.qr-hint__t b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

@media (max-width: 900px) {
  .qr-hint { display: none; }
}

/* 订单页里的二维码：放在交付内容下面，带一点上边距 */
.qr-hint--order {
  margin-top: 14px;
  width: 100%;
  max-width: 360px;
}

.qr-hint--order img {
  width: 76px;
  height: 76px;
}


.hero__stats {
  display: flex;
  gap: 32px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.hero__stat b {
  display: block;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.hero__stat span { font-size: 12px; color: var(--muted-foreground); }

/* 右侧二维码卡片（手机上不显示，本来就在手机里） */
.hero__qr {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 28px 20px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(20, 40, 70, 0.08);
}

.hero__qr img {
  width: 148px;
  height: 148px;
  display: block;
  border-radius: 10px;
}

.hero__qr-t {
  text-align: center;
  line-height: 1.6;
}

.hero__qr-t b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}

.hero__qr-t span {
  font-size: 12px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 980px) {
  .hero__qr { display: none; }
}

/* ------------------------------------------------------------ 商品区 */

.shop-layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 28px;
  padding: 12px 0 64px;
}

.sidebar__label {
  display: block;
  padding: 0 10px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.cats { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 78px; }

.cats button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 40px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  text-align: left;
  transition: background 0.16s, color 0.16s;
}

.cats button:hover { background: var(--muted); color: var(--foreground); }

.cats button[aria-pressed='true'] {
  background: #fff;
  color: var(--foreground);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.cats button em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted-foreground);
}

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  min-height: 40px;
}

.shop-toolbar h2 { font-size: 19px; letter-spacing: -0.03em; }

.search {
  position: relative;
  width: 210px;
}

.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
}

.search .input { height: 36px; padding-left: 34px; font-size: 13px; border-radius: 999px; }

.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 16px;
}

.product {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  min-width: 0;
}

.product:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(20, 30, 50, 0.08);
  border-color: #dcdce2;
}

.product__top { display: flex; align-items: flex-start; gap: 12px; }

.product__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.accent-blue   { background: linear-gradient(135deg, #e3f0ff, #c9e2ff); }
.accent-pink   { background: linear-gradient(135deg, #ffe9f1, #ffd3e2); }
.accent-violet { background: linear-gradient(135deg, #f0eaff, #ded1ff); }
.accent-amber  { background: linear-gradient(135deg, #fff3dd, #ffe4b5); }
.accent-green  { background: linear-gradient(135deg, #e5f6ec, #cbead8); }
.accent-slate  { background: linear-gradient(135deg, #eef0f4, #dde1e8); }

.product__head { min-width: 0; flex: 1; }

.product__title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product__sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted-foreground);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product__tags { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }

.product__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.price {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.price small { font-size: 13px; font-weight: 500; margin-right: 1px; }
.price .was {
  display: block;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted-foreground);
  text-decoration: line-through;
  letter-spacing: 0;
}

.product__go {
  height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--foreground);
  color: #fff;
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: filter 0.16s, transform 0.1s;
}

.product__go:hover { filter: brightness(1.25); }
.product__go:active { transform: scale(0.97); }

.empty {
  grid-column: 1 / -1;
  padding: 64px 24px;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 13.5px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

/* ------------------------------------------------------------ 商品详情 */

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 36px;
  padding: 36px 0 72px;
  align-items: start;
}

.crumbs {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted-foreground);
  padding: 22px 0 0;
}

.crumbs a:hover { color: var(--foreground); }

.detail__head { display: flex; gap: 16px; align-items: flex-start; margin: 22px 0 18px; }

.detail__icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.detail h1 { font-size: 26px; letter-spacing: -0.035em; }
.detail__sub { margin-top: 6px; font-size: 13.5px; color: var(--muted-foreground); }

.detail__body {
  margin-top: 22px;
  font-size: 14px;
  color: #3a3a3c;
  line-height: 1.8;
}

.detail__body h4 {
  margin: 26px 0 10px;
  padding-left: 9px;
  border-left: 3px solid #185FA5;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--foreground);
  letter-spacing: 0.01em;
}

.detail__body h4:first-child { margin-top: 0; }

.detail__body p { margin: 0 0 10px; }

.detail__body ul {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.detail__body li {
  position: relative;
  margin-bottom: 6px;
  padding-left: 15px;
}

.detail__body li::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 11px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #b6b6bd;
}

.detail__body li:last-child { margin-bottom: 0; }

.buybox {
  position: sticky;
  top: 84px;
  padding: 22px;
}

.buybox h3 { font-size: 14px; margin-bottom: 12px; }

.steps-mini {
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
}

.steps-mini h3 {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted-foreground);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.steps-mini ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 9px;
  font-size: 13.5px;
  color: #3a3a3c;
  line-height: 1.65;
}

.steps-mini li::marker { color: var(--muted-foreground); }

.sku-list { display: grid; gap: 8px; margin-bottom: 20px; }

.sku {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
  text-align: left;
}

.sku:hover { border-color: var(--border-strong); background: #fcfcfd; }

.sku[aria-pressed='true'] {
  border-color: var(--primary);
  background: #f5faff;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.sku__name { display: block; font-size: 13.5px; font-weight: 500; }
.sku__meta { display: block; font-size: 11.5px; color: var(--muted-foreground); margin-top: 2px; }
.sku__price { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sku[disabled] { opacity: 0.5; cursor: not-allowed; }

.qty-row { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.stepper button {
  width: 36px;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--foreground);
  font-size: 16px;
  line-height: 1;
}

.stepper button:hover { background: var(--muted); }
.stepper button:disabled { color: #c5c5cc; cursor: not-allowed; background: transparent; }

.stepper input {
  width: 46px;
  height: 38px;
  border: 0;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  outline: none;
  background: transparent;
}

.pay-methods { display: grid; gap: 7px; margin: 14px 0 18px; }

.pay-method {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}

.pay-method:hover { background: #fcfcfd; }
.pay-method[aria-pressed='true'] { border-color: var(--primary); background: #f5faff; }

.pay-method i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  flex-shrink: 0;
}

.pay-method[aria-pressed='true'] i { background: var(--primary); }

.summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  margin-bottom: 4px;
}

.summary > span { font-size: 13px; color: var(--muted-foreground); }
.summary b { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.summary b small { font-size: 13px; }

.notice {
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* ------------------------------------------------------------ 订单页 */

.order-wrap { max-width: 720px; margin: 0 auto; padding: 44px 24px 80px; }

.order-head { text-align: center; margin-bottom: 28px; }

.order-head__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--success-bg);
  color: var(--success);
}

.order-head__icon.is-pending { background: var(--warning-bg); color: var(--warning); }

.order-head h1 { font-size: 23px; letter-spacing: -0.03em; }
.order-head p { margin-top: 8px; font-size: 13.5px; color: var(--muted-foreground); }

.deliver {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: #fbfbfc;
  border: 1px dashed var(--border-strong);
  margin: 20px 0;
}

.deliver__label {
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 10px;
}

.secret {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 8px;
}

.secret:last-child { margin-bottom: 0; }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 10px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted-foreground); }
.kv dd { margin: 0; word-break: break-all; }

/* ------------------------------------------------------------ 页脚 */

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  padding: 26px 0 44px;
}

.site-footer__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  color: var(--muted-foreground);
  flex-wrap: wrap;
}

/* ==========================================================================
   后台
   ========================================================================== */

.admin-body { background: #f7f7f9; }
.admin-shell { max-width: 1280px; margin: 0 auto; padding: 28px 24px 64px; }

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.admin-head h1 { font-size: 23px; letter-spacing: -0.03em; }
.admin-head p { font-size: 13px; color: var(--muted-foreground); margin-top: 4px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }

.stat {
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.stat__label {
  font-size: 11.5px;
  color: var(--muted-foreground);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stat__value {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat__value small { font-size: 13px; font-weight: 400; color: var(--muted-foreground); }
.stat__sub { margin-top: 6px; font-size: 11.5px; color: var(--muted-foreground); }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.panel__head h2 { font-size: 15px; }
.panel__head .spacer { flex: 1; }

.tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--muted);
  border-radius: 10px;
  margin-bottom: 20px;
  width: fit-content;
  overflow-x: auto;
}

.tabs button {
  padding: 7px 15px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.tabs button[aria-selected='true'] { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-sm); }

.table-wrap { overflow-x: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }

table.data th {
  text-align: left;
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 11px 16px;
  background: #fbfbfc;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.data td { padding: 12px 16px; border-bottom: 1px solid #f0f0f3; vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fcfcfd; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 34px 30px 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
}

.login-card h1 { font-size: 20px; text-align: center; }
.login-card .sub { text-align: center; font-size: 13px; color: var(--muted-foreground); margin: 8px 0 24px; }
.login-card .btn { width: 100%; margin-top: 14px; }

dialog {
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  max-width: 620px;
  width: calc(100% - 32px);
  background: var(--card);
  color: var(--foreground);
}

dialog::backdrop { background: rgba(20, 20, 22, 0.32); backdrop-filter: blur(3px); }

.dialog__head { padding: 20px 24px 0; }
.dialog__head h2 { font-size: 17px; }
.dialog__head p { font-size: 12.5px; color: var(--muted-foreground); margin-top: 4px; }
.dialog__body { padding: 18px 24px; display: grid; gap: 14px; max-height: 72vh; overflow: auto; }
.dialog__foot { padding: 0 24px 22px; display: flex; justify-content: flex-end; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 折叠的高级设置，避免弹窗过长 */
.adv {
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: #fbfbfd;
}

.adv > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  list-style: none;
}

.adv > summary::-webkit-details-marker {
  display: none;
}

.adv > summary::before {
  content: '▸ ';
  color: var(--muted-foreground);
}

.adv[open] > summary::before {
  content: '▾ ';
}

.adv[open] > summary {
  margin-bottom: 10px;
}

.adv .field + .field {
  margin-top: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 16px);
  padding: 11px 20px;
  border-radius: 999px;
  background: #1d1d1f;
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  z-index: 100;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #a83226; }

/* ------------------------------------------------------------ 响应式 */

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .detail { grid-template-columns: 1fr; gap: 24px; }
  .buybox { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .shop-layout { grid-template-columns: 1fr; gap: 18px; }
  .cats { flex-direction: row; overflow-x: auto; position: static; padding-bottom: 4px; }
  .cats button { flex-shrink: 0; }
  .sidebar__label { display: none; }
  .grid-products { grid-template-columns: 1fr; }
  .site-header__inner { gap: 12px; padding: 0 16px; }
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 28px; }
  .shop-toolbar { flex-direction: column; align-items: stretch; }
  .search { width: 100%; }
  .order-wrap { padding: 28px 16px 60px; }
  .kv { grid-template-columns: 84px 1fr; }
}

/* 下单页的售后规则说明：字号小一点，不抢视线，但必须读得到 */
.aftercare-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--muted, #f6f7f9);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted-foreground, #5a6472);
}
.aftercare-note b { color: var(--foreground, #1c2331); font-weight: 600; }
.aftercare-note ol { margin: 8px 0 0; padding-left: 18px; }
.aftercare-note li { margin-bottom: 5px; }
.aftercare-note li:last-child { margin-bottom: 0; }

/* 交付凭据：一行一个字段，标签固定宽度，动态码用等宽字体便于核对 */
.secret__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border, #e6e8ec);
  flex-wrap: wrap;
}
.secret__row:last-child { border-bottom: 0; }
.secret__label {
  flex: 0 0 52px;
  font-size: 12px;
  color: var(--muted-foreground, #6b7280);
}
.secret__value {
  flex: 1 1 180px;
  font-size: 14px;
  word-break: break-all;
  user-select: all;
}
.secret__tip {
  font-size: 11.5px;
  color: var(--muted-foreground, #6b7280);
  white-space: nowrap;
}

/* 客服 / 拼车联系条：必须一眼看见，别藏在页脚 */
.contact-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 10px;
  background: #EAF3FF;
  border: 1px solid #B5D4F4;
  color: #0C447C;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 14px 0;
}
.contact-bar__tag {
  flex: 0 0 auto;
  background: #185FA5;
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}
.contact-bar b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
  cursor: pointer;
  text-decoration: underline dotted;
}
.contact-bar b:hover { color: #185FA5; }
.contact-bar__note { font-size: 12px; opacity: 0.8; }

/* 宽版联系条（页面顶部用） */
.contact-bar__main { flex: 1 1 auto; }
.contact-bar__main b { font-size: 16px; }
.contact-bar__sub { font-size: 12px; opacity: .75; }
@media (max-width: 620px) {
  .contact-bar { flex-wrap: wrap; }
  .contact-bar__note { flex: 1 0 100%; }
}
