* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  padding-bottom: 24px;
}

/* ========== Navbar ========== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #06C755;
  color: #fff;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-title {
  font-size: 17px;
  font-weight: 700;
}
.nav-link {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

/* ========== Loading ========== */
.loading {
  text-align: center;
  padding: 48px 16px;
  color: #888;
  font-size: 15px;
}

/* ========== Product Grid ========== */
.product-grid {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.product-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.product-body {
  padding: 14px 16px 16px;
}
.product-name {
  font-size: 17px;
  margin-bottom: 4px;
}
.product-desc {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
  line-height: 1.4;
}
.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.product-price {
  font-size: 20px;
  font-weight: 700;
  color: #E74C3C;
}
.product-stock {
  font-size: 13px;
  color: #888;
}
.product-stock.out {
  color: #E74C3C;
}

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn:active {
  opacity: 0.8;
}
.btn-primary {
  background: #06C755;
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: #06C755;
  border: 2px solid #06C755;
}
.btn-disabled {
  background: #ccc;
  color: #fff;
  cursor: not-allowed;
}
.btn-block {
  display: block;
}
.btn-block + .btn-block {
  margin-top: 10px;
}

/* ========== Order Form ========== */
.order-form {
  padding: 0 16px;
}
.form-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
}
.form-section h3 {
  font-size: 15px;
  margin-bottom: 12px;
  color: #555;
}
.form-label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
  margin-top: 12px;
}
.form-label:first-child {
  margin-top: 0;
}
.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus {
  border-color: #06C755;
}

/* 數量控制 */
.qty-control {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qty-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-input {
  width: 48px;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 6px;
}

/* Radio */
.radio-group {
  display: flex;
  gap: 12px;
}
.radio-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.radio-option:has(input:checked) {
  border-color: #06C755;
  background: #f0faf4;
}
.radio-option input {
  accent-color: #06C755;
}

/* Product summary in order page */
.product-summary {
  display: flex;
  gap: 12px;
  align-items: center;
}
.summary-img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
}
.product-summary h3 {
  margin-bottom: 4px;
  color: #333;
}

/* Total */
.total-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}
.total-price {
  font-size: 22px;
  color: #E74C3C;
}

/* ========== Orders List ========== */
.order-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.order-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.order-no {
  font-weight: 700;
  font-size: 14px;
  color: #555;
}
.badge {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.badge-success {
  background: #d4edda;
  color: #155724;
}
.badge-error {
  background: #f8d7da;
  color: #721c24;
}
.badge-default {
  background: #e9ecef;
  color: #495057;
}
.order-items {
  border-top: 1px solid #eee;
  padding-top: 10px;
}
.order-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 4px 0;
}
.order-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #888;
}
.order-total {
  font-size: 16px;
  font-weight: 700;
  color: #333;
}
.order-date {
  font-size: 12px;
  color: #aaa;
  margin-top: 8px;
}

/* ========== Payment Result ========== */
.result-container {
  text-align: center;
  padding: 48px 24px;
}
.result-icon {
  width: 72px;
  height: 72px;
  line-height: 72px;
  border-radius: 50%;
  background: #06C755;
  color: #fff;
  font-size: 36px;
  margin: 0 auto 20px;
}
.result-container h2 {
  margin-bottom: 8px;
}
.result-container p {
  color: #888;
  font-size: 14px;
  margin-bottom: 4px;
}
.order-no-text {
  font-weight: 600;
  color: #555 !important;
  margin-top: 8px !important;
}
.result-actions {
  margin-top: 32px;
}
