.UiBadge.ProductItem__DiscountBadge,
.Product__GalleryDiscountBadge > .UiBadge {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium, 500);
  padding: var(--space-2xs) var(--space-sm);
}

.Product__SlideItem--image > .Product__GalleryDiscountBadge {
  position: absolute;
  z-index: 2;
  inset-block-start: var(--space-md);
  inset-inline-start: var(--space-md);
  pointer-events: none;
}

.Product__SlideItem--image > .Product__GalleryDiscountBadge[hidden] {
  display: none;
}

.ProductItem__Media > .ProductItem__DiscountBadge {
  position: absolute;
  z-index: 5;
  inset-block-start: var(--space-md);
  inset-inline-end: var(--space-md);
  pointer-events: none;
}

.UiBadge--pill.ProductItem__Label--background {
  border-radius: var(--radius-pill);
}

.Product__GalleryDiscountBadge > .UiBadge {
  background: var(--color-surface-canvas, var(--background));
  color: var(--product-sale-price-color);
  border-radius: var(--radius-pill, 999px);
}

/* Only active campaign cards carry this badge. Keep the layout measurable for Regios. */
@media (scripting: enabled) {
  .ProductItem:has(.ProductItem__DiscountBadge):not([data-product-card-discount-state="error"], [data-product-card-discount-state="ready"])
  price-list:not(.regios-dopp-generic-price--on-sale:has(.regios-dopp-description:not(:empty))) {
    position: relative;

    &::before {
      content: "…";
      position: absolute;
      inset-inline-start: 0;
      animation: ber16-hide-price-placeholder 0s 8s forwards;
    }

    & > * {
      visibility: hidden;
      animation: ber16-restore-catalog-price 0s 8s forwards;
    }
  }
}

/* Restore the catalogue price if the external renderer is unavailable. */
@keyframes ber16-hide-price-placeholder { to { visibility: hidden; } }
@keyframes ber16-restore-catalog-price { to { visibility: visible; } }

price-list [data-ber16-duplicate-compare],
[data-product-card-club-price][hidden] {
  display: none !important;
}

/* Legacy DECO percentage stickers duplicate the storefront sale badge. */
.pl-container [data-label-id="82656"],
.pl-container [data-label-id="89902"],
.pl-container [data-label-id="90578"],
.pl-container [data-label-id="106679"],
.pl-container [data-label-id="106681"],
.pl-container [data-label-id="106682"] {
  display: none !important;
}
