* {
  box-sizing: border-box;
}

:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --dark: #111827;
  --gold: #c79b52;
  --gold-light: #f5d07a;
  --shadow: 0 14px 34px rgba(17, 24, 39, 0.12);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

button {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.app {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 12px 10px 150px;
  background:
    radial-gradient(circle at top left, rgba(199, 155, 82, .18), transparent 34%),
    var(--bg);
}

.shop-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #151515, #34302a);
  color: #fff;
  box-shadow: var(--shadow);
}

.age-badge {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
  color: #171717;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.shop-header h1 {
  margin: 0 0 5px;
  font-size: 18px;
  letter-spacing: .5px;
}

.shop-header p {
  margin: 0;
  font-size: 13px;
  opacity: .82;
}

.notice {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff8ea;
  color: #6b4d12;
  font-size: 13px;
  line-height: 1.55;
  border: 1px solid #f3dba5;
}

.category-tabs {
  margin: 14px 0 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.category-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted);
  white-space: nowrap;
}

.category-tabs button.active {
  color: #fff;
  background: var(--dark);
  border-color: var(--dark);
}

.product-list {
  display: grid;
  gap: 12px;
}

.empty-category {
  padding: 34px 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.product-card {
  background: var(--card);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  border: 1px solid rgba(229, 231, 235, .8);
  padding: 12px;
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 12px;
  align-items: start;
}

.product-photo {
  width: 78px;
  height: 78px;
  background: #f3f4f6;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  border: 1px solid #f0f0f0;
}

.product-content {
  min-width: 0;
}

.product-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.product-info h3 {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.35;
}

.product-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.price {
  margin-top: 10px;
  font-size: 20px;
  font-weight: 900;
  color: #ef4c3b;
  line-height: 1;
}

.product-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.add-wrap {
  display: flex;
  align-items: flex-end;
  height: 100%;
}

.add-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #ffd600;
  color: #111;
  font-weight: 900;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.cart-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(430px, calc(100% - 20px));
  padding: 12px 12px 12px 16px;
  border-radius: 22px;
  background: rgba(17, 24, 39, .96);
  color: #fff;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

.cart-title {
  font-size: 14px;
  opacity: .8;
}

.cart-meta {
  font-size: 16px;
  font-weight: 800;
  margin-top: 2px;
}

.cart-bar button {
  border: none;
  padding: 11px 18px;
  border-radius: 15px;
  background: var(--gold);
  color: #111827;
  font-weight: 900;
}

.cart-bar button:disabled {
  background: #6b7280;
  color: #d1d5db;
}

.drawer-mask,
.order-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.38);
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 30;
}

.drawer-mask.show,
.order-mask.show {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 105%);
  width: min(520px, 100%);
  max-height: 78vh;
  overflow: auto;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 18px;
  box-shadow: var(--shadow);
  transition: .24s;
  z-index: 40;
}

