/* ========== 全局变量 & 基础重置 ========== */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f8fafc;
  --text: #1e293b;
  --text-light: #64748b;
  --white: #ffffff;
  --card-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --radius: 12px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

/* ========== 头部 ========== */
.site-header {
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text);
}

.logo-icon { font-size: 2rem; }

.main-nav ul { display: flex; list-style: none; gap: 2rem; }

.main-nav a {
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
}

.main-nav a:hover { color: var(--primary); }

/* ========== 按钮 ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: white;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-detail {
  display: inline-flex;
  margin-top: 10px;
  color: var(--primary);
  font-weight: 600;
  transition: color 0.2s;
}

.btn-back {
  color: var(--text-light);
  margin-top: 20px;
  display: inline-block;
}

.btn-experience {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(79,70,229,0.3);
}

.btn-experience:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(79,70,229,0.4);
}

/* 学生端按钮 */
.btn-student {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(5,150,105,0.3);
  text-decoration: none;
}

.btn-student:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(5,150,105,0.4);
  color: white;
}

/* ========== 首页英雄区 ========== */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}

.hero h1 { font-size: 3rem; margin-bottom: 20px; }

.hero p { font-size: 1.25rem; margin-bottom: 30px; opacity: 0.9; }

/* ========== 区块标题 ========== */
.section-title {
  font-size: 2rem;
  margin: 60px 0 30px;
  text-align: center;
}

/* ========== 产品网格 ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  padding-bottom: 60px;
}

.product-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.product-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e2e8f0;
}

.product-img.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.9rem;
  aspect-ratio: 4 / 3;
}

.product-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.product-price {
  font-size: 1.2rem;
  margin-bottom: 15px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.normal-price {
  color: var(--primary);
  font-weight: bold;
  font-size: 1.3rem;
}

.original-price {
  color: #94a3b8;
  text-decoration: line-through;
  font-size: 1rem;
  font-weight: 400;
}

.sale-price {
  color: #dc2626;
  font-weight: bold;
  font-size: 1.3rem;
}

.product-info .btn-detail {
  margin-top: auto;
  align-self: flex-start;
}

/* ========== 产品详情页 ========== */
.product-detail .container {
  padding: 60px 20px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.detail-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  object-fit: cover;
  aspect-ratio: 4/3;
}

.detail-info h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.price {
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 15px;
}

.detail-original {
  font-size: 1.4rem;
}

.detail-sale {
  font-size: 2rem;
}

.desc {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 30px;
}

.btn-group {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* ========== 底部 ========== */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 40px 0;
  margin-top: 60px;
}

.footer-info h3 { color: white; margin-bottom: 10px; }

.footer-copy {
  margin-top: 30px;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .detail-layout { grid-template-columns: 1fr; }
  .main-nav ul { gap: 1rem; }
}