@import url("https://fonts.googleapis.com/css2?family=Annapurna+SIL:wght@700&display=swap");

body.page-products {
  background: #EBEFF0;
}

body.page-products.is-modal-open {
  overflow: hidden;
}

.products-main.page-main {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--pc-shell-offset));
  min-height: 0;
  overflow: hidden;
}

.cp-tabs-wrap {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 1920px;
  margin: 12px auto 22px;
}

/* I代、II代：隐藏「软件平台」入口（占位保留，不删布局） */
.products-main:has(#cp-cat-i:checked) .cp-type-tabs li:has(.cp-type-tab[for="cp-type-software"]),
.products-main:has(#cp-cat-ii:checked) .cp-type-tabs li:has(.cp-type-tab[for="cp-type-software"]) {
  visibility: hidden;
  pointer-events: none;
}

.cp-type-input,
.cp-cat-input {
  display: none;
}

.cp-type-tabs {
  display: flex;
  gap: 22px;
  width: 496px;
  height: 72px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-type-tabs li {
  margin: 0;
  padding: 0;
}

.cp-type-tab {
  position: relative;
  width: 237px;
  height: 72px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 11px;
  font-family: "Annapurna SIL", "Microsoft YaHei", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  color: #08111F;
  background: #FFFFFF1A;
  border: 1px solid #fff;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}

.cp-type-tab-inner {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  text-align: center;
}

.cp-type-tab-line,
.cp-category-line {
  flex-shrink: 0;
  background: var(--accent-gradient-line);
}

.cp-type-tab-line {
  display: block;
  visibility: hidden;
  position: absolute;
  left: 50%;
  bottom: 9px;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
}

.cp-category-line {
  display: none;
  width: 80px;
  height: 2px;
  flex-shrink: 0;
}

#cp-type-hardware:checked ~ .cp-tabs-wrap .cp-type-tab[for="cp-type-hardware"] .cp-type-tab-line,
#cp-type-software:checked ~ .cp-tabs-wrap .cp-type-tab[for="cp-type-software"] .cp-type-tab-line {
  visibility: visible;
}

#cp-cat-v:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-v"] .cp-category-line,
#cp-cat-iii:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-iii"] .cp-category-line,
#cp-cat-ii:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-ii"] .cp-category-line,
#cp-cat-i:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-i"] .cp-category-line,
#cp-cat-huawei:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-huawei"] .cp-category-line,
#cp-cat-cabinet:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-cabinet"] .cp-category-line {
  display: block;
}

.cp-type-tab-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.products-main {
  display: flex;
  flex-direction: column;
}

.cp-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.cp-wrap::-webkit-scrollbar {
  display: none;
}

.cp-body {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 105px;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 273px;
  box-sizing: border-box;
  overflow: visible;
}

/* PC：压缩左右边距与分类间距；5 列产品卡随剩余宽度均分伸展。 */
@media (min-width: 993px) {
  .cp-body {
    --cp-cat-w: 155px;
    --cp-body-gap: clamp(24px, 2vw, 40px);
    --cp-list-5-w: 1360px;
    --cp-body-edge: 40px;
    justify-content: flex-start;
    gap: var(--cp-body-gap);
    padding-right: var(--cp-body-edge);
    padding-left: var(--cp-body-edge);
  }

  .cp-categories-wrap {
    flex: 0 0 auto;
  }
}

/* 仅 HTML 包裹层，PC 不参与 H5 的居中/悬浮布局 */
.cp-categories-wrap {
  flex-shrink: 0;
}

.cp-categories {
  width: 155px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-categories li {
  margin: 0;
  padding: 0;
}

.cp-category {
  width: 155px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  color: #333;
  background: #FFFFFF99;
  border: 1px solid #fff;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}

#cp-cat-v:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-v"],
#cp-cat-iii:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-iii"],
#cp-cat-ii:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-ii"],
#cp-cat-i:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-i"],
#cp-cat-huawei:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-huawei"],
#cp-cat-cabinet:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-cabinet"] {
  font-weight: 700;
  color: #E10600;
  background: #FFFFFF1A;
  border-color: #fff;
  justify-content: flex-end;
  padding: 12px 0 6px;
}

.cp-category-line {
  width: 80px;
  height: 2px;
}

.cp-main {
  flex: 0 0 auto;
  width: 1077px;
  min-width: 1077px;
  max-width: 100%;
  padding-top: 6px;
}

.cp-products {
  width: 1077px;
  max-width: 100%;
  min-height: 324px;
  display: flex;
  flex-wrap: nowrap;
  gap: 28px;
  align-items: flex-start;
  align-content: flex-start;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-banner-desc--software,
.cp-banner-img--software {
  display: none;
}

/* 配套机柜 → 软件平台：Banner 显示返回（切回配套机柜硬件列表） */
.cp-banner-toolbar--software {
  display: none;
}

.products-main:has(#cp-cat-cabinet:checked) #cp-type-software:checked ~ .cp-banner .cp-banner-toolbar--software,
.products-main:has(#cp-cat-cabinet:checked)[data-cp-type="software"] .cp-banner-toolbar--software {
  display: flex;
}

.cp-body--software {
  display: none;
  flex: none;
  padding: 0 40px 40px;
}

#cp-type-software:checked ~ .cp-banner .cp-banner-desc--hardware,
#cp-type-software:checked ~ .cp-banner .cp-banner-img--hardware {
  display: none;
}

#cp-type-software:checked ~ .cp-banner .cp-banner-desc--software,
#cp-type-software:checked ~ .cp-banner .cp-banner-img--software {
  display: block;
}

#cp-type-software:checked ~ .cp-wrap .cp-body--hardware {
  display: none;
}

#cp-type-software:checked ~ .cp-wrap {
  display: none;
}

