/* ===========================================
   SiteForge / 组件样式
   =========================================== */

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  animation: slideInRight .3s ease;
  min-width: 180px;
  text-align: center;
}
.toast-success { background: var(--success); color: #fff; }
.toast-error   { background: var(--danger);  color: #fff; }
.toast-info    { background: var(--primary); color: #fff; }

/* ===== Product Detail ===== */
.product-detail { max-width: 900px; }
.product-detail .breadcrumb { color: var(--text-muted); font-size: 13px; }
.product-detail .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}
.product-detail .image-section img {
  border-radius: var(--radius-md);
  width: 100%;
}
.product-detail .thumbnails {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.product-detail .thumbnails img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: .7;
  transition: opacity .2s;
  flex-shrink: 0;
}
.product-detail .thumbnails img:hover { opacity: 1; }
.product-detail .info-section h1 { font-size: 24px; margin-bottom: var(--space-sm); }
.product-detail .info-section .category-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface-alt);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}
.product-detail .info-section .price {
  font-size: 28px;
  font-weight: 700;
  color: var(--danger);
  margin: var(--space-lg) 0;
}
.product-detail .info-section .original-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 14px;
}

/* Tags & Chips */
.tag { display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600 }
.tag-blue { background:#e3f2fd;color:#1565c0 }
.tag-green { background:#e8f5e9;color:#2e7d32 }
.filter-chip {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all .2s;
}
.filter-chip:hover, .filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-row { display:flex;gap:6px;flex-wrap:wrap;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch }

/* ===== Account ===== */
.account-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
}
.order-table-wrapper {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.order-table { width: 100%; font-size: 13px; border-collapse: collapse; }
.order-table th {
  background: var(--primary);
  color: var(--text-light);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
}
.order-table td { padding: 12px; border-bottom: 1px solid var(--border-light); }
.order-table tr:last-child td { border-bottom: none; }
.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.status-paid  { background: #e8f5e9; color: var(--success); }
.status-pending { background: #fff3e0; color: var(--warning); }
.status-completed { background: #e8f5e9; color: var(--success); }
.status-cancelled { background: #fce4ec; color: var(--danger); }

/* ===== Checkout ===== */
.checkout-summary {
  background: var(--surface);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}
.checkout-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.checkout-total {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 16px;
  font-weight: 700;
}
.checkout-total .amount { color: var(--danger); }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  color: var(--text-muted);
}
.empty-state .icon {
  font-size: 56px;
  margin-bottom: var(--space-md);
  opacity: .35;
}
.empty-state h3 {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}
.empty-state p {
  font-size: 14px;
  margin-bottom: var(--space-lg);
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}
.empty-state .btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: var(--primary);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s;
}
.empty-state .btn:hover { background: var(--accent-hover); }

/* ===== 懒加载 & 骨架屏 ===== */
.skeleton { background: linear-gradient(90deg, var(--surface-alt) 25%, #eef1f5 50%, var(--surface-alt) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
.skeleton-text { height: 14px; margin-bottom: 8px; width: 60%; }
.skeleton-title { height: 20px; margin-bottom: 12px; width: 40%; }
.skeleton-card { height: 200px; }
.skeleton-avatar { width: 60px; height: 60px; border-radius: 50%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== Loading Spinner ===== */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
