/* Transparent diffuser packshots take their backdrop from the active storefront theme. */
:root :is(.studio-card-image, .studio-detail-image, .studio-format-image, .studio-variant-photo,
          .format-story__photo, .scent-finder__photo, .scent-tile__art, .scent-match__art):has(
  > img:is([src^="/static/image-studio/formats/reed-"],
           [src^="/static/image-studio/formats/hanging-glass-diffuser."],
           [src^="/static/image-studio/formats/skull-glass-diffuser."],
           [src^="/static/products/"][src*="-diffusers"])
) {
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  background: var(--wax-format-stage, var(--wax-product-backdrop,
    radial-gradient(ellipse at 48% 35%, #f8eee2, #af9284 105%)));
  background-position: center;
  background-size: cover;
}

:root :is(.studio-card-image, .studio-detail-image, .studio-format-image, .studio-variant-photo,
          .format-story__photo, .scent-finder__photo, .scent-tile__art, .scent-match__art)
> img:is([src^="/static/image-studio/formats/reed-"],
         [src^="/static/image-studio/formats/hanging-glass-diffuser."],
         [src^="/static/image-studio/formats/skull-glass-diffuser."],
         [src^="/static/products/"][src*="-diffusers"]) {
  position: relative;
  inset: auto;
  display: block;
  width: var(--diffuser-packshot-width, min(88%, 28rem));
  min-width: 0;
  max-width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 1;
  object-fit: contain;
  mix-blend-mode: normal;
}

.studio-variant-photo { --diffuser-packshot-width: min(73%, 17rem); }
.studio-format-image { --diffuser-packshot-width: min(65%, 16rem); }
.format-story__photo { --diffuser-packshot-width: min(63%, 28rem); }
.scent-finder__photo { --diffuser-packshot-width: min(91%, 19rem); }
.scent-tile__art { --diffuser-packshot-width: 56%; }
.scent-match__art { --diffuser-packshot-width: 84%; }

:root :is(.studio-card-image, .studio-detail-image, .studio-format-image, .studio-variant-photo,
          .format-story__photo, .scent-finder__photo, .scent-tile__art, .scent-match__art):has(
  > img:is([src^="/static/image-studio/formats/reed-"],
           [src^="/static/image-studio/formats/hanging-glass-diffuser."],
           [src^="/static/image-studio/formats/skull-glass-diffuser."])
)::before {
  position: absolute;
  inset: auto 34% 8%;
  height: 11%;
  background: radial-gradient(ellipse, rgb(46 30 35 / 35%), transparent 68%);
  pointer-events: none;
  content: "";
}

:root :is(.studio-card-image, .studio-detail-image, .studio-format-image, .studio-variant-photo,
          .format-story__photo, .scent-finder__photo, .scent-tile__art, .scent-match__art):has(
  > img:is([src^="/static/image-studio/formats/hanging-glass-diffuser."],
           [src^="/static/image-studio/formats/skull-glass-diffuser."])
)::before {
  inset: auto 32% 14%;
}

@media (max-width: 510px) {
  .studio-card-image:has(> img[src^="/static/image-studio/formats/reed-"]) > .scent-pyramid {
    width: min(4.2rem, 42%);
  }
  .studio-card-image:has(> .scent-pyramid) > img[src^="/static/image-studio/formats/reed-"] {
    translate: -13% -3%;
  }
  :root .studio-card-image:has(> img[src^="/static/image-studio/formats/reed-"]):has(> .scent-pyramid)::before {
    inset-inline: 23% 45%;
  }
}

/* Older multi-vessel comparison photos keep their reflected shadows and supplied crops. */
:root :is(.studio-card-image, .studio-detail-image, .studio-format-image, .studio-variant-photo,
          .format-story__photo, .scent-finder__photo, .scent-tile__art, .scent-match__art)
> img[src^="/static/products/"][src*="-diffusers"] {
  mix-blend-mode: multiply;
  filter: brightness(1.032) contrast(1.018);
}

