/**
 * HB-574a — Đối tác thương hiệu marquee (theme-freeze overlay)
 * Faster continuous scroll; beat hb189 reduced-motion transform:none freeze.
 * Never touches index-C7BUmI7G.js / index-BN2ZtJyR.css.
 */

@keyframes hb574ScrollLeft {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes hb574ScrollRight {
  0% {
    transform: translate3d(-50%, 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

html.storefront-root .home-brand-scroll-row-left,
html.storefront-root .home-brand-scroll-row-left.is-marquee-paused,
html.storefront-root .home-brand-scroll-row-left.is-marquee-running,
html.storefront-root .home-brand-scroll-row-left[data-hb368-marquee="1"],
html.storefront-root .home-brand-scroll-row-left[data-hb574-marquee="1"] {
  display: flex !important;
  width: max-content !important;
  /* Do NOT set transform:!important — freezes keyframes */
  animation: hb574ScrollLeft var(--brand-marquee-duration, 36s) linear infinite !important;
  animation-play-state: running !important;
  will-change: transform;
  backface-visibility: hidden;
}

html.storefront-root .home-brand-scroll-row-right,
html.storefront-root .home-brand-scroll-row-right.is-marquee-paused,
html.storefront-root .home-brand-scroll-row-right.is-marquee-running,
html.storefront-root .home-brand-scroll-row-right[data-hb368-marquee="1"],
html.storefront-root .home-brand-scroll-row-right[data-hb574-marquee="1"] {
  display: flex !important;
  width: max-content !important;
  animation: hb574ScrollRight var(--brand-marquee-duration, 36s) linear infinite !important;
  animation-play-state: running !important;
  will-change: transform;
  backface-visibility: hidden;
}

html.storefront-root .home-brand-scroll-row:not(.home-brand-scroll-row-left):not(.home-brand-scroll-row-right) {
  display: flex !important;
  width: max-content !important;
  animation: hb574ScrollLeft var(--brand-marquee-duration, 36s) linear infinite !important;
  animation-play-state: running !important;
}

/* Site opted into marquee UX — keep moving even with prefers-reduced-motion.
   hb189 sets transform:none !important which freezes keyframes; hb574 JS rAF
   fallback covers that. CSS still forces animation for engines that honor later rules. */
@media (prefers-reduced-motion: reduce) {
  html.storefront-root .home-brand-scroll-row-left,
  html.storefront-root .home-brand-scroll-row-left.is-marquee-paused,
  html.storefront-root .home-brand-scroll-row-left.is-marquee-running,
  html.storefront-root .home-brand-scroll-row-left[data-hb574-marquee="1"] {
    animation: hb574ScrollLeft var(--brand-marquee-duration, 36s) linear infinite !important;
    animation-play-state: running !important;
  }

  html.storefront-root .home-brand-scroll-row-right,
  html.storefront-root .home-brand-scroll-row-right.is-marquee-paused,
  html.storefront-root .home-brand-scroll-row-right.is-marquee-running,
  html.storefront-root .home-brand-scroll-row-right[data-hb574-marquee="1"] {
    animation: hb574ScrollRight var(--brand-marquee-duration, 36s) linear infinite !important;
    animation-play-state: running !important;
  }
}

html.storefront-root .brand-container {
  overflow: hidden !important;
}

/* When JS rAF driver is active, pause CSS animation to avoid fighting transforms */
html.storefront-root .home-brand-scroll-row-left[data-hb574-raf="1"],
html.storefront-root .home-brand-scroll-row-right[data-hb574-raf="1"],
html.storefront-root .home-brand-scroll-row[data-hb574-raf="1"] {
  animation: none !important;
}
