/* ============================
   产品展示中心 — 展示页样式
   ============================ */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
  --accent: #06b6d4;
  --accent-light: #ecfeff;

  --bg: #f8fafc;
  --bg-alt: #f1f5f9;
  --card-bg: #ffffff;
  --card-border: #f1f5f9;

  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --border: #e2e8f0;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --shadow-lg: 0 20px 40px rgba(79,70,229,.12);
  --shadow-xl: 0 25px 50px rgba(79,70,229,.18);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

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

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ==================== Header ==================== */

.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.85);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-gradient);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
}

.brand-text h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.brand-text span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-nav .nav-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  transition: all .2s;
  text-decoration: none;
}

.header-nav .nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ==================== Main Content ==================== */

.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ==================== Section Label ==================== */

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label i {
  color: var(--warning);
  font-size: 14px;
}

/* ==================== 重点推荐卡片 ==================== */

.featured-section {
  margin-bottom: 40px;
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.featured-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  padding: 36px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  min-height: 240px;
}

.featured-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}

.featured-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.featured-card .card-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(79,70,229,.25);
  position: relative;
  z-index: 1;
}

.featured-card .card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.featured-card .card-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

.featured-card .card-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.featured-card .card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

.featured-card .card-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.featured-card .price-original {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.featured-card .price-sale {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}

.featured-card .price-unit {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.featured-card .card-actions {
  display: flex;
  gap: 10px;
}

/* ==================== 按钮 ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79,70,229,.4);
}

.btn-outline {
  background: var(--card-bg);
  color: var(--primary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ==================== 分类筛选 ==================== */

.filter-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.category-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .25s;
  white-space: nowrap;
  font-family: var(--font);
}

.pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.pill.active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
}

.search-box {
  position: relative;
  width: 240px;
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  transition: all .25s;
  font-family: var(--font);
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

/* ==================== 系统卡片网格 ==================== */

.systems-section {
  min-height: 200px;
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.system-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all .35s cubic-bezier(.4,0,.2,1);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  animation: fadeInUp .5s ease backwards;
}

.system-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.system-card .card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.system-card .card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}

.system-card .card-icon.c1 { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.system-card .card-icon.c2 { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.system-card .card-icon.c3 { background: linear-gradient(135deg, #10b981, #059669); }
.system-card .card-icon.c4 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.system-card .card-icon.c5 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.system-card .card-icon.c6 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.system-card .card-icon.c7 { background: linear-gradient(135deg, #ec4899, #db2777); }
.system-card .card-icon.c0 { background: linear-gradient(135deg, #64748b, #475569); }

.system-card .card-info {
  flex: 1;
  min-width: 0;
}

.system-card .card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.system-card .card-category {
  font-size: 11px;
  color: var(--text-muted);
}

.system-card .card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.system-card .card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--card-border);
}

.system-card .card-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.system-card .price-original {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
  white-space: nowrap;
}

.system-card .price-sale {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.system-card .price-unit {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
}

.system-card .price-free {
  font-size: 14px;
  font-weight: 700;
  color: var(--success);
}

.system-card .btn-demo {
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font);
}

.system-card .btn-demo:hover {
  background: var(--primary);
  color: #fff;
}

/* ==================== 空状态 ==================== */

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: .4;
}

.empty-state h3 {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p { font-size: 14px; }

/* ==================== 骨架屏 ==================== */

.system-card.skeleton,
.featured-card.skeleton {
  background: linear-gradient(90deg, var(--bg-alt) 25%, #e2e8f0 50%, var(--bg-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border: none;
  pointer-events: none;
}

.featured-card.skeleton { min-height: 240px; }
.system-card.skeleton { min-height: 200px; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== Toast ==================== */

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  animation: slideIn .3s ease, slideOut .3s ease 2.7s forwards;
  box-shadow: var(--shadow-md);
  max-width: 360px;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-info { background: var(--primary); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ==================== Footer ==================== */

.site-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
}

/* ==================== 响应式 ==================== */

@media (max-width: 1200px) {
  .systems-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .systems-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-card { min-height: 200px; padding: 28px; }
  .featured-card .card-name { font-size: 19px; }
}

@media (max-width: 640px) {
  .main-content { padding: 20px 16px 48px; }
  .systems-grid { grid-template-columns: 1fr; }
  .featured-card { padding: 24px; }
  .featured-card .card-name { font-size: 18px; }
  .featured-card .price-sale { font-size: 20px; }
  .filter-section { flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; }
  .header-inner { padding: 0 16px; }
  .brand-text h1 { font-size: 16px; }
}

@media (max-width: 400px) {
  .featured-card .card-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
  .system-card .card-meta { flex-direction: column; align-items: flex-start; gap: 10px; }
  .system-card .btn-demo { width: 100%; justify-content: center; }
}
