/* Only empty image margins move outside the frame; product proportions stay intact. */
.subcategory-card-placeholder,
.home-category-image:not(.home-category-image--all),
.site-menu-item-icon,
.product-category-return-image {
  position: relative;
}

:is(.subcategory-card-placeholder,.home-category-image,.site-menu-item-icon,.product-category-return-image) > img.category-thumbnail-fitted {
  position: absolute;
  width: var(--category-image-width);
  height: var(--category-image-height);
  left: var(--category-image-left);
  top: var(--category-image-top);
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: fill;
}

.product-category-return {
  grid-template-columns: 18px 64px minmax(0, 1fr);
}

.product-category-return-image {
  width: 64px;
}

.product-category-return-image .category-square-crop {
  display: block;
  position: relative;
  height: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}

.product-category-return-image .category-square-crop > img {
  position: absolute;
  display: block;
  max-width: none;
  max-height: none;
  object-fit: fill;
  mix-blend-mode: normal;
}

@media (max-width: 620px) {
  .subcategory-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .subcategory-card-placeholder {
    width: 56px;
  }
}
