/* The shelf's presets, arranged (`ShelfSections`, the correction pass, 9 Oct 2026): a family's
   heading in the mono label, each product's name quiet over its cards, and the cards on a grid, each
   a picture, a name, whose it is and one button. The shelf's page and the sheet an item opens draw
   the same thing, so the rules are here and neither page repeats them. */
.shelf-family + .shelf-family {
  margin-top: var(--space-6);
}

.shelf-family > h3 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-control-small);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.shelf-product {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin: var(--space-3) 0 var(--space-2);
  color: var(--color-muted);
  font-size: var(--text-control-small);
  font-weight: var(--weight-regular);
}

.shelf-cards {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
}

.shelf-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
  padding: var(--space-2);
  border: var(--hairline) solid var(--color-ink);
  border-radius: var(--radius-drawn);
}

.shelf-picture {
  display: block;
  width: 100%;
  aspect-ratio: var(--card-picture-ratio);
  object-fit: contain;
}

.shelf-picture-none {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: var(--text-label);
}

.shelf-name {
  overflow: hidden;
  font-weight: var(--weight-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shelf-whose {
  color: var(--color-muted);
  font-size: var(--text-label);
}
