/* catalog.css - the Catalog pages' card (session 92, Chapter Seven part 4).
 *
 * Bill: "a different, larger card" for a toy category or a story type -
 * mocked over the live Timeline page (mockups/catalog/) and agreed at the
 * Large size, two across. Its picture sits on a light ground, whole, never
 * cropped; under it a dark body below an orange rule.
 *
 * Every rule here is .hb-cat-* (grepped across the templates and stylesheets
 * before it was written). The sparkline's bars and the empty line are
 * cards.css's (.hb-spark, .hb-empty), which these pages load first; the
 * card sets --accent for the bars.
 */

.hb-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 6px 0 30px;
}

.hb-cat-card {
  --accent: #F7722D;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #1c1e22;
  border-radius: 10px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
a.hb-cat-card:hover,
a.hb-cat-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .5);
  color: #fff;
  text-decoration: none;
}

.hb-cat-pic {
  background: #f3f2ef;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hb-cat-pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform .25s ease;
}
a.hb-cat-card:hover .hb-cat-pic img { transform: scale(1.04); }
.hb-cat-none {
  color: #999;
  font: 14px/1 'Oswald', sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hb-cat-body {
  padding: 14px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 4px solid var(--accent);
}
.hb-cat-kicker {
  font: 12px/1 'Oswald', sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.hb-cat-name {
  font: 400 28px/1.1 'Oswald', sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0;
  color: #fff;
}
.hb-cat-facts {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: #cfd2d6;
}
.hb-cat-facts b { color: #fff; font-weight: 600; }
.hb-cat-spark { height: 30px; margin-top: 4px; }
.hb-cat-latest {
  font-size: 12px;
  color: #8b9096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* A phone: one across. */
@media (max-width: 575px) {
  .hb-cat-grid { grid-template-columns: minmax(0, 1fr); }
}
