/* These Inkthreadable mockups share the same 1024 × 1200 garment silhouette. Matches every Inkthreadable flat (file names start with mockup-), whichever product copy it is. */
:is(.ds-concepts__product-photo, .product-media):has(> img[src*="/files/mockup-"]) {
  background: radial-gradient(ellipse at 50% 42%, #535057 0%, #302c33 46%, var(--dscrt-photo-edge, var(--color-background)) 84%);

  > img {
    clip-path: polygon(
      2.34% 38.33%, 21.88% 18.17%, 40.63% 10.42%, 41.80% 10.92%, 43.75% 11.58%,
      45.70% 12.08%, 47.66% 12.33%, 49.61% 12.42%, 51.56% 12.42%, 53.52% 12.25%,
      55.47% 11.83%, 57.42% 11.17%, 59.47% 10.42%, 78.52% 18.17%, 97.95% 38.33%,
      82.03% 49.33%, 76.27% 45.67%, 76.27% 89.67%, 23.93% 89.67%, 23.93% 45.67%, 18.36% 49.33%
    );
  }

  &.product-media > img {
    display: block;
    width: auto;
    height: 100%;
    max-width: 100%;
    margin-inline: auto;
    aspect-ratio: 64 / 75;
    object-fit: fill;
  }

  &.ds-concepts__product-photo > img {
    inset: 50% auto auto 50%;
    height: auto;
    transform: translate(-50%, -50%);
  }

  @media (hover: hover) and (pointer: fine), (min-width: 750px) and (pointer: none) {
    &:is(.ds-concepts__product-photo, product-card .product-media, .product-information .product-media):not(.dialog-zoomed-gallery *) {
      --dscrt-photo-scale: 3.6;
      --dscrt-photo-focus-x: -12%;
      --dscrt-photo-focus-y: 15.8%;
      overflow: clip;

      > img {
        transform:
          var(--dscrt-photo-position, translate(0, 0))
          scale(var(--dscrt-photo-scale))
          translate(var(--dscrt-photo-focus-x), var(--dscrt-photo-focus-y));
      }

      &:is(
        :hover,
        :focus-visible,
        .product-media-container:hover .product-media,
        .product-media-container:has(:focus-visible) .product-media,
        product-card:has(.product-card__link:focus-visible) .product-media
      ) {
        --dscrt-photo-scale: 1;
        --dscrt-photo-focus-x: 0%;
        --dscrt-photo-focus-y: 0%;
      }

      @media (prefers-reduced-motion: no-preference) {
        > img {
          transition: transform 190ms cubic-bezier(.2, .72, .25, 1);
        }

        &:is(:hover, .product-media-container:hover .product-media) > img {
          transition-duration: 290ms;
        }
      }
    }
  }
}

.ds-concepts__product-photo {
  --dscrt-photo-position: translate(-50%, -50%);
  --dscrt-photo-edge: #151217;
}
#MainContent .section-background:has(+ .product-information) {
  background-image: radial-gradient(ellipse closest-side at 34% 42%, #211c24 0%, transparent 100%);
}

@media screen and (max-width: 749px) {
  #MainContent .section-background:has(+ .product-information) {
    background-image: radial-gradient(ellipse closest-side at 50% 24%, #211c24 0%, transparent 100%);
  }
}

/* Small copies of the same shirt flats: gallery thumbnails, zoom thumbnails, sticky add-to-bag bar and search results. */
:is(.slideshow-controls__thumbnail, .dialog-thumbnails-list__thumbnail, .sticky-add-to-cart__image, .resource-card__media):has(> img[src*="/files/mockup-"]) {
  background: radial-gradient(ellipse at 50% 42%, #535057 0%, #302c33 46%, #151217 100%);
  overflow: hidden;
}

:is(.slideshow-controls__thumbnail, .dialog-thumbnails-list__thumbnail, .sticky-add-to-cart__image, .resource-card__media) > img[src*="/files/mockup-"] {
  clip-path: polygon(
    2.34% 38.33%, 21.88% 18.17%, 40.63% 10.42%, 41.80% 10.92%, 43.75% 11.58%,
    45.70% 12.08%, 47.66% 12.33%, 49.61% 12.42%, 51.56% 12.42%, 53.52% 12.25%,
    55.47% 11.83%, 57.42% 11.17%, 59.47% 10.42%, 78.52% 18.17%, 97.95% 38.33%,
    82.03% 49.33%, 76.27% 45.67%, 76.27% 89.67%, 23.93% 89.67%, 23.93% 45.67%, 18.36% 49.33%
  );
  width: auto;
  height: 100%;
  max-width: 100%;
  margin-inline: auto;
  aspect-ratio: 64 / 75;
  object-fit: fill;
}
