/* 牛仔裤童装 - 亲子牛仔服装网站样式 */
/* 主色调: 牛仔蓝 #2c5282，强调色: 暖棕 #795548 */

:root {
  --primary-color: #2c5282;
  --accent-color: #795548;
  --text-dark: #1a202c;
  --text-medium: #4a5568;
  --text-light: #718096;
  --bg-light: #f7fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --max-width: 1200px;
  --header-height: 64px;
}

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

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

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

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

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

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

/* 头部 */
.header {
  background: var(--bg-white);
  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: 700;
  color: var(--primary-color);
}

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

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

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

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

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

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

.search-box::before {
  content: "🔍";
  margin-right: 8px;
  font-size: 14px;
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

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

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero p {
  font-size: 20px;
  opacity: 0.9;
  margin-bottom: 32px;
}

.hero-keywords {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-keywords span {
  background: rgba(255,255,255,0.15);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
}

/* 区块标题 */
.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
  color: var(--text-dark);
}

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

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

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

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

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

.product-info {
  padding: 16px;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

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

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

/* 分类网格 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.category-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-light);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.category-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.category-card p {
  font-size: 14px;
  color: var(--text-light);
}

/* 列表布局 */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

.product-list-item {
  display: flex;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.product-list-image {
  width: 200px;
  min-height: 150px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 14px;
  flex-shrink: 0;
}

.product-list-info {
  padding: 24px;
  flex: 1;
}

.product-list-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-list-info p {
  font-size: 14px;
  color: var(--text-medium);
  margin-bottom: 12px;
}

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

.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-light);
}

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

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

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

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

.filter-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.filter-count strong {
  color: var(--text-dark);
}

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

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

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

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 48px 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.2s;
}

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

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

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

/* 文章详情页 */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding: 32px 0;
}

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

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.article-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

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

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

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

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

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

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

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

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

.sidebar-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.sidebar-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}

.sidebar-list {
  list-style: none;
}

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

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

.sidebar-list a {
  color: var(--text-medium);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

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

.sidebar-list .count {
  color: var(--text-light);
  font-size: 12px;
}

/* 推荐文章 */
.recommended-section {
  background: var(--bg-white);
  padding: 48px 0;
  margin-top: 32px;
}

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

.recommended-item {
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

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

.recommended-item h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.recommended-item p {
  font-size: 13px;
  color: var(--text-light);
}

/* 404页面 */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 0;
}

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

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

.error-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 16px;
}

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

.btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--primary-color);
  color: var(--bg-white);
  border-radius: var(--radius);
  font-weight: 500;
  transition: background 0.2s;
}

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

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

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

.footer-brand h3 {
  font-size: 20px;
  margin-bottom: 16px;
}

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

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

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

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

.footer-links a {
  color: var(--bg-white);
  opacity: 0.8;
  font-size: 14px;
}

.footer-links a:hover {
  opacity: 1;
}

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

/* 响应式设计 */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .sidebar {
    display: none;
  }

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

@media (max-width: 768px) {
  .nav,
  .search-box {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding: 48px 0;
  }

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

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

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

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

  .product-list-item {
    flex-direction: column;
  }

  .product-list-image {
    width: 100%;
    height: 200px;
  }

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

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

  .filter-bar .container {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .article-main {
    padding: 24px;
  }

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

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

  .hero-keywords {
    gap: 8px;
  }

  .hero-keywords span {
    font-size: 12px;
    padding: 6px 12px;
  }
}
