/* ==========================================================================
   CPU 信息卡（商品分组自定义字段 cpu，一行一个，自动解析）
   结构与参考站一致：左侧简称方块 + 右侧型号/标签/说明
   ========================================================================== */

.cpu-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 一行一个 CPU 的卡片 */
.cpu-card__body {
  padding: 8px;
  background: #f7f8fa;
  border: 1px solid #d4d6d9;
  border-radius: 4px;   /* 和选购页提示条（tips）保持同一档圆角 */
}

.cpu-card__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* 左侧简称方块：固定 36px，窄屏放大一点 */
.cpu-card__identity {
  display: flex;
  flex: 0 0 36px;
  flex-direction: column;
  align-items: center;
  min-width: 36px;
}
.cpu-card__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  /* 字号由 ui.js 按实际宽度自适应；这两行只是极端长名字的兜底，不让它顶出方框 */
  overflow: hidden;
  white-space: nowrap;
  flex: 0 0 36px;
  /* 没指定颜色时用站点品牌蓝；只有自定义 CPU 才会带自己的颜色 */
  background: var(--brand, #2f5ef3);
  color: #fff;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}
/* 窄屏才显示的频率小标签（桌面端频率已经跟在型号后面） */
.cpu-card__mobile-freq {
  display: none;
  margin-top: 4px;
  padding: 2px 5px;
  background: #e54545;
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

/* 右侧详情 */
.cpu-card__details {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.cpu-card__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  line-height: 1.5;
}
.cpu-card__name {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  font-weight: 700;
  color: #202d40;
}
.cpu-card__tags {
  display: inline-flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 3px;
  min-width: 0;
}
.cpu-card__tag {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.6;
  white-space: nowrap;
}
/* 频率：红底 */
.cpu-card__tag--freq { background: #e54545; color: #fff; }
/* 跑分：蓝底 */
.cpu-card__tag--score { background: #206bc4; color: #fff; }
/* SSD：深灰底 */
.cpu-card__tag--ssd { background: #4b5563; color: #fff; }

.cpu-card__desc {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: #667085;
  overflow-wrap: anywhere;
}

/* 窄屏：隐藏行内频率、放大简称方块、显示方块下方的频率小标签 */
@media (max-width: 768px) {
  .cpu-card__name { max-width: min(100%, 68vw); }
  .cpu-card__identity { flex-basis: 52px; min-width: 52px; }
  .cpu-card__tag--freq { display: none !important; }
  .cpu-card__mobile-freq { display: inline-flex; }
}
