/* Hallmark · retained wholesale structure · editorial tone · forest anchor
 * Pre-emit critique: P5 H4 E5 S5 R5 V4. Motion layer only; brand tokens stay locked.
 */
:root {
  --yoz-motion-out: cubic-bezier(.16, 1, .3, 1);
  --yoz-motion-in: cubic-bezier(.7, 0, .84, 0);
  --yoz-motion-in-out: cubic-bezier(.65, 0, .35, 1);
  --yoz-motion-fast: 180ms;
  --yoz-motion-enter: 480ms;
  --yoz-motion-image: 500ms;
  --yoz-motion-hero: 1000ms;
}

/* Cropping belongs to the existing image frames, never the cards or controls. */
#MainContent.yoz-b2b .b2bw__product-image,
#MainContent.yoz-b2b #ywcatalog .yw-card .yw-image-link,
#MainContent.yoz-b2b .yoz-post-card__image {
  overflow: clip;
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  html[data-yoz-motion="ready"] #MainContent.yoz-b2b .b2bw__product-image img,
  html[data-yoz-motion="ready"] #MainContent.yoz-b2b #ywcatalog .yw-card .yw-image-link img,
  html[data-yoz-motion="ready"] #MainContent.yoz-b2b .yoz-post-card__image img {
    transition: transform var(--yoz-motion-image) var(--yoz-motion-out) !important;
    transform-origin: center;
  }
  html[data-yoz-motion="ready"] #MainContent.yoz-b2b .b2bw__product-image:is(:hover, :focus-visible) img,
  html[data-yoz-motion="ready"] #MainContent.yoz-b2b #ywcatalog .yw-card:is(:hover, :focus-within) .yw-image-link img,
  html[data-yoz-motion="ready"] #MainContent.yoz-b2b .yoz-post-card__image:is(:hover, :focus-visible) img,
  html[data-yoz-motion="ready"] #MainContent.yoz-b2b .yoz-post-card:focus-within .yoz-post-card__image img {
    transform: scale(1.025) !important;
  }
  html[data-yoz-motion="ready"] .wholesale-header a.wholesale-quote {
    transition: transform var(--yoz-motion-fast) var(--yoz-motion-out) !important;
  }
  html[data-yoz-motion="ready"] .wholesale-header a.wholesale-quote:is(:hover, :focus-visible) {
    transform: translateY(-1px);
  }
  html[data-yoz-motion="ready"] .wholesale-header a.wholesale-quote:active {
    transform: none;
  }
}

/* Override the legacy catalogue hover even when JavaScript is unavailable. */
@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  #MainContent.yoz-b2b .b2bw__product-image img,
  #MainContent.yoz-b2b #ywcatalog .yw-card .yw-image-link img,
  #MainContent.yoz-b2b .yoz-post-card__image img {
    transition: none !important;
    transform: none !important;
  }
  html[data-yoz-motion] .wholesale-header a.wholesale-quote {
    transition: none !important;
    transform: none !important;
  }
}

/* Loading and empty-state headings remain quiet; existing feedback stays intact. */
#MainContent.yoz-b2b #ywcatalog #yw-state h3 {
  animation: none !important;
}
