/* ux-polish-r77.css — r77 UX batch. Loaded LAST in index.html so it wins at
   equal specificity. Additive only.
   Scope: (A1) product-card scroll reveal, (A4) workbench KPI top spacing.

   NOTE on item 11 (notification visibility): the .pp-feedback-region /
   .pp-feedback-toast / .pp-feedback-confirm classes are ALREADY fully and
   richly styled by feedback-r54.css (fixed top-right, z-index 2147483000,
   per-kind accents, styled native-dialog confirm + backdrop, mobile bottom
   placement, light-mode). The reason save/publish actions "felt silent" was
   the old reload-to-banner flow, which discarded the toast on navigation.
   That is fixed in JS (A6 in-place refresh keeps the live toast), so this
   stylesheet deliberately does NOT restyle the feedback system — overriding
   the polished dark design would be a regression. */

/* =====================================================================
   A1 — Home / storefront product-card scroll reveal (card-level, smooth,
   premium easing). Cards start slightly lifted + transparent and settle in
   once the injected IntersectionObserver adds .pp-reveal-seen. Gated behind
   prefers-reduced-motion so reduced-motion users see settled cards instantly
   (the observer also force-reveals every card in that case).
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .pp-storefront .pp-product-card {
    opacity: 0;
    transform: translateY(20px);
    transition:
      opacity .45s cubic-bezier(.22, .61, .36, 1),
      transform .45s cubic-bezier(.22, .61, .36, 1),
      border-color .3s ease,
      box-shadow .3s ease;
  }
  .pp-storefront .pp-product-card.pp-reveal-seen {
    opacity: 1;
    transform: translateY(0);
    will-change: auto;
  }
  /* Keep the hover lift subtle and consistent with the reveal easing. */
  .pp-storefront .pp-product-card.pp-reveal-seen:hover,
  .pp-storefront .pp-product-card.pp-reveal-seen:focus-within {
    transform: translateY(-3px);
  }
}

/* Reduced-motion: never hide or translate cards (defensive, in case a card
   is added between the media query and the observer's force-reveal pass). */
@media (prefers-reduced-motion: reduce) {
  .pp-storefront .pp-product-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* =====================================================================
   A4 — KPI cards are now the first child of .product-workbench (DOM move);
   give them breathing room at the very top of /admin/products.
   ===================================================================== */
.product-workbench > .dash-kpis.product-workbench-kpis {
  margin-top: 4px;
  margin-bottom: 18px;
}
