/* how.shop — 買家前台樣式（紫色時尚風） */

:root {
  --primary: #7c3aed;
  --primary-hover: #6d28d9;
  --primary-light: #f3f0ff;
  --secondary: #1e1b4b;
  --success: #00b894;
  --warning: #fdcb6e;
  --danger: #e74c3c;
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --border: #e9ecef;
  --text-primary: #2d3436;
  --text-secondary: #636e72;
  --text-muted: #b2bec3;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --header-height: 56px;
  --bottom-nav-height: 56px;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-logo {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-right: 16px;
}

.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.header-search input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
}

.header-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.header-actions a,
.header-actions button {
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cart-badge {
  background: white;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* ===== Language Selector ===== */
.lang-selector {
  position: relative;
  display: inline-block;
}

.lang-selector select {
  appearance: none;
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 24px 4px 8px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

.lang-selector select option {
  color: var(--text-primary);
  background: white;
}

/* ===== Main Content ===== */
.main-content {
  padding-top: calc(var(--header-height) + 12px);
  padding-bottom: calc(var(--bottom-nav-height) + 12px);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}

/* ===== Bottom Navigation (Mobile) ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 11px;
  text-decoration: none;
  padding: 4px 12px;
  transition: color 0.15s;
}

.bottom-nav a.active,
.bottom-nav a:hover {
  color: var(--primary);
}

.bottom-nav .nav-icon {
  font-size: 20px;
}

/* ===== Product Grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bg-secondary);
  display: block;
}

.product-card-body {
  padding: 8px 10px 12px;
}

.product-card-name {
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.product-card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.product-card-original {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 4px;
}

.product-card-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 4px;
}

.badge-installment {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-discount {
  background: #fef3c7;
  color: #92400e;
}

/* ===== Category Bar ===== */
.category-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  -webkit-overflow-scrolling: touch;
}

.category-bar::-webkit-scrollbar { display: none; }

.category-chip {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 20px;
  background: white;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.category-chip.active,
.category-chip:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); }

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-primary);
  background: white;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-textarea { resize: vertical; min-height: 80px; }

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 12px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal h3 {
  margin-bottom: 16px;
}

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-secondary { background: var(--bg-secondary); color: var(--text-secondary); }

/* ===== Utilities ===== */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 12px; }
.font-bold { font-weight: 600; }
.w-full { width: 100%; }

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ===== Loading ===== */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: var(--text-muted);
}

/* ===== Auth Page ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-secondary);
}

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--primary);
  font-size: 28px;
  letter-spacing: -0.5px;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span { padding: 0 12px; }

.btn-line {
  background: #06C755;
  color: white;
  width: 100%;
  padding: 12px;
}
.btn-line:hover { background: #05b34d; }

/* ===== Checkout ===== */
.checkout-summary {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  position: sticky;
  top: calc(var(--header-height) + 12px);
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s;
  margin-bottom: 8px;
}

.payment-option.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.payment-option input[type="radio"] {
  accent-color: var(--primary);
}

/* ===== Product Detail ===== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.product-main-image {
  width: 100%;
  border-radius: var(--radius-lg);
  aspect-ratio: 1;
  object-fit: cover;
  background: #f0f0f0;
}

.product-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  overflow-x: auto;
}

.product-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}

.product-thumb.active,
.product-thumb:hover {
  border-color: var(--primary);
}

.product-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.product-store { color: var(--text-secondary); margin-bottom: 12px; }
.product-store a { color: var(--primary); }

.product-price-block { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.product-price { font-size: 28px; font-weight: 700; color: var(--primary); }
.product-original-price { font-size: 16px; color: var(--text-muted); text-decoration: line-through; }
.product-discount { font-size: 14px; color: var(--danger); font-weight: 600; }

.installment-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.product-description { margin-bottom: 16px; color: var(--text-secondary); line-height: 1.7; }

.product-stock { margin-bottom: 16px; font-size: 14px; }
.product-stock.out-of-stock { color: var(--danger); }

.quantity-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.quantity-selector button {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-secondary);
  font-size: 18px;
  cursor: pointer;
}
.quantity-selector button:hover { background: var(--border); }
.quantity-selector input {
  width: 50px;
  height: 36px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 14px;
}
.quantity-selector input::-webkit-inner-spin-button { -webkit-appearance: none; }

.product-actions { margin-top: 8px; }

/* ===== Cart ===== */
.cart-items { margin-bottom: 24px; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: var(--radius);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}

