/* ============================================
   产品列表组件
============================================ */
.junhua-goods-list-section {
  background-color: var(--bg-color-white);
  padding: var(--spacing-9xl) 0;
}

/* 头部标题区域 - 独占整行 */
.junhua-list-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--spacing-7xl);
}

.junhua-header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-3xl);
  max-width: 100%;
}

.junhua-list-title {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-h2);
  line-height: 1.15;
  text-align: center;
  color: var(--text-color-strong);
  margin: 0;
}

.junhua-title-highlight {
  color: var(--primary-color);
}

.junhua-list-subtitle {
  font-family: var(--font-family);
  /* font-weight: var(--font-weight-bold); */
  font-size: 16px;
  line-height: 1.15;
  text-align: center;
  color: var(--text-color-strong);
  margin: 0;
}

.junhua-goods-list-wrapper {
  display: flex;
  gap: var(--spacing-2xl);
}

/* ============================================
   左侧分类导航区域
============================================ */
.junhua-goods-list-sidebar {
  flex-shrink: 0;
  width: 17.3rem;
}

.junhua-sidebar-content {
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}

/* 分类标题区域 */
.junhua-sidebar-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  background-color: var(--bg-color-white);
  border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
  padding: var(--spacing-2xl);
}

.junhua-sidebar-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
}

.junhua-category-icon {
  width: auto !important;
  height: 26px !important;
  object-fit: contain;
}

.junhua-sidebar-title {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-h4);
  line-height: 1.15;
  color: var(--text-color-disabled);
  margin: 0;
}

/* 分类导航列表 */
.junhua-sidebar-nav {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-color-white);
}

/* 一级分类 */
.junhua-category-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-bottom: 1px solid var(--border-color-light);
}

.junhua-category-item:last-child {
  border-bottom: none;
}

.junhua-category-item-header {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.junhua-category-item-active > .junhua-category-item-header {
  background-color: var(--primary-color);
}

.junhua-goods-nav-link {
  display: flex;
  align-items: center;
  flex: 1;
  padding: var(--spacing-2xl);
  text-decoration: none;
  transition: all var(--transition-base);
}

.junhua-category-item:hover > .junhua-category-item-header {
  background-color: var(--primary-color);
}

.junhua-nav-text {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-small);
  line-height: 1.15;
  color: var(--text-color-disabled);
  transition: color var(--transition-base);
}

.junhua-category-item-active .junhua-nav-text,
.junhua-category-item:hover .junhua-nav-text {
  color: var(--text-color-white);
}

/* 展开/收起按钮 */
.junhua-toggle-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  cursor: pointer;
  color: var(--text-color-disabled);
  transition: all var(--transition-base);
  font-size: 12px;
}

.junhua-toggle-icon[data-expanded='true'] {
  transform: translateY(-50%) rotate(180deg);
}

.junhua-category-item-active .junhua-toggle-icon,
.junhua-category-item:hover .junhua-toggle-icon {
  color: var(--text-color-white);
}

/* 二级分类容器 */
.junhua-nav-submenu {
  display: none;
  flex-direction: column;
  width: 100%;
  background-color: var(--bg-color-white);
}

.junhua-nav-submenu-level-2 {
  padding: var(--spacing-base) 0;
  gap: var(--spacing-base);
}

