/* 前台店铺样式（手机优先） */
.shop-header {
  background: linear-gradient(135deg, #0aa856 0%, #07c160 55%, #5dbf6e 100%);
  color: #fff; padding: 20px 16px 46px; border-radius: 0 0 26px 26px;
}
.shop-header h1 { font-size: 21px; font-weight: 800; letter-spacing: 1px; }
.shop-header .sub { font-size: 13px; opacity: .85; margin-top: 4px; }
.shop-header .banner { margin-top: 10px; font-size: 13px; opacity: .9; }

.shop-body { max-width: 760px; margin: -28px auto 30px; padding: 0 12px; }

/* 搜索 */
.search-box { display: flex; gap: 8px; margin-bottom: 12px; }
.search-box input {
  flex: 1; padding: 10px 16px; border: none; border-radius: 999px;
  background: #fff; box-shadow: var(--shadow); outline: none;
}

/* 分类 tabs */
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0; padding: 8px 16px; border-radius: 999px; background: #fff;
  font-size: 14px; color: var(--text); box-shadow: var(--shadow); white-space: nowrap;
}
.cat-tab.active { background: var(--green); color: #fff; }

/* 商品网格 */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
.product-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: block; }
.product-card .thumb {
  height: 128px; display: flex; align-items: center; justify-content: center;
  font-size: 56px; background: linear-gradient(135deg, #eef7ee, #f6f2e8);
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .info { padding: 10px 12px 12px; }
.product-card .name { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-card .subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-card .row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.product-card .price { font-size: 17px; }
.product-card .unit { font-size: 12px; color: var(--muted); }
.product-card.soldout { opacity: .55; }
.soldout-badge { font-size: 11px; color: #fff; background: #b9b3a8; padding: 2px 8px; border-radius: 8px; }

/* 商品详情 */
.detail-top { background: #fff; border-radius: 0 0 22px 22px; overflow: hidden; }
.detail-thumb {
  height: 240px; display: flex; align-items: center; justify-content: center; font-size: 110px;
  background: linear-gradient(135deg, #eef7ee, #f6f2e8);
}
.detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { padding: 16px; }
.detail-info h1 { font-size: 20px; }
.detail-price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.detail-price-row .price { font-size: 24px; }
.detail-price-row .unit { color: var(--muted); font-size: 13px; }
.detail-stock { font-size: 12px; color: var(--muted); margin-top: 6px; }
.detail-desc { background: #fff; border-radius: var(--radius); padding: 16px; margin-top: 12px; white-space: pre-line; color: #4a544c; font-size: 14px; line-height: 1.8; }

/* 底部购买条 */
.buy-bar {
  position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  z-index: 50;
}
.qty-stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty-stepper button { width: 36px; height: 36px; font-size: 18px; color: var(--text); background: #f4f2ec; }
.qty-stepper .qty { min-width: 40px; text-align: center; font-weight: 700; }
.buy-bar .btn { flex: 1; }

/* 下单页 */
.order-form { padding: 0 12px 100px; max-width: 640px; margin: 0 auto; }
.order-product { display: flex; gap: 12px; align-items: center; padding: 14px; }
.order-product .emoji {
  width: 64px; height: 64px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 34px; background: linear-gradient(135deg, #eef7ee, #f6f2e8); flex-shrink: 0;
}
.order-product img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.pay-methods { display: flex; gap: 10px; }
.pay-method {
  flex: 1; padding: 12px 8px; border: 1.5px solid var(--line); border-radius: 12px;
  text-align: center; font-size: 13px; background: #fff;
}
.pay-method .pm-icon { font-size: 22px; display: block; margin-bottom: 4px; }
.pay-method.active { border-color: var(--green); background: var(--green-light); }

/* 成功页 */
.success-wrap { max-width: 480px; margin: 60px auto 30px; padding: 0 16px; text-align: center; }
.success-icon { font-size: 64px; }
.success-no { font-size: 15px; color: var(--muted); margin-top: 12px; }
.success-no b { color: var(--text); }

/* 支付占位页 */
.pay-card { max-width: 480px; margin: 0 auto; padding: 16px; }
.pay-tabs { display: flex; gap: 8px; margin: 12px 0; }
.pay-tab { flex: 1; padding: 10px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); text-align: center; font-size: 14px; }
.pay-tab.active { background: var(--green); color: #fff; }
.pay-panel { background: #fff; border-radius: var(--radius); padding: 24px 16px; text-align: center; }
.pay-placeholder-emoji { font-size: 52px; }
