* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #faf8f7;
  color: #2f2a2e;
  min-height: 100vh;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #ff9a9e 0%, #ffc3a0 55%, #ffd6c9 100%);
  padding: 46px 22px 62px;
  border-radius: 0 0 26px 26px;
}
.hero-deco { position: absolute; border-radius: 50%; background: rgba(255,255,255,.18); }
.deco-a { width: 200px; height: 200px; right: -60px; top: -70px; }
.deco-b { width: 120px; height: 120px; left: -40px; bottom: -50px; }
.hero-inner { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; }
.eyebrow {
  display: inline-block; font-size: 10px; letter-spacing: 2px;
  background: rgba(255,255,255,.28); color: #fff;
  padding: 5px 10px; border-radius: 20px; margin-bottom: 12px;
}
.hero h1 { margin: 0; font-size: 28px; color: #fff; letter-spacing: 1px; font-weight: 800; }
.hero p { margin: 8px 0 0; font-size: 13px; color: rgba(255,255,255,.9); }

/* ---------- 商品网格 ---------- */
.wrap { max-width: 480px; margin: 0 auto; padding: 22px 14px 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 4px 14px; }
.section-head h2 { font-size: 17px; margin: 0; font-weight: 700; }
.count { font-size: 12px; color: #a49b9f; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.loading { grid-column: 1 / -1; text-align: center; padding: 60px 0; color: #b0a6aa; font-size: 13px; }

.card {
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 18px rgba(180,140,150,.09);
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease;
}
.card:active { transform: scale(.97); }
.card-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: #f6eef0; }
.card-body { padding: 11px 12px 13px; }
.card-name {
  font-size: 13px; font-weight: 600; line-height: 1.45; margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 37px;
}
.card-foot { display: flex; align-items: center; justify-content: space-between; }
.price { color: #f4567e; font-weight: 800; font-size: 17px; }
.price small { font-size: 11px; font-weight: 600; margin-right: 1px; }
.buy {
  font-size: 11px; color: #fff; background: linear-gradient(135deg,#ff8fa3,#f4567e);
  padding: 5px 10px; border-radius: 12px; font-weight: 600;
}
.tip { text-align: center; color: #b8adb1; font-size: 11px; margin: 22px 0 0; }
.footer {
  text-align: center; color: #c3b8bc; font-size: 11px;
  padding: 20px 0 28px; display: flex; gap: 6px; justify-content: center;
}

/* ---------- 弹层 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(30,20,26,.48); display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s ease;
}
.overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.sheet {
  position: relative; width: 100%; max-width: 480px;
  background: #fff; border-radius: 22px 22px 0 0;
  padding: 22px 20px 30px; max-height: 88vh; overflow-y: auto;
  animation: rise .26s cubic-bezier(.2,.9,.3,1);
}
@keyframes rise { from { transform: translateY(40px); opacity: .6 } to { transform: translateY(0); opacity: 1 } }
.sheet-handle { width: 36px; height: 4px; border-radius: 4px; background: #e8e0e3; margin: 0 auto 16px; }
.close {
  position: absolute; right: 14px; top: 12px; border: 0; background: #f6f1f3;
  width: 28px; height: 28px; border-radius: 50%; font-size: 19px; line-height: 1;
  color: #8c7f85; cursor: pointer;
}
.sheet-body { text-align: center; }
.prod-mini { display: flex; align-items: center; gap: 12px; text-align: left; padding-bottom: 16px; border-bottom: 1px solid #f3edf0; }
.prod-mini img { width: 66px; height: 66px; border-radius: 12px; object-fit: cover; }
.prod-mini h3 { margin: 0 0 5px; font-size: 15px; }
.prod-mini p { margin: 0; font-size: 11px; color: #a89ca1; }
.prod-mini .price { font-size: 18px; margin-top: 4px; }
.step-label { font-size: 12px; color: #9c9095; margin: 18px 0 10px; }
.qr-box { display: inline-flex; padding: 12px; border: 1px solid #f0e6ea; border-radius: 14px; background: #fff; }
.qr-box img, .qr-box canvas { display: block; width: 168px !important; height: 168px !important; }
.badge-demo {
  display: inline-block; margin-top: 12px; font-size: 11px; color: #b57900;
  background: #fff6e0; border: 1px solid #ffe4a3; padding: 4px 10px; border-radius: 12px;
}
.btn {
  display: block; width: 100%; border: 0; border-radius: 14px; padding: 14px;
  font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 16px;
  background: linear-gradient(135deg,#ff8fa3,#f4567e); color: #fff;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: #f6f1f3; color: #7d7076; margin-top: 10px; }
.hint { font-size: 11px; color: #b8adb1; margin-top: 12px; line-height: 1.7; }

/* ---------- 券码成功 ---------- */
.coupon-card {
  margin: 20px 0 4px; padding: 24px 14px; border-radius: 16px;
  background: linear-gradient(135deg,#fff1f4,#fff8f2);
  border: 1px dashed #ffb7c6;
}
.success-icon { font-size: 38px; }
.success-title { font-size: 17px; font-weight: 800; margin: 8px 0 3px; color: #e8466e; }
.success-sub { font-size: 12px; color: #a48b93; margin: 0 0 14px; }
.coupon-code {
  font-family: "SF Mono", Consolas, monospace; font-size: 21px; font-weight: 800;
  letter-spacing: 2px; color: #d63c65; word-break: break-all; padding: 12px 4px;
}
.copy-btn {
  border: 0; background: #f4567e; color: #fff; border-radius: 10px;
  padding: 8px 22px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.order-no { font-size: 11px; color: #b3a5aa; margin-top: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  background: rgba(40,30,35,.88); color: #fff; padding: 10px 18px;
  border-radius: 20px; font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 99;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 520px) {
  .hero { border-radius: 20px; margin: 12px auto 0; max-width: 480px; }
}