#cp-type-software:checked ~ .cp-body--software {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

#cp-type-software:checked ~ .cp-body--software::-webkit-scrollbar {
  display: none;
}

/* 一级分类：后端可在 main 上写 data-cp-type="hardware|software"，与 radio 初始 checked 保持一致 */
.products-main[data-cp-type="software"] .cp-body--hardware {
  display: none;
}

.products-main[data-cp-type="software"] .cp-wrap {
  display: none;
}

.products-main[data-cp-type="software"] .cp-body--software {
  display: block;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.products-main[data-cp-type="software"] .cp-body--software::-webkit-scrollbar {
  display: none;
}

.products-main[data-cp-type="software"] .cp-banner-desc--hardware,
.products-main[data-cp-type="software"] .cp-banner-img--hardware {
  display: none;
}

.products-main[data-cp-type="software"] .cp-banner-desc--software,
.products-main[data-cp-type="software"] .cp-banner-img--software {
  display: block;
}

.products-main:has(#cp-cat-cabinet:checked) #cp-type-software:checked ~ .cp-body--software .cp-soft-list--default,
.products-main:has(#cp-cat-cabinet:checked)[data-cp-type="software"] .cp-soft-list--default {
  display: none;
}

.products-main:has(#cp-cat-cabinet:checked) #cp-type-software:checked ~ .cp-body--software .cp-soft-list--cabinet,
.products-main:has(#cp-cat-cabinet:checked)[data-cp-type="software"] .cp-soft-list--cabinet {
  display: flex;
}

/* 配套机柜软件：一屏展示 kz 图，内容区不滚动 */
.products-main:has(#cp-cat-cabinet:checked) #cp-type-software:checked ~ .cp-body--software,
.products-main:has(#cp-cat-cabinet:checked)[data-cp-type="software"] .cp-body--software {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0 40px 16px;
}

.products-main:has(#cp-cat-cabinet:checked) #cp-type-software:checked ~ .cp-body--software .cp-soft-list--cabinet,
.products-main:has(#cp-cat-cabinet:checked)[data-cp-type="software"] .cp-soft-list--cabinet {
  flex: 1;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin: 0;
  padding: 0 20px;
}

.products-main:has(#cp-cat-cabinet:checked) #cp-type-software:checked ~ .cp-body--software .cp-soft-cabinet-item,
.products-main:has(#cp-cat-cabinet:checked)[data-cp-type="software"] .cp-soft-cabinet-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  max-height: 100%;
}

.products-main:has(#cp-cat-cabinet:checked) #cp-type-software:checked ~ .cp-body--software .cp-soft-cabinet-item img,
.products-main:has(#cp-cat-cabinet:checked)[data-cp-type="software"] .cp-soft-cabinet-item img {
  width: auto;
  max-width: min(697px, 100%);
  max-height: 100%;
  height: auto;
  object-fit: contain;
}

/* 软件平台：6 个产品系列，固定每行 3 个，产品图作背景，文案叠在图上 */
.cp-soft-list {
  display: grid;
  grid-template-columns: repeat(3, 340px);
  justify-content: center;
  gap: 24px 21px;
  margin: 0 auto;
  padding: 0 20px 40px;
  list-style: none;
}

.cp-soft-item {
  width: 340px;
  height: 226px;
  border-radius: 8px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-sizing: border-box;
}

.cp-soft-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 14px 16px 12px;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.cp-soft-title {
  margin: 0;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  color: #C8CED6;
}

.cp-soft-line {
  display: block;
  width: 140px;
  height: 4px;
  margin: 8px auto 0;
  background: #E10600;
}

.cp-soft-desc {
  margin: auto 0 10px;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 21px;
  color: #C8CED6;
  font-synthesis: none;
}

.cp-soft-more {
  display: inline-block;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1;
  color: #E10600;
  font-synthesis: none;
}

.cp-soft-more::after {
  content: " ↗";
}

.cp-soft-list--cabinet {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin: 0 auto;
  padding: 0 20px 40px;
  list-style: none;
}

.cp-soft-cabinet-item img {
  display: block;
  width: 697px;
  max-width: 100%;
  height: auto;
}

.cp-panel {
  display: none;
}

#cp-cat-v:checked ~ .cp-main .cp-panel[data-category="v"],
#cp-cat-iii:checked ~ .cp-main .cp-panel[data-category="iii"],
#cp-cat-ii:checked ~ .cp-main .cp-panel[data-category="ii"],
#cp-cat-i:checked ~ .cp-main .cp-panel[data-category="i"],
#cp-cat-huawei:checked ~ .cp-main .cp-panel[data-category="huawei"],
#cp-cat-cabinet:checked ~ .cp-main .cp-panel[data-category="cabinet"] {
  display: block;
}

@media (min-width: 993px) {
  .cp-main {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  .cp-products {
    width: 100%;
    max-width: none;
    align-items: stretch;
    justify-content: flex-start;
  }

  .cp-products--5 {
    width: 100%;
    max-width: none;
    gap: 30px;
    align-items: stretch;
  }

  .cp-products--5 .cp-product {
    height: 100%;
    justify-content: flex-start;
    align-items: center;
    min-height: 0;
  }

  .cp-products--5 .cp-product-info {
    flex: 0 0 auto;
    align-self: stretch;
  }

  .cp-products--5 .cp-product-pic .cp-product-head,
  .cp-products--5 .cp-product-pic > h3 {
    min-height: 30px;
    box-sizing: border-box;
  }

  .cp-product {
    height: 100%;
    justify-content: center;
    align-items: center;
    min-height: 0;
  }

  .cp-products {
    min-height: 0;
  }

  /* PC 全局：图片与属性区同宽 206px，在 li 内水平居中（全部分类生效）。 */
  .cp-product-info {
    flex: 0 0 auto;
    width: 100%;
    max-width: 206px;
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 0 10px;
    box-sizing: border-box;
  }

  .cp-product-pic {
    width: 100%;
    max-width: 206px;
    margin-left: auto;
    margin-right: auto;
  }

  .cp-product-pic img {
    width: min(100%, 206px);
    height: auto;
    aspect-ratio: 206 / 155;
    margin-left: auto;
    margin-right: auto;
  }

  .cp-product-body {
    width: 100%;
  }

  /* 系列区 / 型号区分开行，切换系列时型号首行不再上下跳动。 */
  .cp-product-body {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    row-gap: 45px;
    align-content: start;
  }

  .cp-product-series,
  .cp-product-series-block {
    grid-row: 1;
    margin: 0;
  }

  .cp-product-models,
  .cp-product-models-block {
    grid-row: 2;
    margin-top: 0 !important;
  }

  .cp-product-body > .cp-product-models:first-child:last-child {
    grid-row: 2;
  }

  .cp-product-body:has(.cp-product-colors) {
    grid-template-rows: auto auto auto;
    row-gap: 35px;
  }

  .cp-product-colors {
    grid-row: 3;
    margin-top: 0 !important;
  }

  .cp-product-series-block + .cp-product-models,
  .cp-product-series-block + .cp-product-models-block,
  .cp-product-series + .cp-product-models,
  .cp-product-series + .cp-product-colors,
  .cp-product-models + .cp-product-colors {
    margin-top: 0 !important;
  }

  .cp-products--5 .cp-product-body {
    grid-template-rows: 119px auto;
    row-gap: 16px;
  }

  .cp-products--5 .cp-product-series-block {
    height: 119px;
    min-height: 119px;
    box-sizing: border-box;
  }

  .cp-products--5 .cp-product-series-block + .cp-product-models,
  .cp-products--5 .cp-product-series-block + .cp-product-models-block {
    margin-top: 0 !important;
  }

  #cp-cat-v:checked ~ .cp-main .cp-panel[data-category="v"] .cp-product {
    justify-content: flex-start;
  }

  /* V 代：系列两行 19+6+19=44px，型号区 grid 固定起始位置。 */
  #cp-cat-v:checked ~ .cp-main .cp-panel[data-category="v"] .cp-product-body {
    grid-template-rows: 46px auto;
    row-gap: 45px;
  }

  #cp-cat-v:checked ~ .cp-main .cp-panel[data-category="v"] .cp-product-series,
  #cp-cat-v:checked ~ .cp-main .cp-panel[data-category="v"] .cp-product-series-block {
    height: 46px;
    min-height: 46px;
    box-sizing: border-box;
  }

  #cp-cat-ii:checked ~ .cp-main .cp-products--5 {
    justify-content: flex-start;
  }

  /* 产品数量较少：占满产品区宽度并在其中居中（Ⅰ代、Ⅲ代、V代、华为系列、配套机柜）。 */
  #cp-cat-i:checked ~ .cp-main,
  #cp-cat-iii:checked ~ .cp-main,
  #cp-cat-v:checked ~ .cp-main,
  #cp-cat-huawei:checked ~ .cp-main,
  #cp-cat-cabinet:checked ~ .cp-main {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  #cp-cat-i:checked ~ .cp-main .cp-products,
  #cp-cat-iii:checked ~ .cp-main .cp-products,
  #cp-cat-v:checked ~ .cp-main .cp-products,
  #cp-cat-huawei:checked ~ .cp-main .cp-products,
  #cp-cat-cabinet:checked ~ .cp-main .cp-products {
    width: 100%;
    justify-content: center;
  }

  /* Ⅰ代型号横向展开，产品卡加宽以利用两卡之间的可用区域。 */
  #cp-cat-i:checked ~ .cp-main .cp-product {
    width: 330px;
  }

  #cp-cat-i:checked ~ .cp-main .cp-product-models {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  #cp-cat-i:checked ~ .cp-main .cp-product-model + .cp-product-model {
    margin-top: 0;
  }

  #cp-cat-i:checked ~ .cp-main .cp-product-model:not(:first-child) .cp-product-label {
    display: none;
  }

  #cp-cat-i:checked ~ .cp-main .cp-product-model .cp-product-item-btn {
    flex: none;
  }

  /* 配套机柜：系列/型号/颜色行距适中，三行等高对齐。 */
  #cp-cat-cabinet:checked ~ .cp-main .cp-panel[data-category="cabinet"] .cp-product-series,
  #cp-cat-cabinet:checked ~ .cp-main .cp-panel[data-category="cabinet"] .cp-product-model,
  #cp-cat-cabinet:checked ~ .cp-main .cp-panel[data-category="cabinet"] .cp-product-colors {
    display: flex;
    align-items: center;
    min-height: 22px;
  }

  #cp-cat-cabinet:checked ~ .cp-main .cp-panel[data-category="cabinet"] .cp-product-label {
    width: 63px;
    height: 19px;
    line-height: 19px;
  }

  #cp-cat-cabinet:checked ~ .cp-main .cp-product-series + .cp-product-models,
  #cp-cat-cabinet:checked ~ .cp-main .cp-product-models + .cp-product-colors {
    margin-top: 0 !important;
  }

  /* 系列/型号/颜色行距由 grid row-gap 控制。 */
  .cp-product-series-block + .cp-product-models,
  .cp-product-series-block + .cp-product-models-block {
    margin-top: 0 !important;
  }

  .cp-product-colors + .cp-product-colors,
  .cp-product-series + .cp-product-colors,
  .cp-product-series-block + .cp-product-colors,
  .cp-product-models + .cp-product-colors {
    margin-top: 0 !important;
  }

  .cp-product-series + .cp-product-models {
    margin-top: 0 !important;
  }

  .cp-products--5 .cp-product-series-list li + li {
    margin-top: 4px;
  }

  .cp-product-models-block {
    align-items: start;
  }

  .cp-product-models-block > .cp-product-label {
    align-self: start;
  }

  .cp-product-label {
    width: auto;
    min-width: 5em;
    height: auto;
    white-space: nowrap;
  }
}

