/* The catalogue's category tiles: the shop's category pages and the site-wide live search draw the same component. */

/* The tiles are the cards, as in the product grid: no white box around them, so a row the count leaves
   short ends on the page's grey instead of an empty white cell. Hairlines are each tile's own shadow cast
   into the 1px gap; the gap must stay, or a neighbour's opaque background covers the line. */
.fw-cat__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 1px;
  padding: 1px;
}

.fw-cat__tile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  background: #fff;
  /* A hairline all round, as the product tiles: neighbours' lines meet in the 1px gap, the outer edges get theirs too. */
  box-shadow: 0 0 0 1px var(--fw-line, #e4e4e4);
  color: #111;
  text-decoration: none;
}

.fw-cat__tile:hover { background: #fafafa; }

.fw-cat__name { font-weight: 500; }

.fw-cat__count {
  color: var(--fw-muted, #6b6b6b);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.fw-cat__img {
  flex: 0 0 4.5rem;
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
}

.fw-cat__img--none {
  display: block;
}

.fw-cat__label {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.fw-cat__name {
  line-height: 1.35;
}

/* An article's or page's tile: its title in plain weight, unlike a category's name. */
.fw-cat__tile--plain .fw-cat__name { font-weight: 300; }
