/* 鸿锦商贸中心 H5 商城样式（移动端优先，浅色主题） */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: #f5f6f8; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #222;
  -webkit-tap-highlight-color: transparent;
}
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* 顶栏 */
.header {
  background: linear-gradient(135deg, #ff6a00, #ff8f3c);
  color: #fff;
  padding: 16px 16px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; flex-shrink: 0;
}
.brand-text h1 { font-size: 18px; font-weight: 700; }
.brand-text p { font-size: 12px; opacity: .9; margin-top: 2px; }

.detail-header {
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
  background: #fff; color: #222; padding: 12px 16px;
  border-bottom: 1px solid #eee;
}
.detail-header span { font-size: 15px; font-weight: 600; }
.detail-header .header-right { font-size: 12px; color: #999; font-weight: 400; }
.back {
  border: none; background: none; font-size: 26px; line-height: 1;
  color: #222; padding: 0 6px; cursor: pointer;
}

/* 分类 Tab */
.tabs { display: flex; gap: 8px; padding: 12px 16px; background: #fff; }
.tab {
  border: none; background: #f2f3f5; color: #555;
  padding: 8px 16px; border-radius: 20px; font-size: 14px; cursor: pointer;
}
.tab.active { background: #ff6a00; color: #fff; font-weight: 600; }

/* 商品列表 */
.goods { flex: 1; padding: 10px 12px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.card {
  background: #fff; border-radius: 12px; overflow: hidden;
  text-decoration: none; color: inherit; display: block;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.thumb {
  height: 110px; display: flex; align-items: center; justify-content: center;
  font-size: 46px;
}
.info { padding: 10px 10px 12px; }
.info h3 {
  font-size: 14px; line-height: 1.4; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 39px;
}
.info .desc {
  font-size: 11px; color: #999; margin-top: 4px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.price-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { color: #ff4d1c; font-size: 17px; font-weight: 700; }
.price em { font-style: normal; font-size: 12px; margin-right: 1px; }
.buy-btn {
  background: linear-gradient(135deg, #ff6a00, #ff4d1c);
  color: #fff; font-size: 12px; padding: 5px 10px; border-radius: 14px;
}
.footer { text-align: center; font-size: 11px; color: #bbb; padding: 14px 0 18px; }

/* 详情页 */
.detail { flex: 1; padding-bottom: 80px; }
.detail-thumb { height: 280px; display: flex; align-items: center; justify-content: center; font-size: 100px; }
.detail-body { background: #fff; padding: 16px; margin-top: 10px; }
.detail-price { font-size: 26px; }
.detail-body h2 { font-size: 17px; font-weight: 700; margin-top: 8px; line-height: 1.5; }
.detail-body .desc { font-size: 13px; color: #777; margin-top: 8px; line-height: 1.7; }
.service { display: flex; gap: 14px; margin-top: 14px; font-size: 12px; color: #2a9d5c; }
.shop-card {
  display: flex; align-items: center; gap: 10px;
  margin-top: 16px; padding: 12px; background: #f8f8f8; border-radius: 10px;
}
.shop-card .logo { width: 36px; height: 36px; border-radius: 8px; background: linear-gradient(135deg,#ff6a00,#ff8f3c); color: #fff; font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.shop-card b { font-size: 14px; display: block; }
.shop-card p { font-size: 11px; color: #999; margin-top: 2px; }
.loading { text-align: center; color: #999; padding: 60px 0; font-size: 14px; }

/* 底部购买栏 */
.buy-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #eee; z-index: 20;
}
.buy-bar-price .price b { font-size: 22px; }
.stock { font-size: 11px; color: #999; margin-left: 8px; }
.buy-now {
  border: none; cursor: pointer;
  background: linear-gradient(135deg, #ff6a00, #ff4d1c);
  color: #fff; font-size: 16px; font-weight: 600;
  padding: 12px 34px; border-radius: 24px;
}
.buy-now:disabled { opacity: .6; }

/* 支付中遮罩 */
.mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: #666; font-size: 14px;
}
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid #eee; border-top-color: #ff6a00;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 结果页 */
.result-page { background: #fff; }
.result { flex: 1; text-align: center; padding-top: 70px; }
.result-icon { font-size: 64px; }
.result-icon.ok { animation: pop .4s ease; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.result h2 { font-size: 20px; margin-top: 16px; }
.result-tip { font-size: 13px; color: #999; margin-top: 10px; padding: 0 30px; line-height: 1.6; }
.result-order {
  margin: 24px 24px 0; background: #f8f8f8; border-radius: 12px;
  padding: 14px 16px; font-size: 13px; color: #555; text-align: left;
}
.result-order p { line-height: 2; }
.result-actions { padding: 20px 24px 30px; }
.btn-plain {
  display: block; text-align: center; text-decoration: none;
  border: 1px solid #ff6a00; color: #ff6a00;
  border-radius: 24px; padding: 11px 0; font-size: 15px;
}
