/* Anahata v2 — collection pages (products in a collection, and the collections list).
   Shares the page header pattern with cart/search and the cards with the homepage. */

.collection-grid__inner {
  padding-inline: var(--a-gutter);
}

.collection-grid__head {
  display: flex;
  align-items: center;
  gap: var(--a-space-3);
  margin-bottom: var(--a-space-4);
}

.collection-grid__back {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: calc(var(--a-space-3) * -1);
  border-radius: var(--a-radius-round);
  color: var(--a-ink);
  text-decoration: none;
}

.collection-grid__back:focus-visible {
  outline: 2px solid var(--a-ink-pure);
  outline-offset: 2px;
}

.collection-grid__heading {
  margin: 0;
  font-family: var(--a-font-display);
  font-size: var(--a-fs-display-m);
  line-height: var(--a-lh-display-m);
  color: var(--a-ink);
  text-transform: uppercase;
}

.collection-grid__count {
  color: var(--a-text-muted);
}

.collection-grid__description,
.collection-index__subtext {
  margin: 0 0 var(--a-space-5);
  font-family: var(--a-font-body);
  font-size: var(--a-fs-body-s);
  line-height: var(--a-lh-body-relaxed);
  color: var(--a-text-muted);
}

/* two per row — the same card as "Recommended For You" */
.collection-grid__grid,
.collection-index__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--a-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.collection-grid__empty {
  margin: var(--a-space-5) 0;
  font-family: var(--a-font-body);
  font-size: var(--a-fs-body);
  color: var(--a-text-muted);
  text-align: center;
}

@media screen and (min-width: 750px) {
  .collection-grid__grid,
  .collection-index__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