.cp-product {
  width: 248px;
  min-height: 324px;
  height: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  overflow: visible;
  list-style: none;
}

.cp-product-pic {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.cp-product-pic img {
  display: block;
  width: min(100%, 206px);
  height: auto;
  aspect-ratio: 206 / 155;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
  object-position: center;
}

.cp-product-info {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 10px;
  padding: 0 0 10px;
  box-sizing: border-box;
}

@media (min-width: 993px) {
  .cp-main--wide {
    width: 1361px;
    min-width: 1361px;
  }

  .cp-products--5 {
    width: 100%;
    max-width: none;
    flex-wrap: nowrap;
    gap: 30px;
  }

  .cp-products--5 .cp-product {
    flex: 1 1 0;
    width: auto;
    min-width: 200px;
    max-width: none;
  }

  .cp-product-pic {
    padding-bottom: 0;
  }
}

/* 紧凑 PC：窄屏下产品可压缩，边距仍按 5 列总宽对称计算。 */
@media (min-width: 993px) and (max-width: 1600px) {
  .cp-body {
    --cp-cat-w: 125px;
    --cp-body-gap: clamp(20px, 2vw, 32px);
    --cp-body-edge: 40px;
    gap: var(--cp-body-gap);
    padding-right: var(--cp-body-edge);
    padding-left: var(--cp-body-edge);
    justify-content: flex-start;
  }

  .cp-categories,
  .cp-category {
    width: 125px;
  }

  .cp-main,
  .cp-main--wide {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  #cp-cat-ii:checked ~ .cp-main,
  #cp-cat-i:checked ~ .cp-main,
  #cp-cat-iii:checked ~ .cp-main,
  #cp-cat-v:checked ~ .cp-main,
  #cp-cat-huawei:checked ~ .cp-main,
  #cp-cat-cabinet:checked ~ .cp-main {
    flex: 1 1 auto;
    max-width: none;
  }

  #cp-cat-ii:checked ~ .cp-main .cp-products--5 {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }

  .cp-products,
  .cp-products--5 {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    max-width: none;
    gap: clamp(10px, 1.2vw, 44px);
    justify-content: flex-start;
  }

  .cp-products--5 {
    gap: clamp(8px, 1vw, 24px);
  }

  .cp-products--5 .cp-product {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
  }

  .cp-product {
    width: 248px;
    min-width: 0;
    max-width: 248px;
    flex: 1 1 0;
  }

  .cp-products:not(.cp-products--5) .cp-product {
    flex: 0 0 248px;
    width: 248px;
    min-width: 200px;
    max-width: 248px;
  }

  .cp-product-pic {
    width: 100%;
    max-width: 206px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 0;
  }

  .cp-product-info {
    max-width: 206px;
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
  }

  .cp-product-pic img {
    width: min(100%, 206px);
    height: auto;
    aspect-ratio: 206 / 155;
    margin-left: auto;
    margin-right: auto;
  }

  .cp-product-pic > h3,
  .cp-product-head h3,
  .cp-product-info h3 {
    font-size: clamp(13px, 1.35vw, 16px);
    line-height: 1.35;
    white-space: normal;
  }

  .cp-product-label,
  .cp-product-series,
  .cp-product-item-btn,
  .cp-product-series-btn {
    font-size: clamp(12px, 1.18vw, 14px);
  }

  .cp-product-label,
  .cp-product-series,
  .cp-product-item-btn {
    line-height: 1.45;
  }

  .cp-product-label {
    width: auto;
    min-width: 5em;
    height: auto;
    white-space: nowrap;
  }

  #cp-cat-i:checked ~ .cp-main .cp-products,
  #cp-cat-iii:checked ~ .cp-main .cp-products,
  #cp-cat-v:checked ~ .cp-main .cp-products,
  #cp-cat-huawei:checked ~ .cp-main .cp-products,
  #cp-cat-cabinet:checked ~ .cp-main .cp-products {
    width: 100%;
    justify-content: center;
  }

  #cp-cat-i:checked ~ .cp-main .cp-product {
    width: 330px;
    min-width: 330px;
    max-width: 330px;
  }

  #cp-cat-i:checked ~ .cp-main .cp-product-models {
    flex-wrap: wrap;
  }
}