.cart-item-img { width: 72px; height: 72px; border-radius: var(--radius); object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 500; margin-bottom: 2px; }
.cart-item-store { font-size: 12px; color: var(--text-muted); }
.cart-item-price { color: var(--primary); font-weight: 600; }
.cart-item-subtotal { font-weight: 600; font-size: 14px; text-align: right; }
.cart-item-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.cart-summary {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-md);
}
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: 16px; }
.cart-total { font-size: 20px; font-weight: 700; color: var(--primary); }

/* ===== Checkout Layout ===== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.checkout-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.checkout-item-img { width: 48px; height: 48px; border-radius: var(--radius); object-fit: cover; }
.checkout-item-info { flex: 1; display: flex; justify-content: space-between; align-items: center; }
.checkout-item-price { font-weight: 600; color: var(--primary); }
.checkout-total { display: flex; justify-content: space-between; padding-top: 12px; font-size: 18px; }

.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.radio-label input { accent-color: var(--primary); }

.gateway-options { display: flex; flex-direction: column; gap: 8px; }
.gateway-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.gateway-option.selected { border-color: var(--primary); background: var(--primary-light); }
.gateway-option input { accent-color: var(--primary); }

.installment-preview {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--primary-light);
  border-radius: var(--radius);
  color: var(--primary);
  font-weight: 500;
}

.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 12px; font-size: 14px; }
.alert-warning { background: #ffeaa7; color: #856404; }
.alert-warning a { color: var(--primary); margin-left: 8px; }

/* ===== Orders ===== */
.order-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.order-card:hover { box-shadow: var(--shadow-md); }

.order-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.order-no { font-weight: 600; font-size: 14px; }
.order-card-body { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--text-secondary); }
.order-total { font-weight: 700; color: var(--primary); }
.order-card-footer { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-top: 8px; }

