/* Cosplay - 产品目录风格样式 */

/* CSS 变量 */
:root {
  --accent-color: #ff6b9d;
  --accent-dark: #e91e63;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #999999;
  --border-color: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
  --radius: 8px;
  --max-width: 1200px;
  --header-height: 60px;
}

/* 重置样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

ul {
  list-style: none;
}

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

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

/* 头部 */
.header {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  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: 24px;
  font-weight: bold;
  color: var(--accent-color);
}

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

.nav a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.3s;
}

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

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

.search-box input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 14px;
}

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

/* Hero 区域 */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 60px 0;
  text-align: center;
  color: white;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 16px;
}

.hero p {
  font-size: 16px;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* 搜索区域 */
.search-section {
  padding: 40px 0;
  background: var(--card-bg);
}

.search-large {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  background: var(--bg-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.search-large input {
  flex: 1;
  border: none;
  padding: 16px 20px;
  font-size: 16px;
  outline: none;
}

.search-large button {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 16px 32px;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.3s;
}

.search-large button:hover {
  background: var(--accent-dark);
}

/* 分类导航 */
.categories {
  padding: 40px 0;
}

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

.category-list {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.category-item {
  background: var(--card-bg);
  padding: 16px 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.3s;
  text-align: center;
  min-width: 120px;
}

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

.category-item a {
  display: block;
}

.category-item .icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.category-item .name {
  font-size: 14px;
  color: var(--text-secondary);
}

/* 产品网格 */
.products {
  padding: 40px 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

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

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

.product-image {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

.product-info {
  padding: 16px;
}

.product-name {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.product-price {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.product-rating {
  color: #ffc107;
  font-size: 14px;
  margin-bottom: 12px;
}

.product-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--accent-color);
  color: white;
  text-align: center;
  border-radius: var(--radius);
  font-size: 14px;
  transition: background 0.3s;
}

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

/* 文章列表 */
.articles {
  padding: 40px 0;
  background: var(--card-bg);
}

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

.article-col h3 {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--text-primary);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-color);
}

.article-col ul li {
  margin-bottom: 12px;
}

.article-col ul li a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.3s;
  display: flex;
  align-items: center;
}

.article-col ul li a::before {
  content: "•";
  color: var(--accent-color);
  margin-right: 8px;
}

.article-col ul li a:hover {
  color: var(--accent-color);
}

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

.breadcrumb a {
  color: var(--text-secondary);
  font-size: 14px;
}

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

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

.breadcrumb .current {
  color: var(--text-primary);
}

/* 页面标题 */
.page-header {
  padding: 40px 0;
  text-align: center;
}

.page-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

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

/* 筛选器 */
.filter-bar {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
}

.filter-options {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 14px;
  color: var(--text-secondary);
}

.filter-group select {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--card-bg);
  font-size: 14px;
  cursor: pointer;
}

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

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  font-size: 14px;
  transition: all 0.3s;
}

.pagination a {
  background: var(--card-bg);
  color: var(--text-secondary);
}

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

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

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

/* 文章详情页 */
.article-detail {
  padding: 40px 0;
}

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

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

.article-title {
  font-size: 28px;
  margin-bottom: 16px;
}

.article-meta {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.article-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
}

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

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

.article-content ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

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

/* 侧边栏 */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.sidebar-widget h3 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-color);
}

.sidebar-widget ul li {
  margin-bottom: 12px;
}

.sidebar-widget ul li a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.3s;
}

.sidebar-widget ul li a:hover {
  color: var(--accent-color);
}

/* 相关产品 */
.related-products {
  padding: 40px 0;
}

.related-products h2 {
  font-size: 20px;
  margin-bottom: 24px;
}

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

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

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

.error-title {
  font-size: 24px;
  margin-bottom: 16px;
}

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

.error-btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent-color);
  color: white;
  border-radius: var(--radius);
  font-size: 16px;
  transition: background 0.3s;
}

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

/* 页脚 */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 40px 0;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.footer-col h4 {
  font-size: 16px;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  transition: color 0.3s;
}

.footer-col ul li a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

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

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sidebar-widget {
    flex: 1;
    min-width: 280px;
  }

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

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

  .nav {
    order: 3;
    width: 100%;
    margin-top: 12px;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .search-box {
    width: auto;
    flex: 1;
    margin-left: 16px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .category-list {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 8px;
  }

  .category-item {
    min-width: 100px;
    flex-shrink: 0;
  }

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

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

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

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

  .article-main {
    padding: 24px;
  }

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