/* Stage the transparent bath and body product photography. */
:root :is(.studio-card-image, .studio-detail-image, .studio-format-image, .studio-variant-photo,
          .format-story__photo, .scent-finder__photo, .home-edit-photo, .scent-tile__art, .scent-match__art):has(
  > img:is([src^="/static/image-studio/formats/whipped-soap"],
           [src^="/static/image-studio/formats/sugar-scrub-"],
           [src^="/static/image-studio/formats/moisturiser"])
) {
  display: grid;
  place-items: center;
  position: relative;
  isolation: isolate;
  background: linear-gradient(141deg, transparent 32%, color-mix(in srgb, var(--wax-stage-mid, #623a4b) 29%, transparent) 109%),
    var(--wax-format-stage, var(--wax-product-backdrop,
    radial-gradient(ellipse at 45% 21%, #c8968c, #8a525d 66%, #623a4b)));
  background-position: center;
  background-size: cover;
}

:is(.studio-card-image, .studio-detail-image, .studio-format-image, .studio-variant-photo, .format-story__photo,
    .scent-finder__photo, .home-edit-photo, .scent-tile__art, .scent-match__art)
> img:is([src^="/static/image-studio/formats/whipped-soap"],
         [src^="/static/image-studio/formats/sugar-scrub-"],
         [src^="/static/image-studio/formats/moisturiser"]) {
  position: relative;
  inset: auto;
  display: block;
  width: var(--bath-packshot-width, min(87%, 25rem));
  max-width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 1;
  object-fit: fill;
  mix-blend-mode: normal;
}

.studio-variant-photo { --bath-packshot-width: min(70%, 16.8rem); }
.studio-format-image { --bath-packshot-width: min(66%, 19rem); }
.format-story__photo { --bath-packshot-width: min(61%, 32rem); }
.scent-finder__photo, .home-edit-photo { --bath-packshot-width: min(84%, 21rem); }
.scent-tile__art { --bath-packshot-width: 56%; }
.scent-match__art { --bath-packshot-width: 86%; }

:is(.studio-card-image, .studio-detail-image, .studio-format-image, .studio-variant-photo,
    .format-story__photo, .scent-finder__photo, .home-edit-photo, .scent-tile__art, .scent-match__art):has(
  > img:is([src^="/static/image-studio/formats/whipped-soap"],
           [src^="/static/image-studio/formats/sugar-scrub-"],
           [src^="/static/image-studio/formats/moisturiser"])
)::before {
  content: "";
  position: absolute;
  inset: auto 17% 17%;
  height: 13%;
  background: radial-gradient(ellipse, rgb(42 19 29 / 29%), transparent 70%);
  pointer-events: none;
}
:is(.studio-card-image, .studio-detail-image, .studio-format-image, .studio-variant-photo,
    .format-story__photo, .scent-finder__photo, .home-edit-photo, .scent-tile__art, .scent-match__art):has(
  > img[src^="/static/image-studio/formats/moisturiser"]
)::before {
  inset: auto 30% 6%;
}
:is(.studio-card-image, .studio-detail-image, .studio-format-image, .studio-variant-photo, .format-story__photo,
    .scent-finder__photo, .home-edit-photo, .scent-tile__art, .scent-match__art)
> img[src^="/static/image-studio/formats/moisturiser"] {
  width: calc(var(--bath-packshot-width, min(87%, 25rem)) * .91);
  transform: translateY(4%);
}
@media (max-width: 47.5rem) {
  #format-bath-body .studio-variant-photo { --bath-packshot-width: 88%; }
  .format-story__photo { --bath-packshot-width: 73%; }
}
@media (max-width: 32rem) {
  .studio-card-image:has(> .scent-pyramid)
  > img:is([src^="/static/image-studio/formats/whipped-soap"], [src^="/static/image-studio/formats/sugar-scrub-"]) {
    --bath-packshot-width: 82%;
    translate: -7% -15%;
  }
  .studio-card-image:has(> .scent-pyramid):has(
    > img:is([src^="/static/image-studio/formats/whipped-soap"], [src^="/static/image-studio/formats/sugar-scrub-"])
  )::before { inset: auto 25% 27% 14%; }
  #format-bath-body .studio-variant-photo:has(> .scent-pyramid)
  > img:is([src^="/static/image-studio/formats/whipped-soap"], [src^="/static/image-studio/formats/sugar-scrub-"]) {
    translate: 0 -7%;
  }
  #format-bath-body .studio-variant-photo:has(> img:is([src^="/static/image-studio/formats/whipped-soap"],
    [src^="/static/image-studio/formats/sugar-scrub-"], [src^="/static/image-studio/formats/moisturiser"])) > .scent-pyramid {
    width: min(4.4rem, 47%);
  }
  #format-bath-body .studio-variant-photo:has(> .scent-pyramid):has(
    > img:is([src^="/static/image-studio/formats/whipped-soap"], [src^="/static/image-studio/formats/sugar-scrub-"])
  )::before { bottom: 22%; }
}
