/* =========================
     Product Banner
    ========================= */
.product-banner {
  margin: 0 auto;
  /* max-width: 1400px; */
  padding: 55px 45px;
  border-radius: 0 0 25px 25px;
  background: linear-gradient(120deg, #edf6ff, #ffffff);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.product-banner h1 {
  font-size: 48px;
  margin-bottom: 15px;
}
.product-banner p {
  font-size: 18px;
  color: #52667a;
  max-width: 550px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 150px);
  gap: 20px;
}
.stats div {
  background: white;
  padding: 25px;
  text-align: center;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}
.stats b {
  display: block;
  font-size: 26px;
  color: #0865e8;
}
/* =========================
     Main Layout
    ========================= */
main.container {
  margin: 30px auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  /* display: flex; */
}

/* =========================
   Categories Sidebar
========================= */
.categories-sidebar {
  background: #ffffff;
  padding: 24px 18px;
  border-radius: 18px;
  border: 1px solid #edf2f7;
  box-shadow: 0 6px 24px rgba(15, 61, 145, 0.05);
  /* width: 280px;
  flex-shrink: 0; */
}
/* Title */
.categories-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 20px;
}
.categories-title h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #102a43;
}
.categories-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0865e8;
  font-size: 22px;
}
/* =========================
 All Categories
========================= */
.category-all {
  display: grid;
  grid-template-columns: 1fr auto 16px;
  align-items: center;
  gap: 8px;
  padding: 14px 14px;
  margin-bottom: 8px;
  border-radius: 12px;
  color: #0865e8;
  background: #edf6ff;
  text-decoration: none;
  width: 100%;
  text-align: left;
}
.category-all.active {
  background: #edf6ff;
  color: #0865e8;
}
.category-main-name {
  font-size: 14px;
  font-weight: 600;
}
.category-count {
  color: #7890ad;
  font-size: 13px;
  white-space: nowrap;
}
.category-all .category-count {
  color: #0865e8;
  font-weight: 600;
}
.category-arrow {
  font-size: 22px;
  color: #0865e8;
  line-height: 1;
}

/* 子项 count */
/* .category-child .category-count {
  font-size: 12px;
}
.category-name,
.category-child,
.category-all,
.expand-icon {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
}
.category-name {
  text-align: left;
  padding: 0;
  font-size: 14px;
  color: #294968;
}
.category-name.active {
  color: #0865e8;
  font-weight: 600;
} */

/* =========================
 Category Group
========================= */
.category-group {
  border-bottom: 1px solid #edf2f7;
}
.category-group:last-child {
  border-bottom: none;
}
/* 一级分类 */
.category-parent {
  min-height: 52px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
/* .category-parent a {
  font-size: 14px;
  color: #294968;
  text-decoration: none;
  font-weight: 500;
}
.category-parent a:hover {
  color: #0865e8;
}
.category-group.expanded
.category-parent a {
  color: #163d68;
  font-weight: 600;
} */

/* 展开箭头 */
.expand-icon {
  width: 18px;
  height: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #6f87a4;
  font-size: 17px;
  cursor: pointer;
  transition: transform 0.2s ease;
  transform: rotate(-90deg);
}
.category-group.expanded .expand-icon {
  color: #0865e8;
}
/* =========================
 二级分类
========================= */
.category-children {
  position: relative;
  margin-left: 28px;
  padding: 2px 0 12px 20px;
  height: 0;
  overflow: hidden;
}
.category-parent.expanded .category-name {
  font-weight: bold;
}
.category-parent.expanded + .category-children {
  height: auto;
}
/* 左侧竖线 */
.category-children::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  bottom: 18px;
  width: 1px;
  background: #dbe8f7;
}
/* 二级分类 */
.category-child {
  position: relative;
  min-height: 42px;
  display: grid;
  grid-template-columns: 1fr auto 14px;
  align-items: center;
  gap: 8px;
  padding: 7px 0 7px 10px;
  color: #58718d;
  text-decoration: none;
  border-radius: 8px;
}
.category-child:hover {
  color: #0865e8;
  background: #f5f9ff;
}
/* 当前分类 */
.category-child.active {
  color: #0865e8;
  font-weight: 600;
  background: #edf6ff;
}
/* 二级分类连接点 */
.child-line {
  position: absolute;
  left: -18px;
  top: 50%;
  width: 14px;
  height: 1px;
  background: #dbe8f7;
}
.child-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: #d5e5f7;
  border-radius: 50%;
}
.child-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.child-arrow {
  color: #9aadc2;
  font-size: 18px;
  line-height: 1;
}

/* =========================
 Mobile
========================= */
@media (max-width: 768px) {
  .categories-sidebar {
    padding: 18px 14px;
    border-radius: 14px;
  }
  .categories-title {
    padding-bottom: 16px;
  }
  .categories-title h3 {
    font-size: 18px;
  }
  .category-parent {
    min-height: 48px;
  }
  .category-child {
    min-height: 40px;
  }
}

.help-box {
  margin-top: 35px;
  padding: 20px;
  background: #eef6ff;
  border-radius: 15px;
}
.help-box button {
  margin-top: 15px;
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  background: #0865e8;
  color: white;
}

/* =========================
     Products
    ========================= */
.products {
  background: white;
  border-radius: 20px;
  padding: 25px;
}
.filter-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}
.filter-bar select {
  height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid #dbe5f0;
  color: #52667a;
}
.result {
  color: #64748b;
  margin-bottom: 20px;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.product-card {
  position: relative;
  padding: 20px;
  border-radius: 18px;
  background: white;
  border: 1px solid #edf2f7;
  transition: 0.3s;
  /* min-width: 0; */
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 70, 150, 0.12);
}
.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 15px;
}
.product-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.product-card p {
  color: #0865e8;
  font-size: 14px;
}
.product-card small {
  color: #64748b;
}
.badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #0865e8;
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
}
.cert {
  margin: 15px 0;
}
.cert {
  font-size: 12px;
}
.cert::first-letter {
  color: #0865e8;
}
.cert {
  word-spacing: 10px;
  color: #475569;
}
.product-card a {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  background: white;
  border: 1px solid #0865e8;
  color: #0865e8;
  display: block;
  text-align: center;
}
/* =========================
     Pagination
    ========================= */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 35px;
}
.pagination a {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f1f5f9;
}
.pagination .active {
  background: #0865e8;
  color: white;
}
