.product-categories-title-section {
  align-items: center;
  background: #fff;
  box-sizing: border-box;
  color: #1d1d1f;
  display: flex;
  gap: 8px;
  margin: 7px 0 0;
  min-height: 34px;
  overflow: visible;
  padding: 5px 12px;
  padding-left: 18px;
  padding-right: 18px;
  width: 100%;
}

.product-categories-title-section h2 {
  color: #1d1d1f;
  flex: 0 1 auto;
  margin: 0;
  max-width: calc(100% - 86px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-categories-title-section h2 {
  align-items: center;
  display: inline-flex;
  font-family: inherit;
  font-size: 13px;
  font-weight: 520;
  letter-spacing: -0.24px;
  line-height: normal;
  min-width: 0;
  white-space: nowrap;
}

.product-categories-count {
  align-items: center;
  display: inline-flex;
  font-family: inherit;
  font-size: 13px;
  font-weight: 520;
  letter-spacing: -0.24px;
  line-height: normal;
  min-width: 0;
  white-space: nowrap;
}

.product-categories-count {
  box-sizing: border-box;
  color: #8a8a8e;
  flex: 0 0 auto;
  justify-content: flex-end;
  margin: 0 0 0 auto;
  padding: 1px 0;
}

.product-categories-grid {
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 6px;
}

.product-categories-grid > [data-product-categories-link] {
  color: #111114;
  display: block;
  position: relative;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  /* clip the zoomed image on hover (see below) */
  overflow: hidden;
}

.product-categories-grid img {
  aspect-ratio: 4 / 5;
  background: #f8f8f8;
  display: block;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.25s ease;
  width: 100%;
}

.product-categories-grid > [data-product-categories-link].product-categories-revealed img {
  opacity: 1;
}

/* Same gentle zoom on hover as the Most Popular cards (desktop pointers only). */
@media (hover: hover) and (pointer: fine) {
  .product-categories-grid img {
    transition: opacity 0.25s ease, transform 0.3s ease;
  }
  .product-categories-grid > [data-product-categories-link]:hover img {
    transform: scale(1.025);
  }
}

.product-categories-grid span {
  background: #fff;
  display: grid;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.24px;
  line-height: normal;
  min-height: 52px;
  padding: 10px 6px;
  place-items: center;
}