.cart-drawer.show {
  transform: translate(-50%, 0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h2 {
  margin: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 24px;
  line-height: 1;
}

.cart-items {
  margin: 16px 0;
  display: grid;
  gap: 10px;
}

.cart-item {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-thumb {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  background: #f3f4f6;
}

.cart-item h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.cart-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-control button {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 18px;
}

.qty-control span {
  min-width: 22px;
  text-align: center;
  font-weight: 900;
}

.total-row {
  padding: 12px 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 16px;
}

.total-row strong {
  font-size: 24px;
}

.primary-btn {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #171717, #3b3325);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
}


.order-result,.orders-modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-48%) scale(.97);width:min(430px,calc(100% - 24px));max-height:88vh;overflow:auto;background:#fff;border-radius:24px;padding:20px;box-shadow:0 22px 60px rgba(0,0,0,.24);opacity:0;pointer-events:none;transition:.22s;z-index:999}
.order-result.show,.orders-modal.show{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}
.order-mask,.orders-mask{position:fixed;inset:0;background:rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:.2s;z-index:990}
.order-mask.show,.orders-mask.show{opacity:1;pointer-events:auto}
.modal-close{position:absolute;right:12px;top:12px;width:32px;height:32px;border:0;border-radius:50%;background:#f3f4f6;color:#555;font-size:22px;line-height:1;cursor:pointer}
.success-mark{width:44px;height:44px;margin:0 auto 7px;border-radius:50%;display:grid;place-items:center;background:#ecfdf5;color:#059669;font-size:25px;font-weight:900}
.mini-card-title{text-align:center;color:#333;font-weight:800;font-size:14px;margin:6px 0}
.order-result h2{text-align:center;font-size:21px;margin:5px 0;color:#1f2937}
.order-subtitle{text-align:center;color:#8a8f98;font-size:12px;margin:4px 0 10px}
.order-no{padding:8px 10px;border-radius:10px;background:#f7f8fa;color:#737983;font-size:11px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-summary{margin-top:10px;padding:10px 12px;border:1px solid #f0f1f3;border-radius:15px;background:#fafafa}
.order-line,.order-total-line{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center;padding:8px 0;border-bottom:1px solid #eceef1;font-size:12px;text-align:left}
.order-line:last-of-type{border-bottom:0}.order-line span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.order-total-line{border:0;padding-bottom:0;font-weight:800;font-size:13px}
.item-status{display:inline-flex;align-items:center;justify-content:center;padding:3px 7px;border-radius:999px;font-size:10px;white-space:nowrap;font-weight:800}
.status-pending_payment{background:#fff4df;color:#b66a00}.status-paid_pending_pickup{background:#e9fff1;color:#138a48}.status-completed{background:#eef2ff;color:#4757a8}.status-cancelled{background:#f1f2f4;color:#888}
.pickup-panel{margin-top:12px;padding:15px;border:1px solid #f0dfb9;border-radius:18px;background:linear-gradient(180deg,#fffdf7,#fffaf0);text-align:left}
.panel-title{font-size:15px;font-weight:900;color:#3f3f3f}.small-title{margin-top:2px}.pay-total-line{display:flex;justify-content:space-between;align-items:center;margin:9px 0 12px;color:#777;font-size:12px}.pay-total-line strong{font-size:24px;color:#e65c00}.pay-now-btn{width:100%;height:54px;border:0;border-radius:14px;background:linear-gradient(135deg,#ff6a00,#ff8a00);color:#fff;font-weight:900;font-size:20px;letter-spacing:.2px;box-shadow:0 8px 18px rgba(255,106,0,.2);transition:.15s}.pay-now-btn:active{transform:scale(.985)}.pay-now-btn:disabled{opacity:.65;box-shadow:none}
.payment-notice{padding:9px 10px;border-radius:10px;background:#f7f8f8;color:#7a7f86;font-size:11px;line-height:1.5;text-align:center}.pickup-divider{height:1px;background:#eadfcb;margin:14px 0}.pickup-desc{margin:5px 0 10px;color:#7a7f86;font-size:11px;line-height:1.5}
.pickup-status{margin-top:10px;text-align:center;font-size:12px;font-weight:800;min-height:18px}.pickup-status.success{color:#16803c}.pickup-status.error{color:#c33}
.pickup-state{margin-top:10px;padding:10px;border-radius:10px;text-align:center;font-size:12px;font-weight:800}.pickup-state.pending{background:#fff4df;color:#a86b13}.pickup-state.paid{background:#e9fff1;color:#138a48}.pickup-state.done{background:#eef2ff;color:#4757a8}.pickup-state.cancelled{background:#f1f2f4;color:#888}
.continue-btn{width:100%;height:44px;margin-top:12px;border:0;border-radius:14px;background:#24211d;color:#fff;font-weight:900;font-size:14px}
.orders-modal{padding:18px}.orders-head{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:10px;border-bottom:1px solid #eee}.orders-head h2{margin:0;font-size:20px}.orders-head p{margin:4px 0 0;color:#888;font-size:11px}.orders-list{padding-top:10px;display:grid;gap:10px}.orders-loading,.orders-empty{padding:35px 10px;text-align:center;color:#999;font-size:13px}.my-order-card{border:1px solid #eee;border-radius:16px;padding:12px;background:#fff}.my-order-head{display:flex;justify-content:space-between;align-items:center;color:#8a8f98;font-size:10px;margin-bottom:5px}.my-order-item{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:9px;align-items:center;padding:9px 0;border-bottom:1px solid #f0f0f0}.my-order-item img{width:48px;height:48px;border-radius:9px;object-fit:cover;background:#f4f4f4}.my-order-item-main{min-width:0;font-size:12px;font-weight:700}.my-order-item-main div{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.my-order-item-main span{display:block;color:#888;font-size:10px;margin-top:4px;font-weight:500}.my-order-foot{display:flex;justify-content:space-between;gap:8px;margin-top:10px;color:#888;font-size:10px}.my-order-foot strong{color:#222;font-size:13px;white-space:nowrap}.expire-tip,.pickup-ready{margin-top:9px;padding:8px 9px;border-radius:9px;font-size:10px}.expire-tip{background:#fff8e9;color:#9a6a17}.pickup-ready{background:#ecfff3;color:#138a48}
.orders-entry{border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.1);color:#fff;border-radius:10px;padding:8px 9px;font-size:11px;white-space:nowrap}.shop-head-main{flex:1;min-width:0}
@keyframes pulse{50%{opacity:.5}}
@media(max-width:380px){.app{padding-left:8px;padding-right:8px}.shop-header{gap:8px;padding:11px}.age-badge{width:42px;height:42px;border-radius:13px;font-size:15px}.shop-header h1{font-size:16px}.shop-header p{font-size:11px}.orders-entry{padding:7px 8px}.product-card{grid-template-columns:66px minmax(0,1fr) auto;padding:10px;gap:9px}.product-photo{width:66px;height:66px}.product-info h3{font-size:13px}.product-info p{font-size:11px}.price{font-size:17px}.add-btn{width:30px;height:30px;font-size:20px}.order-result,.orders-modal{width:calc(100% - 16px);padding:15px}.order-line{grid-template-columns:minmax(0,1fr) auto}.order-line .item-status{display:none}.order-total-line{grid-template-columns:1fr auto}.order-total-line .item-status{display:none}}
.my-order-tabs{display:flex;gap:6px;overflow:auto;padding:10px 0 4px;position:sticky;top:0;background:#fff;z-index:2}.my-order-tabs button{flex:0 0 auto;border:0;background:#f3f4f6;color:#666;border-radius:999px;padding:7px 11px;font-size:11px;font-weight:700}.my-order-tabs button.active{background:#171717;color:#fff}.confirm-mask{position:fixed;inset:0;background:rgba(0,0,0,.48);display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:.18s;z-index:1200;padding:20px}.confirm-mask.show{opacity:1;pointer-events:auto}.confirm-box{width:min(340px,100%);background:#fff;border-radius:18px;padding:20px;box-shadow:0 20px 60px rgba(0,0,0,.25)}.confirm-box h3{margin:0 0 8px;font-size:18px}.confirm-box p{margin:0;color:#666;font-size:13px;line-height:1.6}.confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:16px}.confirm-actions button{height:42px;border:0;border-radius:11px;font-weight:800}.gray-btn{background:#f1f2f4;color:#555}.orange-btn{background:#ff6a00;color:#fff}.expired{opacity:.7}

/* 微信内打开提示：不强制跳转、不隐藏真实地址，仅提供正规浏览器打开指引 */
.wechat-guide{position:fixed;inset:0;background:rgba(0,0,0,.62);display:flex;align-items:center;justify-content:center;padding:20px;z-index:3000;opacity:0;pointer-events:none;transition:.18s}.wechat-guide.show{opacity:1;pointer-events:auto}.wechat-guide-box{width:min(360px,100%);background:#fff;border-radius:20px;padding:24px 20px;box-shadow:0 20px 70px rgba(0,0,0,.28);text-align:center}.wechat-guide-icon{width:48px;height:48px;margin:0 auto 10px;border-radius:50%;background:#f7f7f7;display:grid;place-items:center;font-size:25px;font-weight:900;color:#333}.wechat-guide-box h2{margin:0 0 9px;font-size:20px;color:#222}.wechat-guide-box p{margin:0;color:#666;font-size:13px;line-height:1.7;text-align:left}.wechat-guide-steps{margin:15px 0;padding:12px;background:#f7f8fa;border-radius:12px;display:grid;grid-template-columns:28px 1fr;gap:9px;text-align:left;align-items:center;font-size:12px}.wechat-guide-steps span{width:24px;height:24px;border-radius:50%;background:#222;color:#fff;display:grid;place-items:center;font-weight:800}.wechat-guide-steps b{font-weight:700;color:#444}.wechat-guide-box button{width:100%;height:44px;border:0;border-radius:12px;background:#222;color:#fff;font-size:14px;font-weight:800}
