/* =========================================================
   首页 · home.css
   卡片尺寸严格对齐 jd/meituan/taobao 三页统一规格
   色调：品牌黄 #ffd100
   ========================================================= */

/* ---------- 主容器 ---------- */
.hm-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 24px;
}

/* ---------- 首页文章分类 ---------- */
.hm-quickbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
  padding: 0;
  border-bottom: 1px solid #ececec;
  background: #fff;
}
.hm-quickbar__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 46px;
  padding: 2px 0 0;
  text-decoration: none;
  color: #777;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.hm-quickbar__item:active {
  color: #222;
}
.hm-quickbar__item.is-active {
  color: #171717;
  font-weight: 700;
}
.hm-quickbar__item.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: #ffd100;
  transform: translateX(-50%);
}
.hm-quickbar__item:focus-visible {
  outline: 2px solid #d6aa00;
  outline-offset: -4px;
}

/* ---------- 板块标题（对齐 jd/mt/tb） ---------- */
.hm-section-title {
  margin: 18px 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  color: #1e1e2d;
}
.hm-section-title__bar {
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: #ffd100;
}

.hm-category-panel[hidden] {
  display: none;
}

/* ---------- 文章宫格（双列，与三页统一） ---------- */
.hm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 8px;
  padding-top: 12px;
}

/* ---------- 文章卡片（对齐 .jd-card / .mt-card） ---------- */
.hm-card {
  min-width: 0;
  height: 181.22px;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.hm-card:active {
  transform: scale(0.98);
}

/* 封面区域：与 jd-card__cover 一致 166:93 */
.hm-card__cover {
  width: 100%;
  aspect-ratio: 166 / 93;
  flex: 0 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f7;
}
.hm-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 卡片正文（对齐 .jd-card__body） */
.hm-card__body {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
}
.hm-card__title {
  font-size: 12px;
  font-weight: 700;
  color: #1e1e2d;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hm-card__desc {
  min-height: 27px;
  font-size: 10px;
  font-weight: 400;
  color: #64647d;
  line-height: 1.35;
  margin-top: 3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.hm-card__meta {
  min-height: 15px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.hm-card__tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  line-height: 12.6px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #ffd100;
  color: #342700;
}
.hm-card__tag--sub {
  background: #fff2c2;
  color: #8a6200;
}

/* ---------- 底部联系入口（保留原有） ---------- */
.home-shell-main {
  display: block;
  padding: 0 0 18px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 520px) {
  .hm-page { padding: 0 16px 24px; }
}
