/* =================== hc-cat-sm.css =================== */
/* Home category cards: framed media panel (fixed ratio, contained image) +
 * body (count + name). Framed media gives every tile an identical image frame
 * regardless of the source thumbnail's aspect/whitespace — no more "dancing". */

.hc-cat-sm {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(139, 115, 85, 0.18);
  border-radius: 16px;
  background: #fff;
  text-decoration: none;
  color: #1a1714;
  box-shadow: 0 8px 24px -20px rgba(24, 18, 12, 0.5);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.hc-cat-sm:hover,
.hc-cat-sm:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(185, 154, 111, 0.5);
  box-shadow: 0 22px 40px -26px rgba(24, 18, 12, 0.6);
}

.hc-cat-sm__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 18%, rgba(196, 158, 103, 0.14), transparent 42%),
    linear-gradient(160deg, #fbf6ec 0%, #ece0cc 100%);
  border-bottom: 1px solid rgba(139, 115, 85, 0.12);
}

.hc-cat-sm__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: clamp(4px, 0.7vw, 12px);
  transform: scale(1.08);
  transition: transform 0.5s ease;
}

.hc-cat-sm:hover .hc-cat-sm__media img,
.hc-cat-sm:focus-visible .hc-cat-sm__media img {
  transform: scale(1.12);
}

.hc-cat-sm__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  padding: 14px 16px 16px;
}

.hc-cat-sm__count {
  font-family: var(--hc-mono, "JetBrains Mono", monospace);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(94, 75, 48, 0.72);
}

.hc-cat-sm__title {
  margin: 0;
  font-family: var(--hc-serif, "Playfair Display", Georgia, serif);
  font-size: clamp(17px, 1.25vw, 22px);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: 0;
  color: #1a1714;
  text-wrap: balance;
}

@media (max-width: 1024px) {
  .hc-cat-sm__title {
    font-size: clamp(16px, 4vw, 20px);
  }
}

/* Home category tiles now render the rich category_scene SVG (same as catalog),
   filling the 4/3 media panel with a subtle hover lift. */
.hc-cat-sm__media .hc-cat-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1.02);
  transition: transform 0.5s ease;
}
.hc-cat-sm:hover .hc-cat-sm__media .hc-cat-scene,
.hc-cat-sm:focus-visible .hc-cat-sm__media .hc-cat-scene {
  transform: scale(1.05);
}
