/* ========================================
   收纳家具 - 佳遇收纳 www.jiayushouna.cn
   书签导航风格 CSS
   ======================================== */

/* CSS 变量定义 */
:root {
  --accent-color: #ff5722;
  --primary-color: #4a90a4;
  --secondary-color: #f5f5f5;
  --text-color: #333;
  --text-muted: #666;
  --text-light: #999;
  --border-color: #e0e0e0;
  --bg-white: #fff;
  --bg-light: #fafafa;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --header-height: 70px;
}

/* 重置样式 */
*, *::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-color);
  background-color: var(--bg-light);
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

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

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

/* ========================================
   页头 Header
   ======================================== */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

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

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

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

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

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

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
  border-radius: 1px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--secondary-color);
  border-radius: 20px;
  padding: 8px 16px;
  gap: 8px;
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  width: 180px;
  font-size: 0.9rem;
}

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

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

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-color);
  color: white;
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.4);
}

/* ========================================
   分类集合 Collections
   ======================================== */
.section {
  padding: 50px 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

/* 分类卡片 */
.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.collection-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border-color);
}

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

.collection-icon {
  width: 60px;
  height: 60px;
  background: var(--secondary-color);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.8rem;
}

.collection-card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--text-color);
}

.collection-card p {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ========================================
   产品卡片 (书签卡片风格)
   ======================================== */
.bookmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.bookmark-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.bookmark-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.bookmark-favicon {
  width: 44px;
  height: 44px;
  background: var(--secondary-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.bookmark-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-color);
}

.bookmark-url {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.bookmark-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.bookmark-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--secondary-color);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tag.highlight {
  background: rgba(255, 87, 34, 0.1);
  color: var(--accent-color);
}

/* ========================================
   文章列表
   ======================================== */
.articles-section {
  background: var(--bg-white);
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
}

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

.article-list {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.article-list h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.article-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

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

/* ========================================
   面包屑导航
   ======================================== */
.breadcrumb {
  background: var(--bg-white);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

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

.breadcrumb-separator {
  color: var(--text-light);
}

.breadcrumb-current {
  color: var(--text-color);
  font-weight: 500;
}

/* ========================================
   分类页特定样式
   ======================================== */
.category-header {
  background: var(--bg-white);
  padding: 40px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.category-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-count {
  color: var(--text-muted);
  font-size: 1rem;
}

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 30px 0;
}

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

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

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 30px;
}

.tag-cloud-item {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.2s;
}

.tag-cloud-item:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.tag-count {
  color: var(--text-light);
  margin-left: 4px;
}

/* ========================================
   文章详情页
   ======================================== */
.article-detail {
  background: var(--bg-white);
  padding: 40px 0;
}

.article-container {
  max-width: 800px;
  margin: 0 auto;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

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

.article-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.3;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 32px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

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

.article-content p {
  margin-bottom: 16px;
  color: var(--text-muted);
  line-height: 1.8;
}

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

.article-content ul li {
  list-style: disc;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.article-content ol li {
  list-style: decimal;
  margin-bottom: 8px;
  color: var(--text-muted);
}

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

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

.article-actions {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.action-btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

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

.action-btn.primary:hover {
  background: #3d7a8c;
}

.action-btn.secondary {
  background: var(--secondary-color);
  color: var(--text-muted);
}

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

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

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

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

.related-card {
  background: var(--bg-light);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: transform 0.2s;
}

.related-card:hover {
  transform: translateY(-2px);
}

.related-card .icon {
  width: 50px;
  height: 50px;
  background: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.5rem;
}

.related-card h5 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.related-card p {
  font-size: 0.8rem;
  color: var(--text-light);
}

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

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

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

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

.error-desc {
  color: var(--text-muted);
  margin-bottom: 30px;
}

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

/* ========================================
   页脚 Footer
   ======================================== */
.footer {
  background: #2c3e50;
  color: white;
  padding: 50px 0 20px;
  margin-top: 60px;
}

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

.footer-brand h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-brand p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  line-height: 1.7;
}

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

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

.footer-column a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: rgba(255,255,255,0.5);
}

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

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

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

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

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

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

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

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

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

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

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

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

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

  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .article-content h1 {
    font-size: 1.5rem;
  }

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

@media (max-width: 480px) {
  .collections-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-wrap: wrap;
  }

  .article-actions {
    flex-direction: column;
  }

  .error-actions {
    flex-direction: column;
  }
}
