.wc-block-product-categories-list {
  display: grid;
  gap: var(--wp--preset--spacing--30);
  grid-template-columns: repeat(2, 1fr);
  margin-block-start: 0;
  margin-block-end: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .wc-block-product-categories-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .wc-block-product-categories-list {
    grid-template-columns: repeat(5, 1fr);
  }
}

.wc-block-product-categories-list-item__container {
  position: relative;
}

.wc-block-product-categories-list-item {
  position: relative;
}

.wc-block-product-categories-list-item__image {
  position: relative;
  display: flex;
  height: fit-content;
  overflow: hidden;
  border-radius: var(--image-border-radius, 5px);
}

.wc-block-product-categories-list-item__image::after {
  content: "";
  width: 100%;
  position: absolute;
  height: 100%;
  left: 0;
  top: 0;
  background-color: rgba(18, 41, 64, 0.24);
  opacity: 0;
  visibility: visible;
  transition: opacity var(--transition-duration, 0.3s) ease-in-out;
  border-radius: var(--image-border-radius, 5px);
}

.wc-block-product-categories-list-item__image img {
  width: 100%;
  height: auto;
  border-radius: var(--image-border-radius, 5px);
  aspect-ratio: var(--image-aspect-ratio, 1/1);
  object-fit: cover;
  object-position: top;
  transition: scale var(--transition-duration, 0.3s) ease-in-out;
}

.wc-block-product-categories-list-item__content {
  position: absolute;
  bottom: 10px;
  width: calc(100% - 20px);
  left: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  background-color: #ffffff;
  color: var(--content-color, #122940);
  border-radius: 5px;
  padding: 5% 5%;
  box-shadow: 0px 0px 50px 15px #0000000d;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-duration, 0.3s) ease-in-out;
}

.wc-block-product-categories-list-item__name {
  line-height: 1;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.wc-block-product-categories-list-item__count {
  font-size: 0.75em;
  color: var(--count-color, #5a6d80);
}

.wc-block-product-categories-list-item:hover
  .wc-block-product-categories-list-item__content {
  opacity: 1;
  visibility: visible;
}

.wc-block-product-categories-list-item:hover
  .wc-block-product-categories-list-item__image::after {
  opacity: 1;
  visibility: visible;
}

.wc-block-product-categories-list-item:hover img {
  scale: var(--image-hover-scale, 1.1);
}
