/* ============================
   有肉社群 · 产品图鉴页
   深色底 + 暖色品牌阵地页风格
   ============================ */

/* ============================
   设计系统 Token（与工具页保持一致）
   ============================ */
:root {
  --bg:            #0d0a07;
  --bg-surface:    #141009;
  --panel:         rgba(255,253,248,0.045);
  --panel-hover:   rgba(255,253,248,0.075);
  --panel-active:  rgba(255,253,248,0.11);

  --ink:           #fffdf8;
  --ink-2:         rgba(255,253,248,0.72);
  --ink-3:         rgba(255,253,248,0.44);
  --ink-4:         rgba(255,253,248,0.22);

  --line:          rgba(255,253,248,0.09);
  --line-2:        rgba(255,253,248,0.18);

  --accent:        #d4a853;
  --accent-h:      #e5be6b;
  --accent-dim:    rgba(212,168,83,0.15);
  --accent-glow:   0 0 24px rgba(212,168,83,0.22);

  /* 品牌页专属暖色 */
  --warm-1:        #c97b3a;
  --warm-2:        #8b5e3c;
  --warm-glow:     rgba(201,123,58,0.15);

  --shadow-sm:     0 4px 16px rgba(0,0,0,0.28);
  --shadow-lg:     0 20px 60px rgba(0,0,0,0.65);

  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;

  color-scheme: dark;
  font-family: 'Outfit', 'PingFang SC', system-ui, sans-serif;
}

/* 重置 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(201,123,58,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(212,168,83,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(139,94,60,0.06) 0%, transparent 50%);
  color: var(--ink);
  overflow-x: hidden;
}

h1,h2,h3 { font-family: 'Noto Serif SC', serif; }
a { color: inherit; text-decoration: none; }

/* ============================
   顶栏（与其他页面保持一致）
   ============================ */
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
  height: 52px;
  background: rgba(10,8,5,0.88);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(212,168,83,0.15);
  position: sticky;
  top: 0;
  z-index: 200;
}

.topbar-brand { flex: 0 0 auto; }

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-cn-main {
  font-family: 'Noto Serif SC', serif;
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(160deg, #f0d080 0%, #d4a853 45%, #b8892e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  line-height: 1;
  filter: drop-shadow(0 1px 4px rgba(212,168,83,0.4));
}
.brand-divider {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, transparent, rgba(212,168,83,0.5) 30%, rgba(212,168,83,0.5) 70%, transparent);
}
.brand-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  letter-spacing: 0.5px;
}
.brand-tagline {
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.6px;
  line-height: 1;
  font-family: 'Outfit', sans-serif;
}

.topbar-center { flex: 1; text-align: center; }
.topbar-right { flex: 0 0 auto; display: flex; gap: 8px; }

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.nav-btn:hover {
  background: var(--panel);
  color: var(--accent);
  border-color: var(--accent);
}
.nav-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(212,168,83,0.4);
}

/* ============================
   页面头部区域
   ============================ */
.page-header {
  text-align: center;
  padding: 60px 24px 20px;
}
.page-header-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.page-header-title {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--ink), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}
.page-header-subtitle {
  font-size: 14px;
  color: var(--ink-3);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================
   分类标签栏
   ============================ */
.category-bar {
  position: sticky;
  top: 52px;
  z-index: 150;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: rgba(10,8,5,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--panel);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s;
  user-select: none;
}
.category-tag:hover {
  color: var(--ink-2);
  background: var(--panel-hover);
  border-color: var(--line-2);
}
.category-tag.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: rgba(212,168,83,0.35);
  box-shadow: var(--accent-glow);
}
.category-tag .tag-count {
  font-size: 11px;
  background: rgba(255,255,255,0.08);
  padding: 2px 7px;
  border-radius: 10px;
  color: var(--ink-4);
  font-weight: 400;
}
.category-tag.active .tag-count {
  background: rgba(212,168,83,0.2);
  color: var(--accent);
}

/* ============================
   图片网格
   ============================ */
.products-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

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

.product-card {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: all 0.3s ease;
  aspect-ratio: auto;
}
.product-card:hover {
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
  transform: translateY(-4px);
}
.product-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}
.product-card:hover img {
  transform: scale(1.03);
}

/* 图片加载占位 */
.product-card .img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-4);
  font-size: 14px;
}

/* 图片描述悬浮层 */
.product-card .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s ease;
}
.product-card:hover .card-overlay {
  opacity: 1;
  transform: translateY(0);
}
.card-overlay .card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.card-overlay .card-page {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}

/* ============================
   分类章节标题
   ============================ */
.category-section {
  margin-bottom: 40px;
}
.category-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.category-section-title .section-emoji {
  font-size: 22px;
}
.category-section-title .section-count {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 400;
  font-family: 'Outfit', sans-serif;
}

/* ============================
   全屏图片查看器
   ============================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.98);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.lightbox-overlay.show {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-content img {
  max-width: 95vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  user-select: none;
}

/* 查看器导航按钮 */
.lightbox-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 1001;
  backdrop-filter: blur(8px);
}
.lightbox-btn:hover {
  background: rgba(212,168,83,0.25);
  border-color: var(--accent);
  color: var(--accent);
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* 关闭按钮 */
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
  z-index: 1001;
}
.lightbox-close:hover {
  background: rgba(255,80,80,0.3);
  border-color: rgba(255,80,80,0.5);
}

/* 图片计数器 */
.lightbox-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: var(--ink-3);
  background: rgba(0,0,0,0.6);
  padding: 6px 16px;
  border-radius: 20px;
  z-index: 1001;
  backdrop-filter: blur(8px);
}

/* 图片描述 */
.lightbox-caption {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: var(--ink-2);
  background: rgba(0,0,0,0.6);
  padding: 8px 20px;
  border-radius: var(--r-sm);
  z-index: 1001;
  max-width: 80vw;
  text-align: center;
  backdrop-filter: blur(8px);
}

/* ============================
   底部
   ============================ */
.page-footer {
  border-top: 1px solid var(--line);
  padding: 24px;
  text-align: center;
}
.footer-slogan {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--ink-3);
  transition: color 0.2s;
}
.footer-link:hover {
  color: var(--accent);
}
.footer-link svg {
  flex-shrink: 0;
}

/* ============================
   入场动画
   ============================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
  animation: fadeUp 0.6s ease both;
}
.fade-up-d1 { animation-delay: 0.1s; }
.fade-up-d2 { animation-delay: 0.2s; }
.fade-up-d3 { animation-delay: 0.3s; }

/* ============================
   空状态提示
   ============================ */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--ink-3);
}
.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-state-text {
  font-size: 15px;
}

/* ============================
   响应式
   ============================ */
@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .page-header { padding: 40px 16px 16px; }
  .page-header-title { font-size: 26px; }
  .category-bar { gap: 6px; padding: 12px 16px; }
  .category-tag { padding: 6px 14px; font-size: 12px; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .brand-text-group { display: none; }
  .brand-divider { display: none; }
  .products-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .products-container { padding: 16px 12px 60px; }
  .lightbox-btn { width: 40px; height: 40px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .topbar-right .nav-btn { padding: 5px 10px; font-size: 12px; }
}