.cp-product-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 8px;
  min-height: 0;
}

.cp-product-pic .cp-product-head {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  max-width: 100%;
  align-self: center;
  flex-wrap: nowrap;
  margin: 8px 0 0;
}

.cp-product-head h3,
.cp-product-info h3 {
  margin: 0;
  width: auto;
  height: auto;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  color: #333;
  white-space: nowrap;
  text-align: center;
}

.cp-product-badge {
  flex-shrink: 0;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  color: #fff;
  background: #E10600;
  border-radius: 2px;
}

.cp-product-body {
  display: flex;
  flex-direction: column;
}

.cp-product-series-block {
  display: grid;
  grid-template-columns: 5em minmax(0, 1fr);
  align-items: start;
  column-gap: 0;
}

.cp-product-series-block > .cp-product-label {
  grid-column: 1;
  grid-row: 1;
}

.cp-product-series-block > .cp-product-series-list {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.cp-product-series-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-product-series-list li + li {
  margin-top: 6px;
}

/* PC 二代：系列区固定五行高度，型号行跨列对齐。 */
@media (min-width: 993px) {
  .cp-products--5 .cp-product-series-block {
    height: 119px;
    min-height: 119px;
  }
}

.cp-product-series-btn {
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 19px;
  color: #8F8F8F;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font-synthesis: none;
  text-decoration: none;
}

.cp-product-series-btn.is-active {
  color: #E10600;
  text-decoration: none;
}

.cp-products--5 .cp-product-series-block + .cp-product-models,
.cp-products--5 .cp-product-series-block + .cp-product-models-block {
  margin-top: 0;
}

.cp-product-models-block {
  display: grid;
  grid-template-columns: 5em minmax(0, 1fr);
  align-items: start;
  column-gap: 0;
}

.cp-product-models-block > .cp-product-label {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}

.cp-product-models-block > .cp-product-model-rows {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.cp-product-model-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.cp-product-model-row {
  display: none;
}

.cp-product-model-row.is-active {
  display: flex;
  align-items: flex-start;
  margin-top: 0;
}

.cp-product-model-row + .cp-product-model-row {
  margin-top: 0;
}

.cp-products--5 .cp-product-model {
  display: flex;
  align-items: center;
}

.cp-products--5 .cp-product-model + .cp-product-model {
  margin-top: 6px;
}

.cp-product-model-items {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px 10px;
  min-width: 0;
}

.cp-product-model-items .cp-product-item-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.cp-product-pic > h3 {
  margin: 8px 0 0;
  width: 100%;
  height: auto;
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
  color: #333;
  white-space: nowrap;
  text-align: center;
}

.cp-product-colors {
  display: flex;
  align-items: center;
  margin: 0;
}

.cp-product-color-list {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-product-color-btn {
  width: 34px;
  height: 20px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: none;
  cursor: pointer;
}

.cp-product-color-btn.is-active {
  border-color: #E10600;
}

.cp-product-color-btn span {
  display: block;
  width: 30px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.cp-product-color-btn[data-color="lan"] span {
  background: #50F4EA;
}

.cp-product-color-btn[data-color="zong"] span {
  background: #D4C2A6;
}

.cp-product-color-btn[data-color="hei"] span {
  background: #3C3830;
}

.cp-product-color-btn[data-color="bai"] span {
  background: #FFFFFF;
}

.cp-product-series {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 14px;
  line-height: 19px;
}

.cp-product-series .cp-product-label {
  flex: 0 0 5em;
  width: 5em;
  min-width: 5em;
  box-sizing: border-box;
}

.cp-product-label {
  flex-shrink: 0;
  font-size: 14px;
  line-height: 19px;
  color: #000;
  white-space: nowrap;
}

.cp-product-series em {
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-style: normal;
  line-height: 19px;
  color: #E10600;
  text-decoration: none;
  font-synthesis: none;
}

.cp-product-item-btn {
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 19px;
  color: #8F8F8F;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font-synthesis: none;
}

.cp-product-model .cp-product-item-btn {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}

.cp-product-model {
  display: flex;
  align-items: center;
  margin: 0;
}

.cp-product-model .cp-product-label {
  flex: 0 0 5em;
  width: 5em;
  min-width: 5em;
  box-sizing: border-box;
}

.cp-product-item-btn:hover {
  color: #E10600;
}

.cp-product-models {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-product-model + .cp-product-model {
  margin-top: 6px;
}

.cp-products--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 324px;
}

.cp-empty {
  margin: 0;
  padding: 0;
  font-size: 16px;
  color: #999;
  text-align: center;
}

@media (min-width: 993px) and (max-height: 900px) {
  .cp-modal.is-open {
    padding: 56px 16px 16px;
  }

  .cp-modal-gallery {
    width: min(460px, 36vw);
  }

  .cp-modal-main {
    height: min(280px, calc(100vh - 340px));
  }

  .cp-modal-detail {
    height: min(520px, calc(100vh - 112px));
    max-height: calc(100vh - 112px);
  }

  .cp-modal-title {
    font-size: 24px;
    line-height: 1.1;
  }

  .cp-modal-subtitle {
    font-size: 16px;
    line-height: 1.3;
  }

  .cp-modal-spec-col li {
    font-size: 13px;
    line-height: 20px;
  }
}

@media (min-width: 993px) and (max-height: 980px) {
  .cp-categories {
    gap: 10px;
  }

  .cp-category {
    height: 40px;
  }

  #cp-cat-v:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-v"],
  #cp-cat-iii:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-iii"],
  #cp-cat-ii:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-ii"],
  #cp-cat-i:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-i"],
  #cp-cat-huawei:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-huawei"],
  #cp-cat-cabinet:checked ~ .cp-categories-wrap .cp-category[for="cp-cat-cabinet"] {
    padding: 10px 0 5px;
  }
}

@media (min-width: 993px) and (max-width: 1400px) {
  .cp-body {
    --cp-body-gap: clamp(20px, 2vw, 32px);
    --cp-body-edge: 40px;
    gap: var(--cp-body-gap);
    padding-right: var(--cp-body-edge);
    padding-left: var(--cp-body-edge);
  }
}



.cp-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
}

.cp-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 40px;
  overflow-y: auto;
  box-sizing: border-box;
}

.cp-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.cp-modal-box {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: fit-content;
  max-width: calc(100% - 40px);
  min-height: 0;
  height: auto;
  max-height: calc(100vh - 140px);
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-sizing: border-box;
  overflow: visible;
  box-shadow: none;
}

.cp-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  flex-shrink: 0;
}