.junhua-nav-subitem {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.junhua-nav-subitem-header {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.junhua-nav-subitem-active > .junhua-nav-subitem-header {
  background-color: var(--primary-color);
}

.junhua-goods-nav-sublink {
  display: flex;
  align-items: center;
  flex: 1;
  padding: var(--spacing-base) var(--spacing-2xl) var(--spacing-base)
    var(--spacing-4xl);
  text-decoration: none;
  transition: all var(--transition-base);
}

.junhua-nav-subitem:hover > .junhua-nav-subitem-header {
  background-color: var(--primary-color);
}

.junhua-nav-subtext {
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  font-size: var(--font-size-small);
  line-height: 1.15;
  color: var(--text-color-disabled);
  transition: color var(--transition-base);
}

.junhua-nav-subitem-active .junhua-nav-subtext,
.junhua-nav-subitem:hover .junhua-nav-subtext {
  color: var(--text-color-white);
}

.junhua-toggle-icon-sub {
  color: var(--text-color-disabled);
}

.junhua-toggle-icon-sub[data-expanded='true'] {
  transform: translateY(-50%) rotate(180deg);
}

.junhua-nav-subitem-active .junhua-toggle-icon-sub,
.junhua-nav-subitem:hover .junhua-toggle-icon-sub {
  color: var(--text-color-white);
}

/* 三级分类容器 */
.junhua-nav-submenu-level-3 {
  padding: var(--spacing-sm) 0;
  gap: var(--spacing-sm);
}

.junhua-nav-granditem {
  display: flex;
  width: 100%;
}

.junhua-nav-granditem-active {
  background-color: var(--primary-color);
}

.junhua-goods-nav-grandlink {
  display: flex;
  align-items: center;
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-2xl) var(--spacing-sm)
    var(--spacing-6xl);
  text-decoration: none;
  transition: all var(--transition-base);
}

.junhua-nav-granditem:hover {
  background-color: var(--primary-color);
}

.junhua-nav-grandtext {
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  font-size: var(--font-size-small);
  line-height: 1.15;
  color: var(--text-color-disabled);
  transition: color var(--transition-base);
}

.junhua-nav-granditem-active .junhua-nav-grandtext,
.junhua-nav-granditem:hover .junhua-nav-grandtext {
  color: var(--text-color-white);
}

/* ============================================
   右侧产品列表区域
============================================ */
.junhua-goods-list-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* 产品网格 */
.junhua-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}

/* 产品卡片 */
.junhua-product-card {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.junhua-product-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--bg-color-white);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

/* 产品图片 */
.junhua-product-image-wrapper {
  position: relative;
  width: 100%;
  background-color: var(--bg-color-white);
  border-bottom: 1px solid var(--border-color-lightest);
  overflow: hidden;
  /* max-height: 12.1rem; */
}

.junhua-product-image-link {
  display: inline-block;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 12.1rem;
}

.junhua-product-image-link img {
  width: 100%;
  object-fit: contain;
  height: 100%;
}

.junhua-product-card:hover .junhua-product-image {
  transform: scale(1.05);
}

/* 产品信息 */
.junhua-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--spacing-3xl) var(--spacing-4xl);
}

.junhua-product-details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2xl);
  height: 100%;
}

.junhua-product-title {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-h5);
  line-height: normal;
  color: var(--text-color-strong);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 2.8rem;
}

.junhua-product-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

.junhua-product-title a:hover {
  color: var(--primary-color);
}

.junhua-product-desc {
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  font-size: var(--font-size-small);
  line-height: 1.15;
  color: var(--text-color-strong);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.junhua-product-divider {
  width: 100%;
  height: 1px;
  background-color: var(--border-color-light);
}

.junhua-product-material {
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  font-size: var(--font-size-small);
  line-height: 1.15;
  color: var(--text-color-strong);
  margin: 0;
  text-transform: capitalize;
}

/* 查看详情按钮 */
.junhua-product-action {
  margin-top: auto;
}

.junhua-btn-view-details {
  width: 100%;
}

.junhua-btn-text {
  white-space: nowrap;
}

/* 分页 */
.junhua-pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: var(--spacing-5xl);
}

@media screen and (max-width: 1024px) {
  .junhua-goods-list-wrapper {
    flex-direction: column;
  }
  .junhua-goods-list-sidebar {
    width: 100%;
    position: relative;
  }

  .junhua-sidebar-nav {
    /* position: absolute; */
    /* width: 100%; */
  }
  .junhua-goods-list-main {
    width: 100%;
  }
}

@media screen and (max-width: 576px) {
  .junhua-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
