/* 全局滚动修复，放在最顶部，不能后置 */
html, body {
  overflow-x: clip !important;
  overflow-y: visible !important;
}
body {
  overflow: visible !important;
  margin: 0;
  padding: 0;
}

/* PC布局 ≥769px 修正关键：align-items: flex-start 不要start压缩 */
.page-wrap {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
  /* 改为flex-start 彻底避免sticky失效坑 */
  align-items: flex-start;
}

/* 侧边栏完整sticky配置，强制基准为视口 */
.sidebar {
  position: sticky;
  top: 100px;
  margin-top: 5px;
  /* 关键：不能设height:100%，使用fit-content */
  width: 260px;
  height: fit-content;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  /* 提升层级避免被商品遮挡 */
  z-index: 10;
  /*box-shadow: 0 3px 4px rgb(0 0 0 / 20%);
  transition: all .1s ease-in*/
  
}

.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
  margin-bottom: 16px;
  background: #0b4778;
}
.sidebar-head h2 {
  font-size: 1.125rem;
  color: #fff
}
.toggle-btn {
  display: none;
  cursor: pointer;
  font-size: 18px;
}
.category-list {
  padding: 0 20px 20px;
}
.category-list li {
  padding: 12px 0;
  color: #333;
  border-bottom: 1px solid #e5e5e5;
  cursor: pointer;
}
.category-list li a {
  color: #333;
}
.category-list li:hover a {
  color: #003399;
}
/*.category-list li:hover {
  animation: lineShowHide 0.5s forwards;
}*/
@keyframes lineShowHide {
  0% {
    border-color: transparent;
  }
  33% {
    border-color: #003399;
  }
  100% {
    border-color: transparent;
  }
}
.category-list li.curt {
  background: url(../img/next1.png) right center no-repeat;
  background-size: 20px;
}
.category-list .curt a {
    color: #003366;
}
.product-content {
width: 100%
/*  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;*/
}

/* 移动端 ≤768px */
@media screen and (max-width: 800px) {
  .page-wrap {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 15px;
  }
  /* 取消吸附 */
  .sidebar {
    position: static;
    top: auto;
    width: 100%;
    max-height: unset;
    overflow-y: visible;
    box-shadow: none;
  }
 .sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 20px;
  border-bottom: 1px solid #eee;
  margin-bottom: 0;
  background: #003399;
}
  .toggle-btn {
    display: block;
    color: #ffffff;
	font-size: 1.25rem;
	font-weight: bold
    transition: transform 0.3s ease;
  }
  .sidebar.close .category-list {
    max-height: 0;
    overflow: hidden;
  }
  .sidebar.close .toggle-btn {
    transform: rotate(180deg);
  }
  .category-list {
    max-height: 800px;
    padding: 0 20px;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .product-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .product-card {
    padding: 60px 10px;
  }
}