/* ============================================
   唇部产品 - 产品目录风格样式
   www.kouhongse.cn
   ============================================ */

/* CSS 变量 */
:root {
  --accent-color: #e91e63;
  --accent-light: #f8bbd9;
  --accent-dark: #c2185b;
  --text-primary: #333;
  --text-secondary: #666;
  --text-muted: #999;
  --bg-primary: #fff;
  --bg-secondary: #f8f8f8;
  --bg-card: #fff;
  --border-color: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

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

ul, ol {
  list-style: none;
}

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

.section {
  padding: 60px 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 32px;
  text-align: center;
  color: var(--text-primary);
}

/* ============================================
   头部导航
   ============================================ */
.header {
  background: var(--bg-primary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
}

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

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

.nav a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

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

.header-search {
  position: relative;
}

.header-search input {
  width: 240px;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.header-search input:focus {
  border-color: var(--accent-color);
  width: 280px;
}

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

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

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

.hero-search {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.hero-search input {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 32px;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  outline: none;
}

.hero-search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 12px 24px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

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

/* ============================================
   分类导航
   ============================================ */
.categories {
  padding: 40px 0;
  background: var(--bg-secondary);
}

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

.category-item {
  padding: 12px 24px;
  background: var(--bg-primary);
  border-radius: 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.category-item:hover,
.category-item.active {
  background: var(--accent-color);
  color: white;
  box-shadow: var(--shadow-md);
}

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

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

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

.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: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-light) 0%, #fce4ec 100%);
  color: var(--accent-color);
  font-size: 3rem;
}

.product-info {
  padding: 20px;
}

.product-category {
  font-size: 0.8rem;
  color: var(--accent-color);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
  line-height: 1.4;
}

.product-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
  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: 1.25rem;
  font-weight: 700;
  color: var(--accent-color);
}

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

.stars {
  color: #ffc107;
}

/* ============================================
   面包屑导航
   ============================================ */
.breadcrumb {
  padding: 20px 0;
  background: var(--bg-secondary);
}

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

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

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

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

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

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

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

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

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

.filter-option {
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.filter-option:hover,
.filter-option.active {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: rgba(233, 30, 99, 0.05);
}

/* ============================================
   分页
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
}

.page-item {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.page-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.page-item.active {
  background: var(--accent-color);
  color: white;
}

.page-item.prev,
.page-item.next {
  padding: 0 16px;
}

/* ============================================
   文章详情页
   ============================================ */
.article-header {
  padding: 40px 0;
  background: var(--bg-secondary);
  text-align: center;
}

.article-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

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

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

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 20px;
}

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

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

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

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

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

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

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

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

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

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

.tag {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

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

/* ============================================
   文章列表组件
   ============================================ */
.article-section {
  background: var(--bg-secondary);
}

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

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

.article-list-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-color);
  color: var(--text-primary);
}

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

.article-list ul li a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

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

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

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

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

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

.error-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

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

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

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

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

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

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

.footer-brand .logo {
  margin-bottom: 16px;
}

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

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

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

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

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

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

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

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

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

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 20px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
  }

  .header-search {
    order: 2;
  }

  .header-search input {
    width: 160px;
  }

  .hero {
    padding: 48px 0;
  }

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

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

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.5rem;
  }

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

  .category-list {
    gap: 10px;
  }

  .category-item {
    padding: 10px 18px;
    font-size: 0.9rem;
  }

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

  .filter-inner {
    gap: 16px;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

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

  .btn {
    width: 100%;
  }
}

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

  .article-title {
    font-size: 1.5rem;
  }

  .article-meta {
    flex-wrap: wrap;
    gap: 12px;
  }
}
