/* Product cards only. Keep the badge box steady and move its text track. */
html body[data-advanced-card-badge-style] .product-card [data-product-badge-stack] .product-card-badge-chip[data-product-badge-chip] > .product-card-badge-text{
  display:block!important;
  flex:0 1 auto!important;
  min-width:0!important;
  width:auto!important;
  max-width:100%!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  text-overflow:clip!important;
  text-align:start!important;
  -webkit-line-clamp:unset!important;
  -webkit-box-orient:initial!important;
  line-clamp:unset!important;
  transform:none!important;
}
html body .product-card [data-product-badge-chip] .product-card-badge-text__track{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:5px!important;
  box-sizing:border-box!important;
  width:max-content!important;
  min-width:max-content!important;
  max-width:none!important;
  white-space:nowrap!important;
  vertical-align:middle!important;
  line-height:inherit!important;
  transform:translate3d(0,0,0);
}
html body[data-product-badge-scroll="true"] .product-card [data-product-badge-chip].is-active .product-card-badge-text.is-overflowing > .product-card-badge-text__track{
  animation:elite-card-badge-read var(--elite-badge-scroll-duration,6s) linear infinite;
}
@keyframes elite-card-badge-read{
  0%,12%{transform:translate3d(0,0,0)}
  62%,82%{transform:translate3d(var(--elite-badge-scroll-x,0px),0,0)}
  100%{transform:translate3d(0,0,0)}
}

/* The reference mode uses the same measured, overflow-only text movement.
   Its frame/gradient remain fixed rather than moving the entire chip. */
html body[data-advanced-card-badge-style="reference-ticker"][data-product-badge-scroll] .product-card.product-card-style-for-her-advanced [data-advanced-product-badge-slot] .product-card-badge-chip[data-product-badge-chip]{
  box-sizing:border-box!important;
  left:auto!important;
  right:auto!important;
  inset-inline-start:0!important;
  inset-inline-end:auto!important;
  width:100%!important;
  max-width:100%!important;
  padding:0 8px!important;
  overflow:hidden!important;
  translate:none!important;
  transform:none!important;
  animation:none!important;
}
html body[data-advanced-card-badge-style="reference-ticker"] .product-card.product-card-style-for-her-advanced [data-advanced-product-badge-slot] [data-product-badge-stack]{
  -webkit-mask-image:none!important;
  mask-image:none!important;
}

/* Dedicated badge palette, separate from card buttons, ratings and PDP. */
html body[data-product-badge-colors="custom"] .product-card [data-product-badge-stack] .product-card-badge-chip[data-product-badge-chip].is-custom{
  background:var(--elite-card-badge-custom-bg,#373d55)!important;
  color:var(--elite-card-badge-custom-text,#fff)!important;
}
html body[data-product-badge-colors="custom"] .product-card [data-product-badge-stack] .product-card-badge-chip[data-product-badge-chip].is-custom.is-featured{
  background:var(--elite-card-badge-featured-bg,#373d55)!important;
  color:var(--elite-card-badge-featured-text,#fff)!important;
}
html body[data-product-badge-colors="custom"] .product-card [data-product-badge-stack] .product-card-badge-chip[data-product-badge-chip].is-discount{
  background:var(--elite-card-badge-discount-bg,#f4f4f4)!important;
  color:var(--elite-card-badge-discount-text,#202020)!important;
}
html body[data-product-badge-colors="custom"] .product-card [data-product-badge-stack] .product-card-badge-chip[data-product-badge-chip].is-tax{
  background:var(--elite-card-badge-tax-bg,#0f766e)!important;
  color:var(--elite-card-badge-tax-text,#fff)!important;
}
html body[data-product-badge-colors="custom"] .product-card [data-product-badge-chip] .product-card-badge-text{
  color:inherit!important;
}
html body[data-product-badge-colors="custom"][data-advanced-card-badge-style="reference-ticker"] .product-card.product-card-style-for-her-advanced [data-advanced-product-badge-slot] [data-product-badge-stack]{
  background:transparent!important;
}

/* A shopper who disables motion can still pan a long label by hand. */
html body[data-product-badge-scroll="false"] .product-card [data-product-badge-stack] .product-card-badge-chip[data-product-badge-chip] > .product-card-badge-text.is-overflowing{
  overflow-x:auto!important;
  scrollbar-width:none;
  pointer-events:auto!important;
  touch-action:pan-x;
}
@media(prefers-reduced-motion:reduce){
  html body[data-product-badge-scroll] .product-card [data-product-badge-chip] .product-card-badge-text__track{animation:none!important}
  html body[data-advanced-card-badge-style] .product-card [data-product-badge-stack] .product-card-badge-chip[data-product-badge-chip] > .product-card-badge-text.is-overflowing{
    overflow-x:auto!important;
    scrollbar-width:none;
    pointer-events:auto!important;
    touch-action:pan-x;
  }
}
