/* 个人小店 - 拼多多风格样式 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f5f5;
  color: #333;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 20px;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 15px; outline: none; }

/* 顶部 */
.topbar {
  background: linear-gradient(135deg, #ff5b4c, #e02e24);
  padding: 12px 14px 14px;
  color: #fff;
}
.topbar .shop-row { display: flex; align-items: center; gap: 8px; }
.topbar .shop-name { font-size: 18px; font-weight: 700; }
.search-bar {
  margin-top: 10px; background: #fff; border-radius: 16px;
  padding: 7px 12px; color: #999; font-size: 13px;
  display: flex; align-items: center; gap: 6px;
}
.search-bar input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 13px; color: #333; min-width: 0;
}
.search-bar input::placeholder { color: #bbb; }
.notice-bar {
  background: #fff8e6; color: #b26a00; font-size: 12px;
  padding: 8px 14px; line-height: 1.5;
  display: flex; gap: 6px; align-items: flex-start;
}
.notice-bar .tag {
  flex-shrink: 0; background: #ffb400; color: #fff; font-size: 11px;
  padding: 1px 6px; border-radius: 3px; margin-top: 1px;
}

/* 商品网格 */
.product-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px;
}
.product-card {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  display: block;
}
.product-card .img-wrap {
  width: 100%; aspect-ratio: 1/1; background: #f0f0f0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-card .img-wrap .placeholder { font-size: 34px; color: #d8d8d8; }
.product-card .type-badge {
  position: absolute; top: 6px; left: 6px; font-size: 10px; color: #fff;
  padding: 2px 6px; border-radius: 4px;
}
.badge-virtual { background: linear-gradient(135deg,#7b6cff,#5a8bff); }
.badge-physical { background: linear-gradient(135deg,#ff9a3c,#ff6a2c); }
.product-card .info { padding: 8px 9px 10px; }
.product-card .title {
  font-size: 13px; line-height: 1.45; height: 38px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .price-row { margin-top: 6px; display: flex; align-items: baseline; gap: 5px; }
.price { color: #e02e24; font-weight: 700; }
.price .rmb { font-size: 12px; }
.price .num { font-size: 19px; }
.original-price { color: #aaa; font-size: 11px; text-decoration: line-through; }
.sales { color: #999; font-size: 11px; margin-left: auto; }
.product-card .tags { margin-top: 5px; display: flex; gap: 4px; }
.mini-tag { font-size: 10px; padding: 1px 5px; border-radius: 3px; }
.tag-red { color: #e02e24; background: #fdeaea; }
.tag-blue { color: #4a6cf7; background: #ecf0ff; }

/* 详情页 */
.detail-banner {
  width: 100%; aspect-ratio: 1/1; background: #f0f0f0; position: relative; overflow: hidden;
}
.detail-banner .slider { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; }
.detail-banner .slider > div {
  min-width: 100%; height: 100%; scroll-snap-align: center;
  display: flex; align-items: center; justify-content: center;
}
.detail-banner img { width: 100%; height: 100%; object-fit: cover; }
.detail-banner .placeholder { font-size: 60px; color: #ddd; }
.detail-main { background: #fff; padding: 14px; margin-bottom: 8px; }
.detail-price-row { display: flex; align-items: baseline; gap: 8px; }
.detail-price-row .price .num { font-size: 26px; }
.detail-title { font-size: 17px; font-weight: 600; margin-top: 8px; line-height: 1.5; }
.detail-sold { color: #999; font-size: 12px; margin-top: 6px; }
.detail-type-tags { margin-top: 8px; display: flex; gap: 6px; }
.detail-section { background: #fff; padding: 14px; margin-bottom: 8px; }
.detail-section h3 { font-size: 15px; margin-bottom: 8px; }
.detail-section .content { font-size: 14px; color: #555; line-height: 1.8; white-space: pre-wrap; }
.detail-text { font-size: 14px; color: #555; line-height: 1.8; white-space: pre-wrap; margin-bottom: 4px; }
.detail-inline-img {
  display: block; width: 100%; height: auto; margin: 8px 0;
  border-radius: 6px; background: #f7f7f7; min-height: 40px; cursor: zoom-in;
}
.detail-imgs { margin-top: 10px; }
.detail-imgs img {
  display: block; width: 100%; height: auto; margin-bottom: 8px;
  border-radius: 6px; background: #f7f7f7; min-height: 40px;
}

/* 底部购买栏 */
.buy-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; background: #fff;
  display: flex; padding: 8px 12px; gap: 10px; align-items: center;
  box-shadow: 0 -2px 10px rgba(0,0,0,.06); z-index: 50;
}
.buy-bar .icon-btn { text-align: center; font-size: 11px; color: #666; padding: 0 4px; }
.buy-bar .icon-btn .ico { font-size: 20px; display: block; }
.btn-primary {
  background: linear-gradient(135deg, #ff5b4c, #e02e24);
  color: #fff; border: none; border-radius: 22px;
  font-size: 15px; font-weight: 600; padding: 11px 0; flex: 1;
}
.btn-primary:active { opacity: .85; }
.btn-primary:disabled { background: #ccc; }
.btn-free {
  background: linear-gradient(135deg, #ffb14c, #ff8f1f);
  color: #fff; border: none; border-radius: 22px;
  font-size: 15px; font-weight: 600; padding: 11px 0; flex: 1;
}
.btn-free:active { opacity: .85; }

/* 免费获取助力页 */
.free-hero { background: linear-gradient(135deg, #ffb14c, #ff6a2c); color: #fff; text-align: center; padding: 26px 16px 30px; }
.free-hero .f-ico { font-size: 46px; }
.free-hero .f-title { font-size: 17px; font-weight: 700; margin-top: 6px; }
.free-hero .f-sub { font-size: 12px; opacity: .9; margin-top: 4px; }
.pg-wrap { background: #fff; margin: -16px 12px 10px; border-radius: 12px; padding: 16px 14px; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.pg-track { height: 12px; background: #f2f2f2; border-radius: 7px; overflow: hidden; margin: 10px 0 6px; }
.pg-fill { height: 100%; background: linear-gradient(90deg, #ffb14c, #ff5b4c); border-radius: 7px; transition: width .4s; }
.pg-text { text-align: center; font-size: 13px; color: #666; }
.pg-text b { color: #ff5b4c; font-size: 16px; }
.share-box { background: #fff; margin: 0 12px 10px; border-radius: 12px; padding: 14px; }
.share-box .s-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.share-link { background: #f8f8f8; border-radius: 8px; padding: 10px 12px; font-size: 12px; color: #4a6cf7; word-break: break-all; }
.share-steps { background: #fff8e6; margin: 0 12px 10px; border-radius: 8px; padding: 12px 14px; font-size: 13px; color: #b26a00; line-height: 1.9; }

/* 表单 */
.form-card { background: #fff; margin: 8px; border-radius: 10px; padding: 4px 14px; }
.form-item { display: flex; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid #f2f2f2; }
.form-item:last-child { border-bottom: none; }
.form-item label { width: 80px; font-size: 14px; color: #666; padding-top: 2px; flex-shrink: 0; }
.form-item input, .form-item textarea {
  flex: 1; border: none; font-size: 15px; line-height: 1.5; resize: none; background: transparent;
}
.form-item .require::before { content: '*'; color: #e02e24; margin-right: 2px; }
.section-title {
  font-size: 14px; color: #999; padding: 12px 16px 2px;
}
.qty-box { display: flex; align-items: center; gap: 12px; }
.qty-box button {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid #ddd;
  background: #fff; font-size: 16px; color: #333;
}
.qty-box .qty { min-width: 30px; text-align: center; font-size: 16px; font-weight: 600; }

/* 订单摘要条 */
.order-goods { display: flex; gap: 10px; padding: 14px; background: #fff; margin-bottom: 8px; }
.order-goods .thumb {
  width: 76px; height: 76px; border-radius: 8px; background: #f0f0f0;
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
}
.order-goods .thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-goods .t-title { font-size: 14px; line-height: 1.5; }
.order-goods .t-price { margin-top: 6px; }

/* 支付页 */
.pay-amount-box { background: #fff; text-align: center; padding: 26px 14px 22px; margin-bottom: 8px; }
.pay-amount-box .label { font-size: 13px; color: #999; }
.pay-amount-box .amount { font-size: 40px; font-weight: 700; color: #222; margin-top: 6px; }
.pay-amount-box .amount .rmb { font-size: 20px; }
.pay-amount-box .goods-line { font-size: 12px; color: #999; margin-top: 8px; }
.qr-box { background: #fff; text-align: center; padding: 20px 14px; margin-bottom: 8px; }
.qr-box .qr-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.qr-box .qr-sub { font-size: 12px; color: #e02e24; margin-bottom: 12px; }
.qr-box img { width: 220px; height: 220px; object-fit: contain; border: 1px solid #eee; border-radius: 8px; }
.qr-placeholder {
  width: 220px; height: 220px; margin: 0 auto; border: 2px dashed #e02e24; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #e02e24; font-size: 14px; gap: 6px; padding: 10px; text-align: center;
}
.pay-steps { background: #fff8e6; margin: 0 8px 8px; border-radius: 8px; padding: 12px 14px; font-size: 13px; color: #b26a00; line-height: 1.9; }
.main-btn-wrap { padding: 14px 14px 6px; }
.ref-tip { font-size: 12px; color: #999; padding: 0 16px; line-height: 1.6; }

/* 结果页 */
.result-hero { background: #fff; text-align: center; padding: 34px 16px 24px; margin-bottom: 8px; }
.result-hero .big-ico { font-size: 52px; }
.result-hero .t1 { font-size: 19px; font-weight: 700; margin-top: 8px; }
.result-hero .t2 { font-size: 13px; color: #999; margin-top: 6px; }
.deliver-card { background: #fff; margin: 0 8px 8px; border-radius: 10px; padding: 16px 14px; }
.deliver-card .d-title { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.deliver-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; background: #f8f8f8; border-radius: 8px; padding: 10px 12px; }
.deliver-row .d-val { flex: 1; font-size: 13px; word-break: break-all; color: #4a6cf7; }
.extract-guide {
  margin-top: 12px; background: #f2f7ff; border-radius: 8px;
  padding: 12px 14px; font-size: 13px; color: #3a5dbf; line-height: 2;
}
.leak-warn {
  margin-top: 10px; background: #fff2f0; border: 1px solid #ffccc7;
  border-radius: 8px; padding: 12px 14px; font-size: 12.5px;
  color: #c0392b; line-height: 1.9; word-break: break-all;
}
.copy-btn {
  border: 1px solid #e02e24; color: #e02e24; background: #fff;
  font-size: 12px; border-radius: 14px; padding: 4px 12px; flex-shrink: 0;
}
.status-track { background: #fff; margin: 0 8px 8px; border-radius: 10px; padding: 16px 14px; font-size: 14px; }
.status-line { display: flex; gap: 10px; padding: 6px 0; align-items: flex-start; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #ddd; margin-top: 6px; flex-shrink: 0; }
.status-dot.on { background: #e02e24; }
.status-line .s-txt { color: #999; font-size: 13px; }
.status-line.on .s-txt { color: #333; font-weight: 600; }

/* 我的订单列表 */
.order-item { background: #fff; margin: 8px; border-radius: 10px; padding: 12px 14px; }
.order-item .o-head { display: flex; justify-content: space-between; font-size: 12px; color: #999; }
.order-item .o-status { color: #e02e24; font-weight: 600; }
.order-item .o-body { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.order-item .o-thumb { width: 60px; height: 60px; border-radius: 6px; background: #f0f0f0; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.order-item .o-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-item .o-title { font-size: 13px; line-height: 1.5; }
.order-item .o-total { font-size: 12px; color: #666; margin-top: 4px; }

/* 通用 */
.page-title {
  background: linear-gradient(135deg, #ff5b4c, #e02e24); color: #fff;
  padding: 14px 16px; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.page-title .back { font-size: 20px; font-weight: 400; }
.empty-tip { text-align: center; color: #bbb; padding: 60px 0; font-size: 14px; }
.toast {
  position: fixed; top: 45%; left: 50%; transform: translate(-50%,-50%);
  background: rgba(0,0,0,.75); color: #fff; font-size: 14px;
  padding: 10px 18px; border-radius: 8px; z-index: 999; max-width: 80%;
  text-align: center; display: none;
}
.link-line { text-align: center; padding: 16px; font-size: 13px; color: #4a6cf7; }
