/* ===== 古董书籍 - 全局样式 ===== */
:root {
  --accent-color: #8d6e63;
  --accent-light: #bcaaa4;
  --accent-dark: #5d4037;
  --bg-primary: #faf8f5;
  --bg-secondary: #f5f0eb;
  --bg-card: #ffffff;
  --text-primary: #3e2723;
  --text-secondary: #6d4c41;
  --text-muted: #8d6e63;
  --border-color: #d7ccc8;
  --shadow: 0 2px 8px rgba(62, 39, 35, 0.08);
  --shadow-hover: 0 4px 16px rgba(62, 39, 35, 0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
}

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

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

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

/* ===== 布局容器 ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== 页头 ===== */
.header {
  background: var(--bg-card);
  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: var(--header-height);
}

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

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

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

.nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: 24px;
  padding: 8px 16px;
  width: 240px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
  width: 100%;
  color: var(--text-primary);
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: 60px 0;
  text-align: center;
}

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

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

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-dark);
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== 区块标题 ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-more {
  font-size: 0.9rem;
  color: var(--accent-color);
}

/* ===== 书籍卡片 ===== */
.book-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.book-cover {
  aspect-ratio: 3/4;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.book-info {
  padding: 16px;
}

.book-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.book-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.book-status.sale {
  background: #e8f5e9;
  color: #2e7d32;
}

.book-status.repair {
  background: #fff3e0;
  color: #ef6c00;
}

.book-status.appraisal {
  background: #e3f2fd;
  color: #1565c0;
}

.book-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-top: 10px;
}

/* ===== 书籍网格 ===== */
.book-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

/* ===== 书籍列表 ===== */
.book-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.book-list-item {
  display: flex;
  gap: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.book-list-cover {
  width: 120px;
  height: 160px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.book-list-content {
  flex: 1;
}

.book-list-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.book-list-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.book-list-meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== 内容区块 ===== */
.section {
  padding: 48px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

/* ===== 服务卡片 ===== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.service-card:hover {
  transform: translateY(-4px);
}

.service-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}

.service-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ===== 文章列表 ===== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.article-thumb {
  width: 100px;
  height: 75px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.article-content {
  flex: 1;
}

.article-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.article-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ===== 三栏布局 ===== */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.col-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-color);
}

.col-list {
  list-style: none;
}

.col-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.col-list li:last-child {
  border-bottom: none;
}

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

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

/* ===== 面包屑 ===== */
.breadcrumb {
  padding: 16px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

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

.breadcrumb span {
  margin: 0 8px;
}

/* ===== 分类页头 ===== */
.category-header {
  background: var(--bg-secondary);
  padding: 40px 0;
  margin-bottom: 32px;
}

.category-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 8px;
}

.category-desc {
  color: var(--text-secondary);
}

/* ===== 筛选器 ===== */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}

/* ===== 分页 ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover,
.page-btn.active {
  background: var(--accent-dark);
  color: #fff;
  border-color: var(--accent-dark);
}

/* ===== 文章页 ===== */
.article-page {
  padding: 32px 0;
}

.article-header {
  margin-bottom: 32px;
}

.article-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.4;
}

.article-page-meta {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.article-main {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

.article-body {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}

.article-content-body {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-primary);
}

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

.article-content-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 32px 0 16px;
  color: var(--accent-dark);
}

.article-content-body h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 24px 0 12px;
}

.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

/* ===== 书籍详情 ===== */
.book-detail {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.book-detail-cover {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.book-detail-info h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.book-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.book-detail-meta span {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.book-detail-meta strong {
  color: var(--text-primary);
  margin-right: 8px;
}

.book-price-large {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

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

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

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent-dark);
  color: var(--accent-dark);
}

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

.btn-group {
  display: flex;
  gap: 12px;
}

/* ===== 404页面 ===== */
.error-page {
  min-height: calc(100vh - var(--header-height) - 200px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

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

.error-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

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

/* ===== 页脚 ===== */
.footer {
  background: var(--accent-dark);
  color: #fff;
  padding: 48px 0 24px;
  margin-top: 60px;
}

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

.footer-brand .logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--accent-light);
  line-height: 1.7;
}

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

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--accent-light);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--accent-light);
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
  .book-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .article-main {
    grid-template-columns: 1fr;
  }

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

  .book-detail {
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 768px) {
  .header .container {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 20px;
  }

  .nav {
    order: 3;
    width: 100%;
    gap: 20px;
    margin-top: 12px;
    justify-content: center;
  }

  .search-box {
    width: 160px;
  }

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

  .hero-stats {
    gap: 24px;
  }

  .stat-num {
    font-size: 1.8rem;
  }

  .book-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

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

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

  .book-list-item {
    flex-direction: column;
  }

  .book-list-cover {
    width: 100%;
    height: 200px;
  }

  .book-detail {
    grid-template-columns: 1fr;
  }

  .book-detail-cover {
    max-width: 280px;
    margin: 0 auto;
  }

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

  .article-sidebar {
    grid-template-columns: 1fr;
  }
}

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

  .hero-stats {
    flex-direction: column;
    gap: 16px;
  }

  .filter-bar {
    gap: 8px;
  }

  .filter-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .article-body {
    padding: 24px;
  }

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