/* option-swap (from apps/emiomer/public/assets/site.css .slide img.swap and .price .prv, 25.10.2026): choosing an option
   crossfades the product photo to that option's photo and rolls the price to its new value.
   Tune a site by overriding these tokens in its own CSS. */
:root {
  --sw-ease: cubic-bezier(.16, 1, .3, 1); /* expo.out */
  --sw-fade: .6s;                         /* the new photo's fade */
  --sw-settle: 1s;                        /* its settle from 1.05x */
}

/* The photo frame: the new photo lies over the old one, fades in and settles, then the old one goes. The frame needs a
   size of its own (aspect-ratio or a height). */
[data-swap-photo] { position: relative; overflow: hidden; }
[data-swap-photo] > img { display: block; width: 100%; height: 100%; object-fit: cover; }
[data-swap-photo] > img.sw-new {
  position: absolute; top: 0; left: 0; opacity: 0; transform: scale(1.05);
  transition: opacity var(--sw-fade) var(--sw-ease), transform var(--sw-settle) var(--sw-ease);
}
[data-swap-photo] > img.sw-new.is-on { opacity: 1; transform: none; }

/* The price: a window the number rolls through (out upwards, in from below; the other way when it goes down). */
[data-swap-price] { display: inline-block; overflow: hidden; vertical-align: bottom; }
[data-swap-price] > .sw-v { display: inline-block; }
