/* 复古奢侈品 - 产品目录风格样式 */

/* CSS 变量定义 */
:root {
  --accent-color: #8b7355;
  --accent-hover: #6d5a42;
  --bg-primary: #faf8f5;
  --bg-secondary: #f5f0e8;
  --text-primary: #2c2416;
  --text-secondary: #5c4d3c;
  --text-muted: #8b7355;
  --border-color: #e8e0d5;
  --card-bg: #ffffff;
  --shadow: 0 2px 8px rgba(44, 36, 22, 0.08);
  --shadow-hover: 0 4px 16px rgba(44, 36, 22, 0.12);
  --radius: 4px;
  --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: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

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

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

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

/* 头部 */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

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

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

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

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

.search-box {
  position: relative;
  width: 240px;
}

.search-box input {
  width: 100%;
  height: 36px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--bg-primary);
  outline: none;
  transition: border-color 0.2s;
}

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

.search-box button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

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

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

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

.hero-search {
  max-width: 480px;
  margin: 0 auto;
}

.hero-search input {
  width: 100%;
  height: 48px;
  padding: 0 20px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 15px;
  background: var(--card-bg);
  outline: none;
  transition: border-color 0.2s;
}

.hero-search input:focus {
  border-color: var(--accent-color);
}

/* 分类导航 */
.categories {
  padding: 32px 0;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.category-list {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
  display: none;
}

.category-item {
  flex-shrink: 0;
  padding: 12px 24px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.category-item:hover,
.category-item.active {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: #fff;
}

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

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

.section-more {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.section-more:hover {
  color: var(--accent-color);
}

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

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

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

/* 产品卡片 */
.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: var(--shadow-hover);
}

.product-image {
  aspect-ratio: 1;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-placeholder {
  width: 60%;
  height: 60%;
  background: var(--border-color);
  border-radius: var(--radius);
}

.product-info {
  padding: 16px;
}

.product-category {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.product-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.product-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-color);
}

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

.stars {
  color: #ffb800;
}

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

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

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

.article-list {
  background: var(--card-bg);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.article-list h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

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

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

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

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

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

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

/* 页脚 */
.footer {
  background: var(--text-primary);
  color: var(--bg-secondary);
  padding: 48px 0 24px;
}

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

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

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

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-column h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #fff;
}

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

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

.footer-column a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

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

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

.breadcrumb ol {
  display: flex;
  align-items: center;
  list-style: none;
  font-size: 13px;
}

.breadcrumb li:not(:last-child)::after {
  content: '>';
  margin: 0 8px;
  color: var(--text-muted);
}

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

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

.breadcrumb li:last-child {
  color: var(--text-primary);
}

/* 分类页头部 */
.category-header {
  padding: 32px 0;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.category-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 4px;
}

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

/* 筛选栏 */
.filter-bar {
  padding: 16px 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}

.filter-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

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

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

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

.filter-btn {
  padding: 6px 12px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

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

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

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

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

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 文章详情页 */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}

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

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

.article-category {
  padding: 4px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  color: var(--accent-color);
}

.article-title {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 16px;
}

.article-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
}

.author-info {
  font-size: 13px;
}

.author-name {
  font-weight: 500;
  color: var(--text-primary);
}

.author-date {
  color: var(--text-muted);
}

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

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

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

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

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

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

.article-image {
  margin: 24px 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.article-image img {
  width: 100%;
}

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

.tag {
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--text-secondary);
}

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

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

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

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

.error-desc {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--accent-color);
  color: #fff;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

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

/* 响应式头部 */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .search-box {
    width: 160px;
  }

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

  .hero p {
    font-size: 14px;
  }

  .filter-inner {
    gap: 12px;
  }

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

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