.oem-products-enhanced {
  box-sizing: border-box;
  width: 100%;
  color: #172033;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
}

.oem-products-enhanced *,
.oem-products-enhanced *::before,
.oem-products-enhanced *::after {
  box-sizing: border-box;
}

/*
 * server/reserver 的原始列表都包在 main-card 中，而盒子云使用的是
 * “页面标题 + 两块独立白色面板”。这里仅调整公共增强后的产品页层级，
 * 不影响其它 main-card 页面。
 */
.oem-products-enhanced > .main-card {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.oem-products-enhanced > .main-card > .main-card-title {
  display: block;
  width: 100%;
  height: 22px;
  margin: 0 0 20px;
  padding: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

.oem-products-enhanced > .main-card > .main-card-title::before,
.oem-products-enhanced > .main-card > .main-card-title .title-text::before {
  display: none;
  content: none;
}

.oem-products-enhanced > .main-card > .main-card-title .title-text {
  padding: 0;
  color: inherit;
  font: inherit;
}

.oem-products-enhanced > .main-card > .main-card-table {
  min-height: 226px;
  margin: 24px 0 0;
  padding: 16px;
  background: #fff;
  border: 1px solid #ebeef2;
}

/*
 * oem_next 的公共组件样式使用完整页面壳选择器，优先级高于服务器模块
 * 动态注入后的短选择器。这里补一层只作用于产品内容根节点的桥接规则，
 * 保证 Linux/CDN 部署环境与本地页面得到相同的标题和字号。
 */
html[data-clientarea-theme="oem_next"] .product .config-box .content > .oem-products-enhanced > .main-card {
  padding: 0;
  color: #172033;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.5;
}

html[data-clientarea-theme="oem_next"] .product .config-box .content > .oem-products-enhanced > .main-card > .main-card-title {
  display: block;
  width: 100%;
  min-height: 22px;
  margin: 0 0 20px;
  padding: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}

html[data-clientarea-theme="oem_next"] .product .config-box .content > .oem-products-enhanced > .main-card > .main-card-title::before,
html[data-clientarea-theme="oem_next"] .product .config-box .content > .oem-products-enhanced > .main-card > .main-card-title .title-text::before {
  display: none;
  content: none;
}

html[data-clientarea-theme="oem_next"] .product .config-box .content > .oem-products-enhanced > .main-card > .main-card-title .title-text {
  min-height: 0;
  padding: 0;
  color: inherit;
  font: inherit;
}

html[data-clientarea-theme="oem_next"] .product .config-box .content > .oem-products-enhanced > .main-card > .main-card-table {
  min-height: 226px;
  margin: 24px 0 0;
  padding: 16px;
  background: #fff;
  border: 1px solid #ebeef2;
}

.oem-product-summary {
  min-height: 207px;
  margin: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid #ebeef2;
}

.oem-product-section-title {
  position: relative;
  height: 20px;
  margin-bottom: 15px;
  padding-left: 9px;
  color: #172033;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.oem-product-section-title::before {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 0;
  width: 3px;
  background: var(--color-primary, #2563eb);
  content: "";
}

.oem-product-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.oem-product-summary-grid > button {
  display: flex;
  min-width: 0;
  height: 86px;
  padding: 16px 20px 14px;
  align-items: flex-start;
  flex-direction: column;
  color: inherit;
  text-align: left;
  background: #fff;
  border: 1px solid #e7ebf0;
  border-radius: 0;
  cursor: pointer;
  outline: none;
}

.oem-product-summary-grid > button:hover {
  border-color: #a9c2ff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, .06);
}

.oem-product-summary-grid span {
  overflow: hidden;
  max-width: 100%;
  color: #8793a8;
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oem-product-summary-grid strong {
  margin-top: 6px;
  color: #050b16;
  font-size: 24px;
  font-weight: 600;
  line-height: 30px;
}

.oem-product-summary-actions {
  display: flex;
  height: 32px;
  margin-top: 17px;
  align-items: center;
  gap: 8px;
}

.oem-product-summary-actions button {
  height: 31px;
  padding: 0 13px;
  color: #4b5870;
  background: #fff;
  border: 1px solid #dce2ea;
  border-radius: 0;
  cursor: pointer;
  font-size: 13px;
}

.oem-product-summary-actions button.primary {
  color: #fff;
  background: var(--color-primary, #2563eb);
  border-color: var(--color-primary, #2563eb);
}

.oem-product-view-toolbar {
  display: flex;
  min-height: 33px;
  margin: 0 0 16px;
  align-items: center;
  justify-content: space-between;
}

.oem-product-view-actions,
.oem-view-switch {
  display: flex;
  height: 33px;
  align-items: center;
}

.oem-selected-count {
  display: flex;
  min-width: 101px;
  height: 33px;
  padding: 0 12px;
  align-items: center;
  justify-content: space-between;
  color: #3c4658;
  background: #fff;
  border: 1px solid #dce2ea;
  font-size: 12px;
}

.oem-view-switch {
  margin-left: 8px;
}

.oem-view-switch button {
  width: 55px;
  height: 33px;
  padding: 0;
  color: var(--color-primary, #2563eb);
  background: #fff;
  border: 1px solid var(--color-primary, #2563eb);
  border-radius: 0;
  cursor: pointer;
  font-size: 13px;
}

.oem-view-switch button + button {
  margin-left: -1px;
}

.oem-view-switch button.active {
  position: relative;
  z-index: 1;
  color: #fff;
  background: var(--color-primary, #2563eb);
}

.oem-product-card-mode .table {
  display: none !important;
}

.oem-product-card-grid {
  display: grid;
  min-height: 334px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 312px));
  gap: 16px;
}

.oem-product-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 326px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce2e9;
}

.oem-product-card > header {
  display: flex;
  height: 68px;
  padding: 14px 16px;
  align-items: flex-start;
  background: #f1f2f4;
  border-bottom: 1px solid #dce2e9;
}

.oem-card-check {
  position: relative;
  width: 16px;
  height: 20px;
  margin: 1px 10px 0 0;
  flex: 0 0 16px;
}

.oem-card-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.oem-card-check span {
  display: block;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 1px solid #cfd6e2;
}

.oem-card-check input:checked + span {
  background: var(--color-primary, #2563eb);
  border-color: var(--color-primary, #2563eb);
  box-shadow: inset 0 0 0 3px #fff;
}

.oem-card-name {
  display: flex;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  flex: 1;
  flex-direction: column;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  gap: 3px;
}

.oem-card-name strong,
.oem-card-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oem-card-name strong {
  color: #25364e;
  font-size: 14px;
  line-height: 20px;
}

.oem-card-name small {
  color: #8290a7;
  font-size: 11px;
  line-height: 16px;
}

.oem-card-more {
  width: 28px;
  height: 20px;
  margin: 0 -5px 0 8px;
  padding: 0;
  color: #8290a7;
  letter-spacing: 1px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.oem-product-card-body {
  flex: 1;
  min-height: 204px;
  padding: 11px 16px;
}

.oem-product-card-body p {
  display: flex;
  height: 30px;
  margin: 0;
  align-items: center;
  justify-content: space-between;
  color: #080d17;
  font-size: 12px;
}

.oem-product-card-body p > span {
  width: 72px;
  flex: 0 0 72px;
  color: #7888a2;
}

.oem-product-card-body p > b {
  overflow: hidden;
  min-width: 0;
  flex: 1;
  font-weight: 400;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oem-product-card > footer {
  display: flex;
  height: 53px;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #dce2e9;
}

.oem-product-card-body .oem-card-system {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.oem-card-system img {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  object-fit: contain;
}

.oem-card-system > span {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oem-card-status {
  display: inline-flex;
  min-width: 54px;
  height: 24px;
  padding: 0 9px;
  align-items: center;
  justify-content: center;
  color: #f56c6c;
  background: #fef0f0;
  font-size: 12px;
  line-height: 24px;
}

.oem-card-console {
  height: 31px;
  padding: 0 14px;
  color: #fff;
  background: var(--color-primary, #2563eb);
  border: 1px solid var(--color-primary, #2563eb);
  border-radius: 0;
  cursor: pointer;
  font-size: 12px;
}

.oem-product-empty {
  padding: 70px 0;
  grid-column: 1 / -1;
  color: #8c98ab;
  font-size: 12px;
  text-align: center;
}

@media screen and (max-width: 1280px) {
  .oem-product-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .oem-product-summary {
    min-height: 305px;
  }
}

@media screen and (max-width: 900px) {
  .oem-product-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .oem-product-summary {
    min-height: 403px;
  }

  .oem-product-view-toolbar {
    align-items: flex-end;
    flex-direction: column;
  }
}
