* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  color: #3c3c3c;
  background: #f5f5f5;
  line-height: 1.5;
}

a {
  color: #3c3c3c;
  text-decoration: none;
}

a:hover {
  color: #ff0036;
}

/* 模拟浏览器地址栏 */
.browser-chrome {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 8px 16px 10px;
}

.browser-chrome .url-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0f0f0;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: #666;
  max-width: 900px;
  margin: 0 auto;
}

.browser-chrome .url-bar .lock {
  color: #52c41a;
  font-size: 11px;
}

.browser-chrome .url-bar .url-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #333;
}

/* 顶部导航 */
.site-header {
  background: #fff;
  border-bottom: 2px solid #ff0036;
}

.site-header .inner {
  max-width: 1190px;
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 28px;
  font-weight: bold;
  color: #ff0036;
  letter-spacing: -1px;
}

.logo span {
  color: #fff;
  background: #ff0036;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 2px;
  margin-left: 4px;
  vertical-align: middle;
}

.nav-steps {
  display: flex;
  gap: 24px;
  font-size: 14px;
}

.nav-steps .step {
  color: #999;
}

.nav-steps .step.active {
  color: #ff0036;
  font-weight: bold;
}

.nav-steps .step.done {
  color: #3c3c3c;
}

/* 主容器 */
.page-wrap {
  max-width: 1190px;
  margin: 20px auto 40px;
  padding: 0 10px;
}

.page-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 16px;
  color: #3c3c3c;
}

/* 商品列表页 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  border-color: #ff0036;
}

.product-card .thumb {
  width: 100%;
  aspect-ratio: 1;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.product-card .info {
  padding: 12px;
}

.product-card .name {
  font-size: 13px;
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 8px;
}

.product-card .price {
  color: #ff0036;
  font-size: 18px;
  font-weight: bold;
}

.product-card .price small {
  font-size: 12px;
}

.product-card .btn-buy {
  display: block;
  margin-top: 10px;
  text-align: center;
  background: #ff0036;
  color: #fff;
  border: none;
  padding: 8px;
  border-radius: 2px;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
}

.product-card .btn-buy:hover {
  background: #e60033;
}

/* 确认订单 - 店铺区块 */
.shop-block {
  background: #e8f4fc;
  border: 1px solid #c5dff0;
  margin-bottom: 0;
}

.shop-name {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: bold;
  border-bottom: 1px solid #d0e8f5;
}

.shop-name .icon-chat {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: #4a9eff;
  border-radius: 2px;
  color: #fff;
  font-size: 10px;
  text-align: center;
  line-height: 16px;
  margin-left: 6px;
  vertical-align: middle;
}

/* 商品行 */
.order-item {
  background: #fff;
  padding: 16px;
  display: flex;
  gap: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.order-item .item-thumb {
  width: 80px;
  height: 80px;
  background: #f5f5f5;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  flex-shrink: 0;
}

.order-item .item-detail {
  flex: 1;
  min-width: 0;
}

.order-item .item-title {
  font-size: 13px;
  color: #3c3c3c;
  margin-bottom: 6px;
  line-height: 1.4;
}

.order-item .item-spec {
  color: #999;
  font-size: 12px;
  margin-bottom: 4px;
}

.order-item .item-tags {
  margin-top: 6px;
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 4px;
  border: 1px solid #ff0036;
  color: #ff0036;
  margin-right: 4px;
  border-radius: 2px;
}

.tag.blue {
  border-color: #4a9eff;
  color: #4a9eff;
}

.order-item .item-right {
  width: 200px;
  text-align: right;
  flex-shrink: 0;
}

.order-item .unit-price {
  color: #3c3c3c;
  font-size: 14px;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  margin-top: 8px;
}

.qty-control button {
  width: 28px;
  height: 28px;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 16px;
  color: #666;
}

.qty-control button:hover {
  background: #eee;
}

.qty-control input {
  width: 40px;
  height: 28px;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  text-align: center;
  font-size: 12px;
}

.discount-note {
  color: #ff0036;
  font-size: 11px;
  margin-top: 6px;
}

/* 订单选项区 */
.order-options {
  background: #fff;
  display: flex;
  border: 1px solid #e5e5e5;
  border-top: none;
}

.order-options .left-col {
  flex: 1;
  padding: 16px;
  border-right: 1px solid #f0f0f0;
}

.order-options .right-col {
  width: 420px;
  padding: 16px;
}

.form-row {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.form-row label {
  color: #999;
  white-space: nowrap;
  min-width: 72px;
}

.form-row textarea {
  flex: 1;
  height: 60px;
  border: 1px solid #ddd;
  padding: 6px 8px;
  resize: none;
  font-size: 12px;
}

.char-count {
  color: #999;
  font-size: 11px;
  text-align: right;
  margin-top: 2px;
}

.option-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 12px;
}

.option-line .label {
  color: #999;
}

.option-line .value {
  color: #3c3c3c;
}

.option-line .value.red {
  color: #ff0036;
}

.subtotal-line {
  text-align: right;
  padding: 12px 0;
  border-top: 1px dashed #eee;
  margin-top: 8px;
  font-size: 14px;
}

.subtotal-line strong {
  color: #ff0036;
  font-size: 16px;
}

/* 支付方式 */
.payment-section {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-top: none;
  padding: 16px;
}

.payment-section h3 {
  font-size: 14px;
  margin-bottom: 12px;
  font-weight: bold;
}

.payment-methods {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.pay-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border: 2px solid #e5e5e5;
  border-radius: 4px;
  cursor: pointer;
  min-width: 180px;
  transition: border-color 0.2s;
}

.pay-option:hover {
  border-color: #ccc;
}

.pay-option.selected {
  border-color: #ff0036;
  background: #fff5f7;
}

.pay-option input {
  display: none;
}

.pay-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
}

