/* Anahata v2 — category circles. Figma: "Shop by Category" + Highlights set. */

.category-circles__head {
  margin-bottom: var(--a-space-4);
}

.category-circles__heading {
  margin: 0;
  font-family: var(--a-font-body);
  font-weight: 600;
  font-size: var(--a-fs-heading);
  line-height: var(--a-lh-heading);
  color: var(--a-ink);
}

.category-circles__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  /* 4 tiles + half of the 5th inside 402px, so the row reads as scrollable:
     15 page pad + 4 x (73 tile + 15 gap) puts the 5th at x=367, i.e. ~half
     of it visible. The tile was previously forced to 92px wide, which pushed
     the 5th off-screen entirely and made the row look like it ended at four. */
  gap: var(--a-space-4);
  overflow-x: auto;
  /* run past the page padding so the 5th tile peeks at the screen edge
     instead of being clipped; scroll-padding keeps the first tile aligned */
  margin-inline: calc(var(--a-page-pad) * -1);
  padding-inline: var(--a-page-pad);
  scroll-padding-inline-start: var(--a-page-pad);
  scrollbar-width: none;
}

.category-circles__track::-webkit-scrollbar {
  display: none;
}

.category-circles__item {
  flex: 0 0 auto;
}

.category-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--a-space-2);
  width: var(--cc-size, 73px);
  text-decoration: none;
}

.category-circle__disc {
  --cc-size: 73px;
  width: var(--cc-size);
  height: var(--cc-size);
  border-radius: var(--a-radius-round);
  border: 1px solid var(--a-tan);
  background: var(--a-photo-ground);
  overflow: hidden;
}

.category-circle__img {
  transition: transform var(--a-mega-speed) var(--a-mega-ease);
}

/* hover: the photo grows a little inside the circle */
.category-circle:hover .category-circle__img,
.category-circle:focus-visible .category-circle__img {
  transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .category-circle__img {
    transition: none;
  }
}

.category-circle__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-circle__label {
  width: 100%;
  font-family: var(--a-font-body);
  font-weight: 400;
  font-size: var(--a-fs-body);
  line-height: var(--a-lh-body);
  color: var(--a-ink);
  text-align: center;
  /* Figma keeps this label on one line and lets it spill past the 73px tile.
     We do the same within the 15px gap — 7px either side — so "Necklaces" sits
     on one line instead of breaking into "Necklace / s". Words are never split
     (`overflow-wrap: normal`); a genuinely long collection title wraps at a
     space and is capped at two lines so it cannot stretch the row. */
  width: calc(100% + 14px);
  margin-inline: -7px;
  overflow-wrap: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Wider screens: the labels scale with the type tokens, so the discs grow with
   them — otherwise "Best Sellers" outgrows a 73px tile. The inline --cc-size
   on the disc is the phone size; these win over it. */
@media screen and (min-width: 750px) {
  .category-circles__track {
    gap: var(--a-space-5);
  }

  .category-circle {
    width: 92px;
  }

  .category-circle__disc {
    width: 92px;
    height: 92px;
  }
}

@media screen and (min-width: 1200px) {
  .category-circles__track {
    gap: var(--a-space-6);
  }

  .category-circle {
    width: 108px;
  }

  .category-circle__disc {
    width: 108px;
    height: 108px;
  }
}
