@supports (container-type: size) and (width: 1cqw) {
  .catalog-results .product-card-gallery--catalog [data-gallery-stage],
  body.single-product :is(.atlas-recent, #atlas-accessories, #atlas-companions, #atlas-similar, #atlas-similar-models) .product-card-gallery--catalog [data-gallery-stage],
  body.single-product :is(#atlas-comparison, .atlas-product-comparison__sticky-header) .atlas-product-comparison__media-link,
  .plata-pdp--showcase #pdp-comparison .pdp-compare-media,
  .atlas-thumbnail-frame {
    container-type: size;
  }

  .atlas-thumbnail-frame {
    display: block;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
  }

  .atlas-thumbnail-frame.atlas-recent__image {
    height: auto;
    aspect-ratio: 1;
  }

  .plata-pdp--showcase #pdp-comparison .pdp-compare-media {
    position: relative;
    overflow: hidden;
  }

  .plata-pdp--showcase .pdp-side-product > .atlas-thumbnail-frame {
    width: 100%;
    height: 294px;
  }

  .plata-pdp--showcase .pdp-side-product:has(.pdp-side-unavailable) > .atlas-thumbnail-frame {
    height: auto;
    aspect-ratio: 1;
  }

  .plata-pdp--water-heater .pdp-side-product > .atlas-thumbnail-frame {
    width: calc(100% + 32px);
    margin-inline: -16px;
  }

  html[data-atlas-fit-page] body:not(.single-product) .catalog-results .atlas-product-card
    .product-card-gallery--catalog:not([data-gallery-interior="1"])
    [data-gallery-stage] > img:not([data-atlas-thumbnail-fit]) {
    visibility: hidden;
  }

  html body .catalog-results .atlas-product-card
    .product-card-gallery--catalog:not([data-gallery-interior="1"])
    span[data-gallery-stage] > img[data-atlas-thumbnail-fit],
  html body.single-product :is(.atlas-recent, #atlas-accessories, #atlas-companions, #atlas-similar, #atlas-similar-models)
    .product-card-gallery--catalog:not([data-gallery-interior="1"])
    span[data-gallery-stage] > img[data-atlas-thumbnail-fit],
  html body.single-product :is(#atlas-comparison, .atlas-product-comparison__sticky-header)
    .atlas-product-comparison__media-link > img[data-atlas-thumbnail-fit],
  .plata-pdp--showcase #pdp-comparison .pdp-compare-media > img[data-atlas-thumbnail-fit],
  .atlas-thumbnail-frame > img[data-atlas-thumbnail-fit] {
    position: absolute !important;
    inset: 50% auto auto 50% !important;
    width: var(--atlas-fit-width) !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    translate: var(--atlas-fit-offset) !important;
    scale: none !important;
  }
}
