/* Nino Works — slow scroll reveal for product cards.
   Additive only: style.css, card-hover.css and theme-toggle.css are untouched.
   Loaded from the _shop layout, so checkout / order-complete never get it.
   Only opacity and transform are animated, so the Light and Dark themes keep
   their own card colours, and the hover zoom/blur (which acts on the image
   and on filter) is not affected. Reduced-motion visitors see no animation. */

@media (prefers-reduced-motion: no-preference) {
  /* Safety net: if card-reveal.js never runs, a card still appears after 2.5s. */
  .shop-page .scard:not(.nw-rv-wait):not(.nw-rv-in) {
    animation: nwRevealSafety 0.6s ease 2.5s both !important;
  }

  /* Waiting below the fold: hidden, slightly lowered. */
  .shop-page .scard.nw-rv-wait {
    animation: none !important;
    opacity: 0;
    transform: translate3d(0, 34px, 0);
  }

  /* Entering the viewport: slow fade-in and rise. Ends exactly where the
     shop's own cardIn animation ends (opacity 1, no transform). */
  .shop-page .scard.nw-rv-in {
    animation-name: nwReveal !important;
    animation-duration: 1.25s !important;
    animation-timing-function: cubic-bezier(0.22, 0.61, 0.36, 1) !important;
    animation-delay: var(--nw-rv-delay, 0ms) !important;
    animation-fill-mode: both !important;
    animation-iteration-count: 1 !important;
  }
}

@keyframes nwReveal {
  from {
    opacity: 0;
    transform: translate3d(0, 34px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes nwRevealSafety {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
    transform: none;
  }
}
