/* ============================================
   美容仪器 - 样式表
   风格: 食谱风格 (recipe)
   布局: 单栏布局 (single-column)
   ============================================ */

/* CSS 变量 */
:root {
  --accent-color: #ff9800;
  --accent-light: #ffb74d;
  --accent-dark: #f57c00;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f8f9fa;
  --bg-accent: #fff3e0;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --content-width: 800px;
  --header-height: 64px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
}

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

a:hover {
  color: var(--accent-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ============================================
   布局
   ============================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.content-wrap {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ============================================
   页头
   ============================================ */

.header {
  height: var(--header-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

.logo span {
  color: var(--text-primary);
}

.nav {
  display: flex;
  gap: 32px;
}

.nav a {
  font-size: 0.9375rem;
  font-weight: 500;
}

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

.search-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.search-btn:hover {
  background: var(--bg-accent);
}

.search-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--text-secondary);
}

/* ============================================
   面包屑
   ============================================ */

.breadcrumb {
  padding: 16px 0;
  background: var(--bg-secondary);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-color);
}

.breadcrumb span {
  margin: 0 8px;
  color: var(--text-muted);
}

/* ============================================
   Hero 区域
   ============================================ */

.hero {
  padding: 60px 0;
  background: linear-gradient(135deg, var(--bg-accent) 0%, var(--bg-primary) 100%);
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero-title span {
  color: var(--accent-color);
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-cta {
  display: inline-flex;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent-color);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

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

.btn-secondary:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* ============================================
   特色卡片
   ============================================ */

.features {
  padding: 48px 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

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

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-accent);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.feature-icon svg {
  width: 32px;
  height: 32px;
  fill: var(--accent-color);
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   内容卡片
   ============================================ */

.section {
  padding: 48px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.375rem;
  font-weight: 700;
}

.view-all {
  font-size: 0.9375rem;
  color: var(--accent-color);
  font-weight: 500;
}

.content-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-card {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

.content-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-light);
}

.content-card-img {
  width: 200px;
  height: 140px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.content-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.content-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.content-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.content-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.content-card-title a:hover {
  color: var(--accent-color);
}

.content-card-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-card-tags {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.tag {
  display: inline-flex;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-accent);
  color: var(--accent-dark);
  border-radius: 20px;
}

/* ============================================
   三栏列表
   ============================================ */

.three-col-section {
  padding: 48px 0;
  background: var(--bg-secondary);
}

.three-col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.col-box h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
}

.col-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.col-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
}

.col-list li::before {
  content: "•";
  color: var(--accent-color);
  font-weight: bold;
}

.col-list a {
  color: var(--text-secondary);
  line-height: 1.5;
}

.col-list a:hover {
  color: var(--accent-color);
}

/* ============================================
   分类页样式
   ============================================ */

.category-header {
  padding: 48px 0 32px;
  text-align: center;
}

.category-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.category-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 20px;
}

.category-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.category-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 32px 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.pagination a {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

.pagination a:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.pagination .current {
  background: var(--accent-color);
  color: #fff;
  font-weight: 600;
}

.pagination .prev,
.pagination .next {
  padding: 0 16px;
}

/* 两栏布局 */
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

/* ============================================
   文章页样式
   ============================================ */

.article-header {
  padding: 32px 0;
  text-align: center;
}

.article-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-meta .category {
  color: var(--accent-color);
  font-weight: 500;
}

.article-featured-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}

.article-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--bg-accent);
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 16px;
}

.article-content p {
  margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article-content ul li,
.article-content ol li {
  margin-bottom: 8px;
}

.article-content ul li {
  list-style: disc;
}

.article-content ol li {
  list-style: decimal;
}

.article-content strong {
  font-weight: 600;
  color: var(--accent-dark);
}

.article-content img {
  border-radius: var(--radius-md);
  margin: 24px 0;
}

/* 信息框 */
.info-box {
  background: var(--bg-accent);
  border-left: 4px solid var(--accent-color);
  padding: 20px 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
}

.info-box h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--accent-dark);
}

.info-box ul {
  margin: 0;
}

/* 相关文章 */
.related-section {
  padding: 48px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 48px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.related-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

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

.related-card-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-card-body {
  padding: 16px;
}

.related-card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}

.related-card-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ============================================
   404 页面
   ============================================ */

.error-page {
  min-height: calc(100vh - var(--header-height) - 200px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
}

.error-content {
  max-width: 480px;
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 16px;
}

.error-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.error-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* ============================================
   页脚
   ============================================ */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  margin-bottom: 16px;
  display: inline-block;
}

.footer-brand p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.footer-col a:hover {
  color: var(--accent-color);
}

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

/* ============================================
   响应式设计
   ============================================ */

@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .three-col-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .nav {
    display: none;
  }

  .hero {
    padding: 40px 0;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    padding: 0 20px;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .content-card {
    flex-direction: column;
  }

  .content-card-img {
    width: 100%;
    height: 180px;
  }

  .three-col-grid {
    grid-template-columns: 1fr;
  }

  .two-col-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .article-title {
    font-size: 1.5rem;
  }

  .article-meta {
    flex-direction: column;
    gap: 8px;
  }

  .error-code {
    font-size: 5rem;
  }

  .pagination {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section,
  .features,
  .three-col-section {
    padding: 32px 0;
  }

  .category-header h1 {
    font-size: 1.5rem;
  }

  .category-stats {
    flex-direction: column;
    gap: 8px;
  }
}
