/* 复古灯具 - 全局样式 */
:root {
  --primary-color: #8B4513;
  --accent-color: #D4A574;
  --bg-color: #FDF8F3;
  --card-bg: #FFFFFF;
  --text-primary: #3D2914;
  --text-secondary: #6B5B4F;
  --border-color: #E8DDD4;
  --shadow: 0 2px 8px rgba(139, 69, 19, 0.1);
  --shadow-hover: 0 4px 16px rgba(139, 69, 19, 0.15);
  --radius: 8px;
  --max-width: 1200px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

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

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

/* 头部 */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #A0522D 100%);
  color: white;
  padding: 0 20px;
  box-shadow: var(--shadow);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

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

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

.nav a {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.nav a:hover {
  color: white;
}

/* 搜索框 */
.search-box {
  max-width: 600px;
  margin: 0 auto 40px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 16px 24px;
  font-size: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  background: var(--card-bg);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-box input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.2);
}

.search-box button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s;
}

.search-box button:hover {
  background: #A0522D;
}

/* Hero区域 */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
  background: linear-gradient(180deg, var(--bg-color) 0%, #FFF 100%);
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

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

/* 分类筛选 */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.category-filter a {
  padding: 10px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 25px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.3s;
}

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

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

/* 区块标题 */
.section-title {
  font-size: 1.4rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 2px;
}

/* 产品卡片网格 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.product-image {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #F5EBE0 0%, #E8DDD4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.product-info {
  padding: 20px;
}

.product-info h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.product-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.product-tag {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(139, 69, 19, 0.1);
  color: var(--primary-color);
  border-radius: 12px;
  font-size: 0.75rem;
}

/* 链接列表 */
.link-list {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.link-item {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: background 0.3s;
}

.link-item:last-child {
  border-bottom: none;
}

.link-item:hover {
  background: rgba(139, 69, 19, 0.03);
}

.link-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.link-content {
  flex: 1;
}

.link-content h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.link-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.link-meta {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

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

/* 统计信息 */
.stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 32px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 48px;
}

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

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
}

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

/* 文章列表 */
.article-sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

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

.article-list h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

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

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

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

.article-list a {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* 面包屑 */
.breadcrumb {
  padding: 16px 20px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

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

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

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

/* 分类头部 */
.category-header {
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(180deg, var(--bg-color) 0%, #FFF 100%);
}

.category-header h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

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

/* 子分类 */
.sub-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.sub-categories a {
  padding: 8px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

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

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

.pagination a,
.pagination span {
  padding: 10px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-primary);
}

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

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

/* 文章详情页 */
.article-header {
  text-align: center;
  padding: 48px 20px 32px;
  background: linear-gradient(180deg, var(--bg-color) 0%, #FFF 100%);
}

.article-header h1 {
  font-size: 1.8rem;
  margin-bottom: 16px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.article-content p {
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content h2 {
  font-size: 1.4rem;
  margin: 32px 0 16px;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 1.2rem;
  margin: 24px 0 12px;
  color: var(--text-primary);
}

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

.article-content li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.article-content img {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 24px 0;
}

/* 标签 */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.tags a {
  padding: 6px 14px;
  background: rgba(139, 69, 19, 0.08);
  border-radius: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.tags a:hover {
  background: var(--primary-color);
  color: white;
}

/* 相关产品 */
.related-section {
  margin-top: 48px;
}

/* 404页面 */
.error-page {
  text-align: center;
  padding: 100px 20px;
}

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

.error-page h1 {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--primary-color);
  color: white;
  border-radius: 25px;
  font-size: 1rem;
  transition: background 0.3s;
}

.btn:hover {
  background: #A0522D;
  color: white;
}

/* 页脚 */
.footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 20px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.footer-brand h3 {
  font-size: 1.3rem;
  color: white;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.8;
}

.footer-links h4 {
  font-size: 1rem;
  color: white;
  margin-bottom: 16px;
}

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

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

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

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

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

/* 响应式设计 */
@media (max-width: 992px) {
  .article-sections {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero {
    padding: 40px 20px 30px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

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

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

  .link-item {
    flex-direction: column;
    gap: 12px;
  }

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

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

@media (max-width: 480px) {
  .category-filter {
    gap: 8px;
  }

  .category-filter a {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  .search-box button {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 12px;
  }
}
