/* --- 左侧侧边栏样式（胶囊 Tab 样式） --- */
.sidebar-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  padding: 16px 18px;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* 每行胶囊：撑满行宽，均匀分布，放不下时自动换行 */
.category-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 10px 10px;
  width: 100%;
}

/* 每个分类是一个胶囊按钮；display:contents 让一级按钮和二级容器直接参与 flex 排列 */
.category-item {
  display: contents;
}

/* 一级分类按钮：胶囊样式 */
.cat-level-1 {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  padding: 13px 20px;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0.2px;
  white-space: nowrap;
  background-color: #ededed;
  border-radius: 999px;
}

.cat-level-1:hover {
  background-color: #f9351b;
  color: #fff;
  box-shadow: 0 4px 10px rgba(249, 53, 27, 0.25);
}

.cat-level-1.active {
  background-color: #f9351b;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(249, 53, 27, 0.28);
}

.arrow-icon {
  font-size: 12px;
  transition: transform 0.3s;
}

.cat-level-1.expanded .arrow-icon {
  transform: rotate(180deg);
}

/* 二级分类容器：占满整行，横向排列 */
.sub-cat-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  flex-basis: 100%;
}

.sub-cat-wrapper.open {
  max-height: 500px; /* 足够容纳子项的高度 */
}

.sub-cat-list {
  list-style: none;
  padding: 4px 0 2px;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sub-cat-item {
  padding: 8px 18px;
  cursor: pointer;
  color: #555;
  font-size: 13px;
  transition: all 0.2s;
  background-color: #f7f7f7;
  border-radius: 999px;
  border: 1px solid #ececec;
}

.sub-cat-item:hover {
  color: #f9351b;
  border-color: #f9351b;
  background-color: #fff;
}

.sub-cat-item.active {
  color: #fff;
  font-weight: 600;
  background-color: #f9351b;
  border-color: #f9351b;
}

/* 选中时的左侧指示条（胶囊样式下不再需要） */
.sub-cat-item.active::before {
  display: none;
}

/* --- 右侧产品区域样式 --- */
.content-area {
  min-height: 400px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.prod-img {
  height: 180px;
  background-color: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
}

.prod-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prod-info {
  padding: 15px;
}

.prod-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-desc {
  font-size: 13px;
  color: #777;
  line-height: 1.5;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty-state {
  text-align: center;
  padding: 60px 0;
  color: #999;
}

.showpics {
  width: 94%;
  border-radius: 5px;
  background: #fff;
  margin: 0px;
}

.showpics img {
  border-radius: 4px;
}

.showpics li {
  height: 420px;
  padding-bottom: 1rem;
  text-align: center;
  position: relative;
}

.showpics li img {
  max-height: 410px;
  width: 100%;
  margin: auto;
}

.showpics ol {
  border-top: #dbdbdb solid 1px;
  background: #fbfbfb;
}

.showpics dt {
  min-height: 90px;
}

.showpics dt img {
  height: 90%;
  margin-right: 0.625rem;
  width: 16%;
}

.showpics dt img:hover {
  box-shadow: -5px -5px 8px #aaa;
}
ul.fs2 {
  margin: 0px;
  padding-top: 1px;
}

ul.fs2 li dl {
  width: 20%;
}

ul.fs2 li dt {
  width: 76%;
}

#_nub {
  width: 50px;
}

.nubjia,
.nubjian {
  border: #a0a0a0 1px solid;
  line-height: 27px;
  height: 27px;
  width: 15px;
  display: inline-block;
  margin-left: 3px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

div.min_box_content {
  color: #666;
  min-height: 110px;
  padding-bottom: 22px;
}

div.min_box_content div.c {
  min-height: 110px;
  text-indent: 2em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.f16px {
  font-size: 1rem;
}

/* 移动端适配：保持左右结构但在小屏下堆叠 */
@media (max-width: 1091px) {
  .sidebar-container {
    width: 100%;
    margin-bottom: 20px;
  }
}
@media (max-width: 991px) {
  .sidebar-container {
    width: 100%;
    margin-bottom: 20px;
  }
  /* 平板/小屏：字号略收，允许换行避免文字被裁切 */
  .cat-level-1 {
    font-size: 15px;
    white-space: normal;
    text-align: center;
    padding: 11px 16px;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  /* 胶囊 Tab 小屏适配：允许文字换行 */
  .cat-level-1 {
    white-space: normal;
    text-align: center;
    padding: 8px 16px;
  }
  .sidebar-container {
    width: 100%;
    padding: 16px;
  }

  .showpics li img {
    max-height: 210px;
  }
  .showpics li {
    height: 220px;
  }
  .showpics dt img {
    height: 100%;
    width: 28%;
    margin-bottom: 0.625rem;
  }
}
