/* ============================================================
   CATEGORY — product index
   Editorial catalogue grid on the shared "Printed Matter" system.
   ============================================================ */

.category-page {
  width: calc(100% - (var(--gutter) * 2));
  max-width: var(--shell);
  margin-inline: auto;
  padding-block: clamp(44px, 6vw, 84px) var(--sp-section);
}

/* ── Header ───────────────────────────────────────────────── */
.category-header {
  padding-bottom: clamp(26px, 3.5vw, 44px);
  margin-bottom: clamp(30px, 4vw, 52px);
  border-bottom: 1px solid var(--rule);
}
.category-header h2 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.category-header p {
  margin: 0;
  max-width: 54ch;
  color: var(--ink-muted);
  font-size: 1.02rem;
}

/* ── Grid ─────────────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 560px)  { .products-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
@media (min-width: 940px)  { .products-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
@media (min-width: 1280px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }

/* ── Card ─────────────────────────────────────────────────── */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--red) 40%, transparent);
  box-shadow: var(--shadow-lg);
}

.product-card-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper-sunk);
}
.product-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.product-card:hover .product-card-thumb img { transform: scale(1.06); }

/* Thin red rule that sweeps in under the image on hover */
.product-card-thumb::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.product-card:hover .product-card-thumb::after { transform: scaleX(1); }

.product-inform {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 20px;
  flex: 1;
}
.product-inform h3 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.product-inform p {
  margin: 0;
  font-size: .86rem;
  line-height: 1.55;
  color: var(--ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.price-product {
  margin-top: auto !important;
  padding-top: 12px;
  font-family: var(--font-display) !important;
  font-size: 1.18rem !important;
  font-weight: 600;
  color: var(--ink) !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
}

/* ── Empty state ──────────────────────────────────────────── */
.products-grid:empty::after {
  content: "Nothing here yet — check back soon.";
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
