/**
 * Category page — unified entrance (main block + sidebar).
 * Uses keyframes on main/sidebar only; inner grid must not inherit transition kills.
 */

.site-content-widgets.nl-shop-enter {
  --nl-shop-enter-duration: 1.05s;
  --nl-shop-enter-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nl-shop-enter-y: 14px;
  --nl-shop-enter-sidebar-delay: 0.18s;
}

@keyframes nl-shop-enter-up {
  from {
    opacity: 0;
    transform: translate3d(0, var(--nl-shop-enter-y), 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Hidden until JS adds .is-entered */
.site-content-widgets.nl-shop-enter:not(.is-entered) main.store-products,
.site-content-widgets.nl-shop-enter:not(.is-entered) .store-sidebar {
  opacity: 0;
  transform: translate3d(0, var(--nl-shop-enter-y), 0);
}

/* Override generic.css `.store-products { transition: all }` on main */
.site-content-widgets.nl-shop-enter main.store-products {
  transition: none !important;
}

.site-content-widgets.nl-shop-enter.is-entered main.store-products {
  animation: nl-shop-enter-up var(--nl-shop-enter-duration) var(--nl-shop-enter-ease) forwards;
}

.site-content-widgets.nl-shop-enter.is-entered .store-sidebar {
  animation: nl-shop-enter-up var(--nl-shop-enter-duration) var(--nl-shop-enter-ease) forwards;
  animation-delay: var(--nl-shop-enter-sidebar-delay);
}

/* Inner grid only — never target main.store-products (same .store-products class) */
.site-content-widgets.nl-shop-enter main.store-products > [class^="store-products-"] {
  transition: none !important;
}

/* No separate motion on children */
.site-content-widgets.nl-shop-enter .category-hero,
.site-content-widgets.nl-shop-enter main.store-products > [class^="store-products-"],
.site-content-widgets.nl-shop-enter .nl-pkg,
.site-content-widgets.nl-shop-enter .nl-pkg.nl-product-enter {
  animation: none !important;
}

.site-content-widgets.nl-shop-enter .nl-pkg,
.site-content-widgets.nl-shop-enter .nl-pkg.nl-product-enter,
.site-content-widgets.nl-shop-enter .nl-pkg.nl-product-enter.is-entered {
  opacity: 1 !important;
  transform: none !important;
}

.site-content-widgets.nl-shop-enter .nl-pkg {
  transition:
    transform var(--nl-pkg-glow-ease),
    box-shadow var(--nl-pkg-glow-ease),
    border-color var(--nl-pkg-glow-ease) !important;
}

.site-content-widgets.nl-shop-enter .store-sidebar .widget.scroll-reveal,
.site-content-widgets.nl-shop-enter .store-sidebar .widget.scroll-reveal.scroll-reveal--visible {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .site-content-widgets.nl-shop-enter:not(.is-entered) main.store-products,
  .site-content-widgets.nl-shop-enter:not(.is-entered) .store-sidebar,
  .site-content-widgets.nl-shop-enter.is-entered main.store-products,
  .site-content-widgets.nl-shop-enter.is-entered .store-sidebar {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

/* Category: skip root view-transition fade (shop enter handles motion) */
body.page-store-category ::view-transition-old(root),
body.page-store-category ::view-transition-new(root) {
  animation-duration: 0.01ms !important;
}