.cp-modal-close::before,
.cp-modal-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

.cp-modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.cp-modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.cp-modal-close:hover {
  background: rgba(0, 0, 0, 0.6);
}

.cp-modal-panel {
  display: none;
  width: fit-content;
  max-width: 100%;
}

.cp-modal.is-open .cp-modal-panel.active {
  display: block;
  width: fit-content;
  max-width: 100%;
}

/* 软件平台模式：强制关闭硬件弹窗，避免机柜 kt 参数图残留覆盖 */
body.page-products:has(.products-main[data-cp-type="software"]) #cp-product-modal {
  display: none !important;
}

body.page-products:has(.products-main[data-cp-type="software"]).is-modal-open {
  overflow: auto;
  padding-right: 0 !important;
}

body.page-products:has(.products-main[data-cp-type="software"]).is-modal-open .header {
  padding-right: 0 !important;
}

.cp-modal-body {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 30px;
  width: fit-content;
  max-width: 100%;
}

.cp-modal-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 568px;
  height: auto;
  flex-shrink: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
}

.cp-modal-main {
  position: relative;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 360px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

.cp-modal-main-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cp-modal-arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  transform: translateY(-50%);
  cursor: pointer;
}

.cp-modal-prev {
  left: 8px;
}

.cp-modal-next {
  right: 8px;
}

