/**
 * 软件卡片 — 固定版式（标题/描述/标签/底栏位置不随文案长短变化）
 */
.is-home .software-card,
.bm-page .software-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.is-home .software-image,
.bm-page .software-image {
  flex: 0 0 auto;
  aspect-ratio: 4 / 3;
  max-height: 160px;
  min-height: 0;
}

.is-home .software-content,
.bm-page .software-content {
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: 2.75em 2.75em 1.625rem 2.125rem;
  align-content: start;
  gap: 0;
  padding: 0.85rem 1rem 1rem;
  min-height: 9.25rem;
}

.is-home .software-title,
.bm-page .software-title {
  margin: 0;
  padding: 0;
  min-height: 2.75em;
  max-height: 2.75em;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.is-home .software-description,
.bm-page .software-description {
  margin: 0;
  padding: 0;
  min-height: 2.75em;
  max-height: 2.75em;
  line-height: 1.35;
  flex-grow: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.is-home .software-pills,
.bm-page .software-pills {
  margin: 0;
  padding: 0;
  min-height: 1.625rem;
  max-height: 1.625rem;
  overflow: hidden;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
}

.is-home .software-pills:empty,
.bm-page .software-pills:empty {
  visibility: hidden;
}

/* 栅格列内卡片等高 */
.is-home #featured-software > .col,
.bm-page .row[class*="row-cols"] > .col {
  display: flex;
}

.is-home #featured-software .software-card,
.bm-page .row[class*="row-cols"] > .col > .software-card {
  width: 100%;
}

.is-home .software-pills .bm-pill,
.bm-page .software-pills .bm-pill {
  flex-shrink: 0;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-home .software-meta,
.bm-page .software-meta {
  margin: 0;
  padding: 0;
  min-height: 2.125rem;
  max-height: 2.125rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  align-self: end;
}

.is-home .software-version,
.bm-page .software-meta > span:first-child {
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-home .download-btn,
.bm-page .software-meta .download-btn {
  flex-shrink: 0;
}

/* 角标固定于图片区，不随正文挤压 */
.is-home .software-image .bm-card-badge,
.is-home .software-image .bm-card-platform,
.is-home .software-image .featured-badge,
.bm-page .software-image .bm-card-badge,
.bm-page .software-image .bm-card-platform,
.bm-page .software-image .featured-badge {
  position: absolute;
  z-index: 2;
}

.is-home .software-image .bm-card-badge,
.bm-page .software-image .bm-card-badge,
.bm-page .software-image .featured-badge {
  top: 0.5rem;
  left: 0.5rem;
  right: auto;
}

.is-home .software-image .bm-card-platform,
.bm-page .software-image .bm-card-platform {
  top: 0.5rem;
  right: 0.5rem;
  left: auto;
  max-width: 42%;
}
