/* A quiet, shared motion language. The public layout opts in; admin is unchanged. */
body[data-storefront-motion] {
  --motion-quick: 180ms;
  --motion-editorial: 360ms;
  --motion-ease: cubic-bezier(.22, .68, .2, 1);
}

body[data-storefront-motion] :is(.btn, .btn-hero, .storefront-hero-cta,
  .btn-add-to-cart, .btn-checkout, .btn-apply-price, .btn-directions,
  .static-page-back, .guest-status-contact) {
  transition: background-color var(--motion-quick) ease,
    border-color var(--motion-quick) ease, color var(--motion-quick) ease,
    box-shadow var(--motion-quick) ease, translate var(--motion-quick) var(--motion-ease);
}

body[data-storefront-motion] :is(.product-card, .wishlist-card, .store-card, .dashboard-card) {
  transition: translate var(--motion-editorial) var(--motion-ease),
    box-shadow var(--motion-editorial) ease, border-color var(--motion-quick) ease;
}

body[data-storefront-motion] .beauty-discover-card {
  transition: transform var(--motion-editorial) var(--motion-ease),
    box-shadow var(--motion-editorial) ease;
}

body[data-storefront-motion] :is(.product-card .primary-image, .wishlist-card-media img) {
  transition: transform 520ms var(--motion-ease), opacity var(--motion-editorial) ease;
}

body[data-storefront-motion] :is(.footer-col a, .account-nav-links .nav-link-item,
  .static-page-content a, .breadcrumb-list a, .card-edit-link, .view-all-link) {
  text-underline-offset: .24em;
  transition: color var(--motion-quick) ease, text-decoration-color var(--motion-quick) ease;
}

/* Hover lifts are only for accurate pointers, never sticky touchscreen hover. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body[data-storefront-motion] :is(.product-card, .wishlist-card, .store-card, .dashboard-card):hover {
    translate: 0 -3px;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--color-text-primary, #30251f) 8%, transparent);
  }

  body[data-storefront-motion] :is(.btn, .btn-hero, .storefront-hero-cta,
    .btn-add-to-cart, .btn-checkout, .btn-apply-price, .btn-directions,
    .static-page-back, .guest-status-contact):not(:disabled):not([aria-disabled="true"]):hover {
    translate: 0 -1px;
  }

  body[data-storefront-motion] .wishlist-card-media img { transform-origin: center; }
  body[data-storefront-motion] .wishlist-card:hover .wishlist-card-media img { transform: scale(1.025); }
}

/* No scroll/entry hiding rules: all content is visible without JavaScript. */
@media (prefers-reduced-motion: reduce) {
  body[data-storefront-motion],
  body[data-storefront-motion] *,
  body[data-storefront-motion] *::before,
  body[data-storefront-motion] *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  body[data-storefront-motion] :is(.product-card, .wishlist-card, .store-card, .dashboard-card,
    .btn, .btn-hero, .storefront-hero-cta, .btn-add-to-cart, .btn-checkout,
    .btn-apply-price, .btn-directions, .static-page-back, .guest-status-contact) {
    translate: none !important;
  }
}
