/* =============================================================
   products.css — 产品页特有样式（与 knauf.css 共用基础样式）
   ============================================================= */

/* ===== Page Banner（浅色） ===== */
.page-banner {
  background: linear-gradient(180deg, #f4f7fb 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 48px;
}
.page-banner__crumb {
  font-size: 14px; color: var(--text-3);
  margin-bottom: 8px;
}
.page-banner__crumb a:hover { color: var(--brand); }
.page-banner h1 {
  font-size: 36px; font-weight: 700;
  color: var(--brand);
  margin-bottom: 8px;
}
.page-banner p {
  font-size: 15px; color: var(--text-2);
  max-width: 680px;
}

/* ===== 主体：左侧一级分类 + 右侧二级与产品 ===== */
.catalog-section { padding: 48px 0 96px; background: #fff; }
.catalog-layout {
  display: grid; grid-template-columns: 240px 1fr; gap: 48px;
}

/* 左侧：一级分类树 */
.category-tree {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px 0;
  align-self: start;
  position: sticky; top: 88px;
}
.category-tree__title {
  font-size: 13px; font-weight: 700;
  color: var(--text-3);
  letter-spacing: .06em; text-transform: uppercase;
  padding: 0 20px 14px;
  border-bottom: 1px solid var(--line);
}
.category-tree__list { padding: 8px 0; }
.category-tree__item { margin: 2px 0; }
.category-tree__link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px;
  font-size: 15px; font-weight: 600;
  color: var(--text-2);
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
}
.category-tree__link:hover { background: #eef2f7; color: var(--brand); }
.category-tree__link.is-current {
  background: var(--brand-soft); color: var(--brand);
  border-left-color: var(--brand);
}
.category-tree__count {
  font-size: 13px; color: var(--text-3); font-weight: 500;
}
.category-tree__link.is-current .category-tree__count { color: var(--brand); }

/* 右侧：二级 Tab + 产品网格 */
.catalog-content__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap; gap: 16px;
}
.catalog-content__head h2 { font-size: 22px; color: var(--brand); }
.product-count { font-size: 14px; color: var(--text-3); }

/* 产品网格 */
.product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s;
}
.product-card:hover {
  box-shadow: 0 16px 40px rgba(0, 0, 0, .08);
  transform: translateY(-3px);
}

.product-card__image {
  aspect-ratio: 4/3;
  background: #eef2f6;
  position: relative; overflow: hidden;
}
.product-card__image svg { width: 100%; height: 100%; display: block; }
.product-card__image img { width: 100%; height: 100%; display: block; object-fit: cover; }

.product-card__body {
  padding: 20px 22px 22px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.product-card__title {
  font-size: 17px; font-weight: 700;
  color: var(--brand);
  line-height: 1.35;
}
.product-card__desc {
  font-size: 14px; color: var(--text-2);
  line-height: 1.6;
  flex: 1;
}
.product-card__link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--brand);
  margin-top: 4px;
}
.product-card__link svg {
  width: 15px; height: 15px;
  fill: var(--brand);
  transition: transform .18s;
}
.product-card:hover .product-card__link svg { transform: translateX(3px); }

/* ===== 响应式 ===== */
@media (max-width: 980px) {
  .catalog-layout { grid-template-columns: 1fr; gap: 28px; }
  .category-tree { position: static; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .page-banner h1 { font-size: 28px; }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
}