.cp-modal-arrow img {
  width: 32px;
  height: 32px;
}

.cp-modal-thumbs {
  display: flex;
  flex-shrink: 0;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-modal-thumb button {
  width: 72px;
  height: 72px;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  box-sizing: border-box;
}

.cp-modal-thumb.active button {
  border-color: #E10600;
}

.cp-modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cp-modal-detail {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  width: auto;
  min-width: 540px;
  max-width: 847px;
  min-height: 0;
  height: min(500px, calc(100vh - 160px));
  max-height: calc(100vh - 160px);
  padding: 18px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
  overflow: hidden;
}

/* PC 硬件产品弹窗右侧规格区统一尺寸，避免切换产品时跳动。 */
@media (min-width: 993px) {
  .cp-modal.is-open {
    padding: clamp(64px, 7vh, 96px) 20px clamp(20px, 2.5vh, 32px);
  }

  .cp-modal-gallery {
    width: min(568px, 38vw);
  }

  .cp-modal-main {
    height: min(360px, calc(100vh - 300px));
  }

  .cp-modal-detail {
    flex: 0 0 min(740px, calc(100vw - 620px));
    width: min(740px, calc(100vw - 620px));
    min-width: min(540px, 42vw);
    max-width: min(740px, calc(100vw - 620px));
    height: min(610px, calc(100vh - 128px));
    max-height: calc(100vh - 128px);
  }

  /* 所有规格先合并为一个列表：左列满 15 项后才创建右列。 */
  body.page-products .cp-modal-specs {
    flex: 1 1 auto;
    display: flex;
    height: auto;
    gap: 32px;
  }

  body.page-products .cp-modal-specs > .cp-modal-spec-col {
    flex: 1;
    min-width: 0;
    height: auto;
    column-count: 1;
  }

  body.page-products .cp-modal-specs.cp-modal-specs--single {
    display: block;
  }
}

.cp-modal-specs {
  flex: 1;
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: row;
  gap: 32px;
  align-items: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
}

.cp-modal-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
}

