.shop-header {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  background: linear-gradient(180deg, #e54d42 0%, #ef6b5b 100%);
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 14px;
  color: #fff;
}
.shop-header .hello { font-size: 12px; opacity: .92; }
.shop-header .title { font-size: 18px; font-weight: 700; margin-top: 2px; }
.search-bar {
  margin-top: 10px;
  background: #fff;
  border-radius: 20px;
  height: 36px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #999;
  gap: 6px;
}
.search-bar input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: #333;
  min-width: 0;
  font-size: 16px;
}
.sub-header {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  background: #fff;
  min-height: calc(46px + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  padding: env(safe-area-inset-top, 0px) 8px 0;
  border-bottom: 1px solid var(--line);
}
.sub-header .back, .icon-btn {
  width: 36px; height: 36px; border: 0; background: transparent;
  font-size: 20px; cursor: pointer; color: #333;
}
.sub-header h1 { flex: 1; text-align: center; font-size: 16px; margin: 0 36px 0 0; font-weight: 600; }
.banner-wrap { padding: 0 14px; margin-top: 12px; }
.banner {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
  background: #ddd;
}
.banner picture, .card .pic picture { display: block; width: 100%; height: 100%; }
.banner img { width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.banner-dots {
  position: absolute; left: 0; right: 0; bottom: 8px;
  display: flex; justify-content: center; gap: 5px;
}
.banner-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); }
.banner-dots i.on { background: #fff; width: 14px; border-radius: 4px; }
.cats {
  display: flex;
  gap: 8px;
  padding: 14px 14px 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cats button {
  flex: 0 0 auto;
  border: 0;
  background: #fff;
  color: #555;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
}
.cats button.on { background: #e54d42; color: #fff; font-weight: 600; }
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 14px 16px;
}
.card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card .pic {
  aspect-ratio: 1;
  background: #f0f0f0;
  position: relative;
}
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 8px 8px 10px; }
.card .name {
  font-size: 13px;
  height: 38px;
  overflow: hidden;
  line-height: 1.4;
}
.card .meta { margin-top: 4px; display: flex; align-items: baseline; justify-content: space-between; }
.card .sales { color: #aaa; font-size: 11px; }
.tabbar {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  flex-shrink: 0;
  height: auto;
  min-height: 52px;
  padding: 6px 0 calc(6px + var(--safe-bottom));
  background: #fff;
  border-top: 1px solid #eee;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  z-index: 20;
}
.tabbar a, .tabbar button {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #888;
  font-size: 11px;
  position: relative;
  cursor: pointer;
}
.tabbar a.on, .tabbar button.on { color: #e54d42; font-weight: 600; }
.tabbar svg { width: 22px; height: 22px; }
.badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 22px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e54d42;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}
.detail { background: #f5f5f5; }
.detail-swiper { position: relative; background: #fff; aspect-ratio: 1; }
.detail-swiper img { width: 100%; height: 100%; object-fit: cover; }
.detail-swiper .count {
  position: absolute; right: 12px; bottom: 12px;
  background: rgba(0,0,0,.45); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
}
.detail-info { background: #fff; padding: 14px 16px 16px; }
.detail-info .price-row { display: flex; align-items: baseline; gap: 8px; }
.detail-info .price { font-size: 26px; }
.detail-info .name { font-size: 17px; font-weight: 600; margin: 8px 0 6px; }
.detail-info .sub { color: #999; font-size: 12px; display: flex; gap: 12px; }
.block { background: #fff; margin-top: 8px; padding: 14px 16px; }
.block h4 { margin: 0 0 10px; font-size: 14px; }
.spec-group { margin-bottom: 10px; }
.spec-group .lab { color: #666; font-size: 12px; margin-bottom: 6px; }
.spec-vals { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-vals button {
  border: 1px solid #e5e5e5;
  background: #f7f7f7;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.spec-vals button.on { border-color: #e54d42; color: #e54d42; background: #fff1f0; }
.qty-row { display: flex; align-items: center; justify-content: space-between; }
.desc { color: #555; font-size: 13px; white-space: pre-wrap; line-height: 1.7; }
.buybar {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px calc(8px + var(--safe-bottom));
  z-index: 20;
}
.buybar .side {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 48px;
  border: 0;
  background: transparent;
  font-size: 10px;
  color: #666;
  cursor: pointer;
}
.buybar .acts { flex: 1; display: flex; border-radius: 22px; overflow: hidden; height: 40px; }
.buybar .acts button { flex: 1; border: 0; color: #fff; font-weight: 600; cursor: pointer; }
.buybar .cart-btn { background: #ffb000; }
.buybar .buy-btn { background: #e54d42; }

.cart-page, .list-page, .checkout-page, .addresses-page, .pay-page { padding-bottom: 16px; }
.cart-item {
  background: #fff;
  margin: 8px 12px 0;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid #ccc; margin-top: 22px; flex: 0 0 20px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; cursor: pointer;
}
.check.on { background: #e54d42; border-color: #e54d42; color: #fff; font-size: 12px; }
.cart-item img { width: 86px; height: 86px; border-radius: 8px; object-fit: cover; background: #f2f2f2; }
.cart-item .info { flex: 1; min-width: 0; }
.cart-item .name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item .spec { color: #999; font-size: 12px; margin: 4px 0; }
.cart-item .bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.del { border: 0; background: transparent; color: #999; font-size: 12px; cursor: pointer; }
.settlebar, .orderbar {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px calc(8px + var(--safe-bottom));
  z-index: 21;
  gap: 10px;
}
.settlebar .left { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.settlebar .sum { font-size: 13px; }
.settlebar .sum .price { font-size: 18px; }
.settlebar .go, .orderbar .go {
  min-width: 110px;
  height: 40px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(90deg, #ff7a45, #e54d42);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.settlebar .go[disabled], .orderbar .go[disabled] { opacity: .4; pointer-events: none; }

.addr-entry {
  margin: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.addr-btn {
  width: 100%;
  height: 48px;
  border: 1px dashed #e54d42;
  background: #fff8f7;
  color: #e54d42;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.addr-card { cursor: pointer; }
.addr-card .who { font-size: 15px; font-weight: 600; }
.addr-card .who span { font-weight: 400; color: #666; margin-left: 10px; }
.addr-card .where { color: #555; margin: 6px 0 8px; line-height: 1.5; }
.addr-card .change { color: #e54d42; font-size: 13px; }

.order-goods { margin: 0 12px 12px; background: #fff; border-radius: 12px; overflow: hidden; }
.og-item { display: flex; gap: 10px; padding: 12px; }
.og-item img { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; background: #f2f2f2; }
.og-item .nm { flex: 1; }
.og-item .t { font-size: 13px; }
.og-item .s { color: #999; font-size: 12px; }
.total-line {
  display: flex; justify-content: flex-end; align-items: baseline;
  padding: 0 12px 12px; gap: 6px; font-size: 13px;
}
.demo-note {
  margin: 0 12px 12px;
  background: #fff7e6;
  color: #8a5a00;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.6;
}

.pay-page { padding: 16px 16px 24px; }
.pay-amt { text-align: center; background: #fff; border-radius: 12px; padding: 20px 12px; }
.pay-amt .lab { color: #888; font-size: 13px; }
.pay-amt .num { font-size: 32px; color: var(--price); font-weight: 800; margin: 6px 0; }
.pay-qrs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.qr-box { background: #fff; border-radius: 12px; padding: 12px 8px 14px; text-align: center; }
.qr-box h4 { margin: 0 0 8px; font-size: 14px; }
.qr-box img { width: 100%; max-width: 160px; margin: 0 auto; aspect-ratio: 1; object-fit: contain; background: #fafafa; border-radius: 8px; }
.qr-box .tip { color: #999; font-size: 11px; margin-top: 6px; }
.pay-acts { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }

.mine-head {
  background: linear-gradient(180deg, #e54d42, #ef6b5b);
  color: #fff;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 20px 36px;
}
.mine-head .hi { font-size: 20px; font-weight: 700; }
.mine-head p { margin: 6px 0 0; opacity: .9; font-size: 13px; }
.status-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #fff;
  margin: -18px 12px 12px;
  border-radius: 12px;
  padding: 12px 0;
  box-shadow: var(--shadow);
}
.status-row button {
  border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: #333;
}
.status-row .n { font-size: 16px; font-weight: 700; color: #e54d42; }
.menu-list { margin: 0 12px 12px; background: #fff; border-radius: 12px; overflow: hidden; }
.menu-list a, .menu-list button {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  padding: 14px 16px; border: 0; background: #fff; border-bottom: 1px solid #f4f4f4;
  font-size: 14px; cursor: pointer; text-align: left; color: #333;
}
.menu-list a:last-child, .menu-list button:last-child { border-bottom: 0; }
.menu-list .arrow { color: #ccc; }

.order-item { background: #fff; margin: 8px 12px 0; border-radius: 10px; padding: 12px; }
.order-item .top { display: flex; justify-content: space-between; font-size: 12px; color: #999; }
.order-item .st { color: #e54d42; font-weight: 600; }
.order-item .mid { display: flex; gap: 8px; margin-top: 10px; overflow: hidden; }
.order-item .mid img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; background: #f2f2f2; }
.order-item .foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; }

.success-page { text-align: center; padding: 80px 24px; }
.success-page .ok { font-size: 52px; }
.success-page h2 { margin: 8px 0; }


.checkout-page, .addresses-page { padding: 0 0 16px; }
.pay-page { padding: 16px 16px 24px; }
.addr-form-title { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
.addr-entry {
  position: relative;
  z-index: 1;
}
.addr-card .where {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  max-height: none;
}
.sub-header { z-index: 15; }

