/* ========== 产品列表页专属样式 ========== */

/* 页面头部 */
.page-header {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.page-header-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}
.page-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(10,53,89,0.88) 0%, rgba(15,76,129,0.65) 50%, rgba(37,150,209,0.45) 100%);
  z-index: 2;
}
.page-header-content {
  position: relative;
  z-index: 3;
  padding: 100px 24px 80px;
  text-align: center;
}
.page-eyebrow {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid rgba(6,182,212,0.6);
  border-radius: 30px;
  color: var(--accent-2);
  font-size: 12px;
  letter-spacing: 3px;
  margin-bottom: 20px;
  font-weight: 600;
}
.page-title {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.page-subtitle {
  font-size: clamp(14px, 1.4vw, 17px);
  color: rgba(255,255,255,0.8);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.8;
}

/* 面包屑 */
.breadcrumb {
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0;
  font-size: 13px;
  color: var(--gray-400);
}
.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 10px;
}
.breadcrumb a {
  color: var(--gray-600);
  transition: var(--transition);
}
.breadcrumb a:hover { color: var(--accent-dark); }
.breadcrumb .sep { color: var(--gray-200); }
.breadcrumb .current { color: var(--accent-dark); font-weight: 600; }

/* 产品页面主体布局 */
.product-page {
  padding: 60px 0 100px;
  background: var(--light);
}
.product-page-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

/* 移动端分类切换按钮 */
.sidebar-toggle {
  display: none;
  grid-column: 1 / -1;
  width: 100%;
  padding: 14px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sidebar-toggle span { font-size: 18px; }

/* 左侧侧边栏 */
.product-sidebar {
  position: sticky;
  top: 96px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.product-nav {
  padding: 8px 0;
}
.nav-group {
  border-bottom: 1px solid var(--gray-200);
}
.nav-group:last-child { border-bottom: none; }
.nav-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px 14px;
  font-size: 16px;
  color: var(--primary);
  font-weight: 700;
}
.nav-icon {
  width: 32px;
  height: 32px;
  background: var(--light);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.nav-links {
  padding: 0 16px 16px 22px;
}
.nav-links li { margin-bottom: 4px; }
.nav-links a {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  color: var(--gray-600);
  border-radius: 4px;
  transition: var(--transition);
  position: relative;
  padding-left: 18px;
}
.nav-links a::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gray-200);
  transition: var(--transition);
}
.nav-links a:hover {
  color: var(--accent-dark);
  background: var(--light);
}
.nav-links a:hover::before {
  background: var(--accent);
  width: 6px;
  height: 6px;
}
.nav-links a.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.nav-links a.active::before {
  background: var(--accent-2);
  width: 6px;
  height: 6px;
}

/* 中间内容区 */
.product-content {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  min-height: 600px;
}
.product-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}
.toolbar-left { display: flex; flex-direction: column; gap: 6px; }
.category-title {
  font-size: 24px;
  color: var(--primary);
  font-weight: 700;
}
.category-desc {
  font-size: 13.5px;
  color: var(--gray-400);
}
.product-count {
  font-size: 14px;
  color: var(--gray-600);
  background: var(--light);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 500;
}

/* 产品卡片网格 - 三列布局 */
.product-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pl-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  cursor: pointer;
}
.pl-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.pl-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--gray-100);
}
.pl-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.pl-card:hover .pl-card-img img { transform: scale(1.08); }
.pl-card-img::after {
  content: "🔍";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--primary);
  transition: transform .35s ease;
  box-shadow: var(--shadow-md);
}
.pl-card:hover .pl-card-img::after { transform: translate(-50%, -50%) scale(1); }
.pl-card-body {
  padding: 18px 20px 20px;
}
.pl-card-body h3 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 700;
}
.pl-card-body p {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.7;
  margin: 0;
}
.pl-card.hidden { display: none; }

/* 空状态 */
.product-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray-400);
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.product-empty p { font-size: 15px; margin: 0; }

/* 底部 CTA */
.pl-cta {
  padding: 80px 0;
  background: var(--primary);
  color: #fff;
}
.pl-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.pl-cta h2 {
  font-size: 28px;
  margin-bottom: 12px;
  color: #fff;
}
.pl-cta p {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  margin: 0;
  max-width: 560px;
  line-height: 1.8;
}

/* 回到顶部微调 */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.back-to-top.show { display: flex; }
.back-to-top:hover {
  background: var(--accent-dark);
  transform: translateY(-4px);
}

/* 滚动渐显 */
.pl-card {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeInUp .5s ease forwards;
}
.pl-card:nth-child(1) { animation-delay: 0ms; }
.pl-card:nth-child(2) { animation-delay: 60ms; }
.pl-card:nth-child(3) { animation-delay: 120ms; }
.pl-card:nth-child(4) { animation-delay: 180ms; }
.pl-card:nth-child(5) { animation-delay: 240ms; }
.pl-card:nth-child(6) { animation-delay: 300ms; }
.pl-card:nth-child(7) { animation-delay: 360ms; }
.pl-card:nth-child(8) { animation-delay: 420ms; }
.pl-card:nth-child(9) { animation-delay: 480ms; }
.pl-card:nth-child(10) { animation-delay: 540ms; }
.pl-card:nth-child(11) { animation-delay: 600ms; }
.pl-card:nth-child(12) { animation-delay: 660ms; }
.pl-card:nth-child(13) { animation-delay: 720ms; }
.pl-card:nth-child(14) { animation-delay: 780ms; }
.pl-card:nth-child(15) { animation-delay: 840ms; }
.pl-card:nth-child(16) { animation-delay: 900ms; }
.pl-card:nth-child(17) { animation-delay: 960ms; }
.pl-card:nth-child(18) { animation-delay: 1020ms; }
.pl-card:nth-child(19) { animation-delay: 1080ms; }
.pl-card:nth-child(20) { animation-delay: 1140ms; }
.pl-card:nth-child(21) { animation-delay: 1200ms; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pl-card.reanim {
  animation: none;
  opacity: 1;
  transform: translateY(0);
}

/* ========== 响应式适配 ========== */
@media (max-width: 1024px) {
  .product-page-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .product-sidebar {
    position: static;
    display: none;
  }
  .product-sidebar.open { display: block; }
  .sidebar-toggle { display: flex; }
  .product-card-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .page-header { min-height: 280px; }
  .page-header-content { padding: 80px 20px 60px; }
  .product-page { padding: 40px 0 60px; }
  .product-content { padding: 24px 20px; }
  .product-card-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .pl-card-img { height: 170px; }
  .pl-card-body { padding: 14px 16px 16px; }
  .pl-card-body h3 { font-size: 15px; }
  .product-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .pl-cta-inner {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }
  .pl-cta h2 { font-size: 24px; }
  .back-to-top { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 18px; }
}

@media (max-width: 480px) {
  .product-card-grid { grid-template-columns: 1fr; }
  .pl-card-img { height: 200px; }
  .category-title { font-size: 20px; }
  .nav-links a { font-size: 13.5px; }
}