.pay-icon.alipay {
  background: #1677ff;
}

.pay-icon.wechat {
  background: #07c160;
}

.pay-option .pay-name {
  font-size: 14px;
  font-weight: bold;
}

/* 买家信息 & 提交区 */
.checkout-footer {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-top: none;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.checkout-footer .privacy-options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
}

.checkout-footer .privacy-options label {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.buyer-panel {
  margin-left: auto;
  text-align: right;
}

.buyer-info-box {
  border: 2px solid #ff0036;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: #fff;
  min-width: 320px;
}

.buyer-info-box .actual-pay {
  font-size: 14px;
  color: #3c3c3c;
  margin-bottom: 6px;
}

.buyer-info-box .actual-pay .amount {
  font-size: 24px;
  font-weight: bold;
  color: #ff0036;
}

.buyer-info-box .address-line,
.buyer-info-box .recipient-line {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.btn-submit {
  display: block;
  width: 100%;
  min-width: 320px;
  padding: 14px 40px;
  background: #ff0036;
  color: #fff;
  border: none;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
}

.btn-submit:hover {
  background: #e60033;
}

.btn-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 买家信息表单 */
.buyer-form-section {
  background: #fff;
  border: 1px solid #e5e5e5;
  margin-bottom: 0;
  padding: 16px;
}

.buyer-form-section h3 {
  font-size: 14px;
  margin-bottom: 12px;
  font-weight: bold;
  border-left: 3px solid #ff0036;
  padding-left: 8px;
}

.buyer-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 24px;
}

.buyer-fields .field.full {
  grid-column: 1 / -1;
}

.buyer-fields label {
  display: block;
  color: #999;
  margin-bottom: 4px;
  font-size: 12px;
}

.buyer-fields input,
.buyer-fields select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  font-size: 13px;
}

.buyer-fields input:focus,
.buyer-fields select:focus {
  border-color: #ff0036;
  outline: none;
}

.site-footer {
  max-width: 1190px;
  margin: 0 auto 30px;
  padding: 16px 10px;
  text-align: center;
  font-size: 12px;
  color: #999;
}

.site-footer a {
  color: #999;
}

.site-footer a:hover {
  color: #666;
}

/* 支付页 */
.pay-page {
  max-width: 480px;
  margin: 40px auto;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
}

.pay-page .pay-header {
  padding: 24px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.pay-page .pay-amount {
  font-size: 36px;
  font-weight: bold;
  color: #3c3c3c;
  margin: 12px 0;
}

.pay-page .pay-amount span {
  font-size: 20px;
}

.pay-page .order-no {
  color: #999;
  font-size: 12px;
}

.pay-page .pay-body {
  padding: 24px;
}

.pay-status {
  text-align: center;
  padding: 20px;
}

.pay-status .icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.pay-status h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.pay-status p {
  color: #999;
  font-size: 13px;
}

.pay-detail-list {
  margin-top: 20px;
  border-top: 1px solid #f0f0f0;
  padding-top: 16px;
}

.pay-detail-list .row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.pay-detail-list .row .label {
  color: #999;
}

.pay-actions {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
}

.pay-actions .btn {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
}

.pay-actions .btn-primary {
  background: #ff0036;
  color: #fff;
  border-color: #ff0036;
}

.product-switch {
  margin-bottom: 8px;
}

.product-switch select {
  padding: 4px 8px;
  border: 1px solid #ddd;
  font-size: 12px;
  max-width: 100%;
}

@media (max-width: 768px) {
  .order-options {
    flex-direction: column;
  }

  .order-options .right-col {
    width: 100%;
    border-top: 1px solid #f0f0f0;
  }

  .buyer-panel {
    margin-left: 0;
    width: 100%;
  }

  .buyer-fields {
    grid-template-columns: 1fr;
  }
}
