/* 咖啡豆 www.jingkacoffee.cn - 咖啡种类、烘焙工艺及产地介绍 */

:root {
  --primary: #6b4423;
  --primary-dark: #4a2e17;
  --accent: #c9a86c;
  --accent-light: #e8d5b5;
  --bg-cream: #faf8f5;
  --bg-light: #f5f0e8;
  --text-dark: #2d2416;
  --text-medium: #5c4d3c;
  --text-light: #8b7355;
  --white: #ffffff;
  --border: #e0d5c5;
  --shadow: 0 2px 8px rgba(107, 68, 35, 0.08);
  --shadow-hover: 0 4px 16px rgba(107, 68, 35, 0.12);
}

* {
  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: 15px;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--bg-cream);
}

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

a:hover {
  color: var(--primary-dark);
}

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

/* Header */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo::before {
  content: '☕';
  font-size: 24px;
}

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

.nav a {
  color: var(--text-medium);
  font-size: 15px;
  font-weight: 500;
}

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

.search-box {
  position: relative;
}

.search-box input {
  width: 240px;
  padding: 8px 16px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg-cream);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--accent);
  background: var(--white);
}

.search-box::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.5;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 80px 20px;
  text-align: center;
}

.hero-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: 18px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-search {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 32px;
  font-size: 16px;
  outline: none;
}

.hero-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 12px 28px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 24px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.hero-search button:hover {
  background: var(--primary-dark);
}

/* Section Title */
.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

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

.section {
  padding: 48px 0;
}

/* Categories */
.categories {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.category-item {
  padding: 12px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-medium);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.category-item:hover,
.category-item.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

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

.product-image {
  aspect-ratio: 4/3;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.product-info {
  padding: 20px;
}

.product-category {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.product-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-origin {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 12px;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-light);
}

.stars {
  color: #ffc107;
}

/* Article Lists */
.article-section {
  background: var(--bg-light);
}

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

.article-list {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
}

.article-list-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
}

.article-list ul {
  list-style: none;
}

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

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

.article-list a {
  color: var(--text-medium);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-list a::before {
  content: '•';
  color: var(--accent);
  font-weight: bold;
}

.article-list a:hover {
  color: var(--primary);
}

/* Breadcrumb */
.breadcrumb {
  padding: 16px 0;
  font-size: 14px;
  color: var(--text-light);
}

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

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

.breadcrumb span {
  margin: 0 8px;
}

/* Page Header */
.page-header {
  background: var(--bg-light);
  padding: 32px 0;
  margin-bottom: 32px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.page-count {
  color: var(--text-light);
  font-size: 14px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.filter-item {
  padding: 8px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-medium);
  cursor: pointer;
}

.filter-item:hover,
.filter-item.active {
  border-color: var(--primary);
  color: var(--primary);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination a,
.pagination span {
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  min-width: 40px;
  text-align: center;
}

.pagination a {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-medium);
}

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

.pagination .current {
  background: var(--primary);
  color: var(--white);
}

.pagination .prev,
.pagination .next {
  padding: 10px 20px;
}

/* Article Page */
.article-container {
  max-width: 800px;
  margin: 0 auto;
}

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

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

.article-meta {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: var(--text-light);
}

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

.article-content {
  background: var(--white);
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 32px;
}

.article-content h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 32px 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 24px 0 12px;
}

.article-content p {
  margin-bottom: 16px;
  color: var(--text-medium);
}

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

.article-content li {
  margin-bottom: 8px;
  color: var(--text-medium);
}

.article-content strong {
  color: var(--text-dark);
}

.article-image {
  width: 100%;
  height: 300px;
  background: var(--bg-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  margin-bottom: 24px;
}

/* Spec Table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.spec-table th,
.spec-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.spec-table th {
  width: 140px;
  color: var(--text-light);
  font-weight: 500;
  background: var(--bg-cream);
}

.spec-table td {
  color: var(--text-dark);
}

/* Related Section */
.related-section {
  margin-top: 48px;
}

.related-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
}

/* 404 Page */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
}

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

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

.error-desc {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 32px;
}

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

.btn {
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--white);
  color: var(--text-medium);
  border: 1px solid var(--border);
}

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

/* Footer */
.footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 48px 0 24px;
  margin-top: 64px;
}

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

.footer-brand {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 14px;
  opacity: 0.8;
  line-height: 1.6;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  opacity: 0.6;
}

/* Responsive */
@media (max-width: 992px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

  .nav {
    display: none;
  }

  .search-box {
    display: none;
  }

  .hero {
    padding: 48px 20px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-desc {
    font-size: 15px;
  }

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

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

  .categories {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .category-item {
    white-space: nowrap;
  }

  .article-content {
    padding: 24px;
  }

  .article-title {
    font-size: 24px;
  }

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

  .error-code {
    font-size: 80px;
  }
}