.cp-modal-title {
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 32px;
  font-weight: 700;
  line-height: 32px;
  color: #08111F;
}

.cp-modal-subtitle {
  flex-shrink: 0;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 27px;
  color: #8F8F8F;
}

.cp-modal-line {
  display: block;
  height: 2px;
  margin: 16px 0 20px;
  background: #333;
}

/* 机柜弹窗属性组（机柜/空调）胶囊切换 */
.cp-modal-group-tabs {
  display: flex;
  align-items: center;
  width: 170px;
  height: 30px;
  margin: 0 auto 20px;
  gap: 1px;
  background: #C8CED6;
  border-radius: 20px;
}

.cp-modal-group-tab {
  flex: 1;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 26px;
  color: #8F8F8F;
  cursor: pointer;
  white-space: nowrap;
}

.cp-modal-group-tab.is-active {
  background: #E10600;
  color: #fff;
}

.cp-modal-group {
  display: none;
}

.cp-modal-group.is-active {
  display: block;
}

.cp-modal-group-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.cp-modal-spec-col {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding-left: 20px;
  list-style: disc;
  list-style-position: outside;
  height: auto;
}

/* 单个 ul：参数先纵向排满左列，再流入右列；两列行高互不影响 */
.cp-modal-specs > .cp-modal-spec-col:only-child {
  display: block;
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
  column-count: 2;
  column-gap: 32px;
  column-fill: balance;
}

