.cart-page {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}
.cart-title {
  font-size: 28px;
  margin-bottom: 24px;
  font-weight: 600;
}
.cart-empty {
  text-align: center;
  padding: 80px 20px;
  background: #f9f9f9;
  border-radius: 12px;
}
.cart-empty p {
  color: #666;
  margin-bottom: 20px;
  font-size: 16px;
}
.cart-loading {
  text-align: center;
  padding: 40px;
  color: #999;
}
.cart-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .cart-content {
    grid-template-columns: 1fr;
  }
}
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
}
.cart-item-img {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  background: #f5f5f5;
}
.cart-item-info {
  flex: 1;
  min-width: 0;
}
.cart-item-name {
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 15px;
}
.cart-item-store {
  font-size: 12px;
  color: #999;
}
.cart-item-price {
  font-weight: 600;
  color: #333;
}
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-item-qty button {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
}
.cart-item-qty button:hover {
  background: #f5f5f5;
}
.cart-item-qty input {
  width: 48px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px;
  font-size: 14px;
}
.cart-item-subtotal {
  font-weight: 600;
  min-width: 80px;
  text-align: right;
}
.cart-item-remove {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  padding: 4px;
  font-size: 14px;
}
.cart-item-remove:hover {
  color: #e74c3c;
}
.cart-summary {
  padding: 24px;
  background: #f9f9f9;
  border-radius: 12px;
  position: sticky;
  top: 20px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.summary-row.total {
  font-size: 18px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
}
.checkout-hint {
  font-size: 12px;
  color: #999;
  margin: 12px 0;
}
.btn-checkout {
  width: 100%;
  padding: 14px 24px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 8px;
}
.btn-checkout:hover:not(:disabled) {
  background: #333;
}
.btn-checkout:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 结算弹窗 */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.checkout-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.checkout-dialog {
  position: relative;
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.checkout-dialog h3 {
  margin: 0 0 20px 0;
}
.checkout-dialog .form-row {
  margin-bottom: 16px;
}
.checkout-dialog .form-row label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}
.checkout-dialog .form-row input,
.checkout-dialog .form-row textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}
.checkout-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.btn-ghost {
  background: #f0f0f0;
  color: #333;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
}

/* 訂單列表樣式 */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.order-card,
.seller-order-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
}
.order-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.order-no {
  font-weight: 600;
}
.order-date {
  color: #999;
  font-size: 14px;
}
.order-status {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
}
.order-status.status-pending { background: #fff3e0; color: #e65100; }
.order-status.status-paid { background: #e3f2fd; color: #1565c0; }
.order-status.status-shipped { background: #e8f5e9; color: #2e7d32; }
.order-status.status-completed { background: #f3e5f5; color: #6a1b9a; }
.order-store, .order-address {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
}
.order-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.order-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.order-item-row img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}
.order-item-info {
  flex: 1;
  min-width: 0;
}
.order-item-meta {
  font-size: 13px;
  color: #999;
}
.order-item-sub {
  font-weight: 600;
}
.order-shipping {
  font-size: 14px;
  color: #2e7d32;
  margin-bottom: 8px;
}
.order-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #eee;
}
.btn-pay {
  padding: 8px 20px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.btn-pay:hover {
  background: #333;
}
.btn-ship {
  padding: 8px 20px;
  background: #1976d2;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.btn-ship:hover {
  background: #1565c0;
}
.order-pay-panel {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.order-pay-panel .pay-row {
  margin-bottom: 10px;
}
.order-pay-panel .pay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.order-pay-panel input.remittance-input {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  min-width: 180px;
  font-size: 14px;
}
.btn-ecpay {
  padding: 8px 16px;
  background: #1a237e;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.btn-ecpay:hover {
  background: #283593;
}
.btn-pay-sim {
  padding: 6px 12px;
  background: #757575;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.btn-pay-sim:hover {
  background: #616161;
}
