* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f7f7f7;
  color: #222;
}

:root {
  --primary: #ff6600;
  --danger: #ee3f3f;
  --text: #222;
  --muted: #777;
  --bg: #f7f7f7;
}

.order-page {
  max-width: 768px;
  margin: 0 auto;
  padding-bottom: 24px;
}

.page {
  background: var(--bg);
  color: var(--text);
}

.banner {
  position: relative;
  background: #fff;
}

.banner img {
  width: 100%;
  display: block;
  height: auto;
}

.badge {
  position: absolute;
  left: 12px;
  top: 12px;
  background: #b30000;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.product {
  background: #fff;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #eee;
}

.product .thumb {
  width: 92px;
  height: 92px;
  border-radius: 6px;
  overflow: hidden;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product .info {
  flex: 1;
}

.product .name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.product .spec {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.price-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.price-now {
  color: var(--danger);
  font-weight: 700;
  font-size: 18px;
}

.price-origin {
  color: #aaa;
  font-size: 12px;
  text-decoration: line-through;
}

.coupon {
  background: #fff7e6;
  color: #b65a00;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.coupon .amount {
  font-size: 18px;
  font-weight: 700;
}

.coupon .countdown {
  font-size: 12px;
  color: #b65a00;
}

.form {
  background: #fff;
  margin-top: 10px;
  padding: 12px;
}

.field {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.field:last-child {
  border-bottom: none;
}

.label {
  width: 78px;
  font-size: 14px;
  color: #444;
}

.control {
  flex: 1;
}

input, select, textarea {
  width: 100%;
  border: none;
  outline: none;
  font-size: 15px;
  padding: 6px 0;
  background: transparent;
}

.addr-tip {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.select-row {
  display: flex;
  gap: 8px;
}

.select-row select {
  flex: 1;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
}

.qty button {
  width: 36px;
  height: 32px;
  border: none;
  background: #f2f2f2;
  font-size: 18px;
  cursor: pointer;
}

.qty input {
  width: 48px;
  text-align: center;
  padding: 0;
}

.summary {
  background: #fff;
  margin-top: 10px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.summary .sum {
  color: var(--danger);
  font-weight: 700;
  font-size: 16px;
}

.details {
  background: #fff;
  margin-top: 10px;
}

.details h3 {
  margin: 0;
  padding: 12px;
  font-size: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.details .imgs {
  padding: 0 0 12px;
}

.details .imgs img {
  width: 100%;
  display: block;
  height: auto;
}

.details .ph {
  width: 100%;
  padding: 48px 0;
  background: #f7f7f7;
  color: #999;
  text-align: center;
}

.fixed-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #eee;
  padding: 10px 12px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: #ff6600 !important;
  color: #fff;
  flex: 1;
  transition: background-color 0.3s;
}

.btn-primary:hover {
  background: #e55a00 !important;
}

.btn-muted {
  background: #f2f2f2;
  color: #333;
}

.tips {
  color: #999;
  font-size: 12px;
  text-align: center;
  margin: 10px 0 0;
}

.dialog-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.dialog-mask.show {
  display: flex;
}

.dialog {
  width: 86%;
  max-width: 520px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

.dialog header {
  padding: 12px;
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.dialog .content {
  padding: 14px;
  font-size: 14px;
}

.dialog .content .ok {
  color: var(--danger);
  font-weight: 700;
}

.dialog .actions {
  display: flex;
  gap: 10px;
  padding: 12px;
}

.dialog .actions .btn {
  flex: 1;
}

.mono {
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.qr-tip {
  color: #666;
  font-size: 12px;
  margin-top: 8px;
}

.hidden {
  display: none;
}