/* 两个 ul：左右各一列 */
.cp-modal-specs > .cp-modal-spec-col:not(:only-child) {
  column-count: 1;
}

.cp-modal-spec-col li {
  break-inside: avoid;
  margin: 0 6px 6px 0;
  padding-right: 4px;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  overflow-wrap: anywhere;
  color: #000;
}

/* 空调参数较多，列高略加高，保证两列能装下、不挤出第三列 */
.cp-modal-spec-col--tall:only-child {
  column-count: 2;
}

.cp-modal-mode {
  display: none;
}

/* 紧凑 PC 的详情弹窗按可用宽度收缩，避免固定图库与规格区溢出视口。 */
@media (min-width: 993px) and (max-width: 1380px) {
  .cp-modal.is-open {
    padding: 84px 24px 24px;
  }

  .cp-modal-body {
    width: calc(100vw - 48px);
    gap: 20px;
  }

  .cp-modal-gallery {
    width: 38%;
    min-width: 0;
  }

  .cp-modal-main {
    width: 100%;
    height: min(320px, calc(100vh - 320px));
    aspect-ratio: 49 / 30;
  }

  .cp-modal-detail {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
    height: min(560px, calc(100vh - 120px));
    max-height: calc(100vh - 120px);
  }

  .cp-modal-title {
    font-size: clamp(22px, 2.5vw, 32px);
    line-height: 1.1;
  }

  .cp-modal-subtitle {
    font-size: clamp(15px, 1.7vw, 20px);
    line-height: 1.3;
  }

  .cp-modal-spec-col li {
    font-size: 14px;
    line-height: 21px;
  }
}
