/* 卡片右上角「详情」胶囊按钮 —— 暗示可点击查看完整规格 */
.stair-detail-chip {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px 5px 9px;
  min-height: 28px;
  border: 0;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform var(--duration-base) var(--ease-out),
              background var(--duration-base) var(--ease-out);
}
.stair-detail-chip .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.25;
}
.stair-card:hover .stair-detail-chip {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.28);
}
.stair-detail-chip:active {
  transform: translateX(0);
  background: rgba(255, 255, 255, 0.22);
}
.stair-detail-chip:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .stair-detail-chip { top: 14px; right: 14px; font-size: 12px; padding: 6px 12px 6px 10px; }
}

/* 购买入口：卡片内扫码购买按钮 + 二维码浮层 + 移动端常驻购买栏
   新增 2026-08-31。仅用 tokens.css 变量，不写裸 hex 品牌色。 */

/* ---------- 1. 卡片内主按钮 ---------- */
.stair-photo-hero .buy-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.buy-btn {
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 11px 24px;
  border: 0;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-600) 100%);
  color: #fff;
  box-shadow:
    0 6px 18px rgba(139, 95, 82, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out);
}
.buy-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 26px rgba(139, 95, 82, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}
.buy-btn:active { transform: translateY(0); }
.buy-btn:focus-visible { outline: 2px solid var(--gold-200); outline-offset: 3px; }
.buy-btn .buy-btn-ico { flex: none; }

/* 「点击查看详情」—— 仅移动端出现。
   桌面端靠右上角胶囊 + 整卡可点开抽屉；
   移动端底部已有常驻购买栏承接下单，故卡内改为引导看详情。 */
.spec-btn { display: none; }

.spec-btn {
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  font: inherit;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 11px 24px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  box-shadow:
    0 4px 14px rgba(20, 42, 37, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform var(--duration-base) var(--ease-out),
              background var(--duration-base) var(--ease-out);
}
.spec-btn:active { transform: translateY(1px); background: rgba(255, 255, 255, 0.26); }
.spec-btn:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.75); outline-offset: 3px; }
.spec-btn .spec-btn-ico { flex: none; }

/* 标准五列卡（renderTierGrid）为浅底，换成实边深色字 */
.tier-card .spec-btn {
  width: 100%;
  background: var(--line-50);
  border-color: var(--line-200);
  color: var(--navy-700);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}
.tier-card .spec-btn:active { background: #fff; }

.buy-detail-link {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  padding: 4px 6px;
}
.stair-card.stair-photo:hover .buy-detail-link { color: #fff; }

/* 标准五列卡（renderTierGrid） */
.tier-card .buy-actions {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  text-align: center;
}
.tier-card .buy-btn { width: 100%; }
.tier-card .buy-detail-link { color: var(--navy-700); }

/* ---------- 2. 二维码浮层 ---------- */
.buy-modal-scrim {
  position: fixed; inset: 0; z-index: 140;
  background: rgba(20, 42, 37, 0.58);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-base) ease;
}
.buy-modal-scrim.is-open { opacity: 1; pointer-events: auto; }
.buy-modal-scrim[hidden] { display: none; }

.buy-modal {
  position: fixed; z-index: 141;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0.97);
  width: min(392px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: var(--r-l);
  border: 1px solid var(--line-200);
  box-shadow: 0 24px 64px rgba(20, 42, 37, 0.3);
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-base) ease,
              transform var(--duration-base) var(--ease-out);
}
.buy-modal.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.buy-modal[hidden] { display: none; }

.buy-modal-head {
  position: relative;
  padding: 20px 56px 16px 22px;
  background: linear-gradient(160deg, var(--navy-700) 0%, var(--navy-800) 100%);
  color: #fff;
  border-radius: var(--r-l) var(--r-l) 0 0;
}
.buy-modal-code {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: var(--r-s);
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.buy-modal-name {
  margin: 8px 20px 0 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.buy-modal-price {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: var(--gold-200);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.buy-modal-price .unit { font-family: var(--font-body); font-size: 14px; font-weight: 600; margin-left: 3px; }
.buy-modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  border: 0;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 19px;
  line-height: 1;
}
.buy-modal-close:hover { background: rgba(255, 255, 255, 0.3); }

.buy-modal-body { padding: 20px 22px 22px; }
.buy-qr-frame {
  width: 216px;
  margin: 0 auto;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--r-m);
  box-shadow: var(--shadow-sm);
}
.buy-qr-frame img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.buy-qr-tip b { font-weight: 800; color: var(--danger-500); letter-spacing: 0.02em; }

.buy-qr-tip {
  margin: 14px auto 0;
  max-width: 288px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-700);
  line-height: 1.6;
}
.buy-qr-tip .buy-qr-tip-desktop,
.buy-qr-tip .buy-qr-tip-mobile { display: none; }
.buy-qr-tip[data-mode="desktop"] .buy-qr-tip-desktop { display: inline; }
.buy-qr-tip[data-mode="mobile"] .buy-qr-tip-mobile { display: inline; }

.buy-steps {
  margin: 16px 0 0;
  padding: 14px 16px;
  list-style: none;
  background: var(--bg-tint);
  border: 1px solid var(--line-200);
  border-radius: var(--r-m);
  display: grid;
  gap: 8px;
  counter-reset: buystep;
}
.buy-steps li {
  position: relative;
  padding-left: 26px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-700);
  counter-increment: buystep;
}
.buy-steps li::before {
  content: counter(buystep);
  position: absolute; left: 0; top: 1px;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  background: var(--navy-700);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.buy-steps li b { color: var(--navy-800); font-weight: 700; }
.buy-modal-note { margin: 12px 0 0; font-size: 12px; line-height: 1.65; color: var(--muted-500); }
.buy-modal-spec {
  margin-top: 14px;
  width: 100%;
  min-height: 44px;
  appearance: none; -webkit-appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy-700);
  background: var(--line-50);
  border: 1px solid var(--line-200);
  border-radius: var(--r-s);
  padding: 11px 14px;
}
.buy-modal-spec:hover { background: #fff; border-color: var(--navy-300); }

/* ---------- 3. 移动端常驻购买栏 ---------- */
.buy-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 108;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line-200);
  box-shadow: 0 -6px 24px rgba(20, 42, 37, 0.12);
  transform: translateY(112%);
  transition: transform .26s var(--ease-out);
}
.buy-bar.is-visible { transform: translateY(0); }
.buy-bar-info { min-width: 0; flex: 1 1 auto; }
.buy-bar-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted-500); letter-spacing: 0.02em; }
.buy-bar-name {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.buy-bar-price {
  flex: none;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--navy-800);
}
.buy-bar-price .unit { font-family: var(--font-body); font-size: 12px; font-weight: 600; margin-left: 2px; }
.buy-bar .buy-btn { flex: none; padding: 11px 18px; font-size: 13.5px; }

@media (max-width: 720px) {
  .buy-bar { display: flex; }
  body.has-buy-bar { padding-bottom: 78px; }
  .buy-qr-frame { width: min(240px, 62vw); }
  .stair-photo-hero .buy-actions { margin-top: 14px; }

  /* 底部常驻购买栏已承接「买」，卡内不再重复扫码入口 */
  .stair-photo-hero .buy-btn,
  .tier-card .buy-btn { display: none; }
  .spec-btn { display: inline-flex; }
  /* 卡片主按钮已是「查看详情」，右上角胶囊属于重复入口 */
  .stair-detail-chip { display: none; }
}
body.drawer-open .buy-bar,
body.buy-modal-open .buy-bar { transform: translateY(112%); }