.order-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
}
.status-pending { background: #ffeaa7; color: #856404; }
.status-confirmed { background: #74b9ff; color: #0056b3; }
.status-shipping { background: #81ecec; color: #00695c; }
.status-ready_pickup { background: var(--primary-light); color: var(--primary); }
.status-completed { background: #55efc4; color: #00695c; }
.status-cancelled { background: #fab1a0; color: #8b0000; }

.page-back { margin-bottom: 16px; }
.page-back a { color: var(--text-secondary); font-size: 14px; }

.order-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.order-detail-header h2 { font-size: 18px; }

.info-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.order-item-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.order-total-row { display: flex; justify-content: space-between; padding-top: 12px; font-size: 16px; }

.payment-result { margin-top: 16px; padding: 16px; background: var(--primary-light); border-radius: var(--radius); }
.payment-ref { margin-bottom: 8px; }

/* ===== Profile ===== */
.kyc-status-block { display: flex; align-items: center; gap: 12px; }

/* ===== KYC Form ===== */
.kyc-preview {
  margin-top: 8px;
  max-width: 200px;
  max-height: 150px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ===== Store Page ===== */
.store-header { margin-bottom: 24px; }
.store-banner { width: 100%; height: 180px; object-fit: cover; border-radius: var(--radius-lg); }
.store-info-block { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.store-logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid white; box-shadow: var(--shadow-sm); }
.store-desc { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }

/* ===== Badges ===== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 500;
}
.badge-success { background: #55efc4; color: #00695c; }
.badge-warning { background: #ffeaa7; color: #856404; }
.badge-danger { background: #fab1a0; color: #8b0000; }
.badge-muted { background: #dfe6e9; color: #636e72; }
.badge-info { background: #74b9ff; color: #0056b3; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-paid { background: #55efc4; color: #00695c; }
.badge-unpaid { background: #ffeaa7; color: #856404; }
.badge-partial { background: #fdcb6e; color: #856404; }

/* ===== Data Table ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { font-weight: 600; color: var(--text-secondary); font-size: 12px; text-transform: uppercase; }

/* ===== Pagination ===== */
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 16px; }

/* ===== Misc ===== */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

.btn-icon { background: none; border: none; cursor: pointer; font-size: 16px; }
.btn-danger-text { color: var(--danger); background: none; border: none; cursor: pointer; }
.btn-danger-text:hover { text-decoration: underline; }

.btn-block { display: block; width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-outline { background: none; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }

.btn-danger { background: var(--danger); color: white; border: none; padding: 10px 20px; border-radius: var(--radius); cursor: pointer; }
.btn-danger:hover { opacity: 0.9; }

.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: white;
}
.form-select-sm { padding: 4px 8px; font-size: 12px; width: auto; }

.form-hint { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: pointer;
}
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cart-item { flex-wrap: wrap; }
  .cart-item-actions { width: 100%; justify-content: space-between; }

  .form-row { grid-template-columns: 1fr; }

  .header-search { max-width: none; }

  .container { padding: 0 8px; }

  .hide-mobile { display: none; }
}

@media (min-width: 769px) {
  .bottom-nav { display: none; }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }

  .main-content {
    padding-bottom: 24px;
  }
}

/* ==================== 二手手機版型 ==================== */
.phone-detail {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 88px; /* 留空間給 fixed CTA */
}
.phone-gallery {
  background: #fff;
  position: relative;
}
.phone-main-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.phone-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  background: #fff;
}
.phone-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.phone-thumb.active {
  border-color: var(--primary);
}
.phone-header {
  background: #fff;
  padding: 16px;
  margin-top: 8px;
}
.phone-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.phone-condition-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: #00b894;
}
.phone-condition-badge.cond-99 { background: #00b894; }
.phone-condition-badge.cond-95 { background: #0984e3; }
.phone-condition-badge.cond-90 { background: #6c5ce7; }
.phone-condition-badge.cond-85 { background: #fdcb6e; color: #2d3436; }
.phone-condition-badge.cond-80 { background: #e17055; }
.phone-verified-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary);
}
.phone-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.35;
}
.phone-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}
.phone-price-card {
  background: linear-gradient(135deg, #fff7ed 0%, #fff 100%);
  padding: 16px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.phone-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.phone-price {
  font-size: 28px;
  font-weight: 700;
  color: #e17055;
}
.phone-original-price {
  font-size: 16px;
  color: var(--text-muted);
  text-decoration: line-through;
}
.phone-installment {
  margin-top: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
}
.phone-card {
  background: #fff;
  margin-top: 8px;
  padding: 16px;
}
.phone-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.phone-spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}
.phone-spec-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.phone-spec-label {
  font-size: 12px;
  color: var(--text-muted);
}
.phone-spec-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}
.phone-warranty,
.phone-accessories {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 14px;
}
.phone-defects-card {
  background: #fff5f5;
  border-left: 4px solid var(--danger);
}
.phone-defects-text {
  color: #c0392b;
  line-height: 1.6;
  white-space: pre-wrap;
}
.phone-store-link {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}
.phone-stock {
  padding: 12px 16px;
  background: #fff;
  margin-top: 8px;
  font-size: 14px;
  color: var(--success);
  font-weight: 500;
}
.phone-stock.out-of-stock {
  color: var(--danger);
}
.phone-cta-footer {
  position: fixed;
  bottom: var(--bottom-nav-height);
  left: 0;
  right: 0;
  background: #fff;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  z-index: 50;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}
.phone-cta-btn {
  width: 100%;
}

/* ==================== 服飾版型 ==================== */
.apparel-detail {
  max-width: 720px;
  margin: 0 auto;
}
.apparel-gallery {
  background: #fff;
}
.apparel-main-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}
.apparel-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
}
.apparel-thumb {
  width: 60px;
  height: 75px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.apparel-thumb.active {
  border-color: var(--primary);
}
.apparel-info {
  background: #fff;
  padding: 20px 16px;
}
.apparel-brand-line {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.apparel-brand {
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.apparel-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}
.apparel-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.35;
}
.apparel-store {
  margin-bottom: 12px;
  font-size: 13px;
}
.apparel-store a { color: var(--primary); text-decoration: none; }
.apparel-price-block {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 16px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.apparel-price {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
}
.apparel-original-price {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 15px;
}
.apparel-discount {
  background: var(--primary);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.apparel-spec-block {
  margin: 16px 0;
}
.apparel-spec-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.apparel-pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.apparel-pill {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  cursor: default;
}
.apparel-pill.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}
.apparel-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 13px;
}
.apparel-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.apparel-meta-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==================== 響應式 ==================== */
@media (max-width: 480px) {
  .phone-spec-grid { grid-template-columns: 1fr; }
}
