/* Rosaodor Product Labels: replaces legacy badges only when explicitly enabled. */
body.rpl-managed-labels .c-product-grid__item,
body.rpl-managed-labels .c-product__gallery { position: relative; }
body.rpl-managed-labels .rpl-badge {
  display: inline-flex !important; position: relative; z-index: 12;
  align-items: center; justify-content: center; width: max-content;
  max-width: 100%; border: 0; border-radius: 2px;
  padding: 5px 8px; background: #22211f; color: #fff;
  font: 500 10px/1.15 Inter, Arial, sans-serif;
  letter-spacing: .10em; text-transform: uppercase; white-space: nowrap;
  box-shadow: none; pointer-events: none;
}
@media(max-width: 600px) {
  body.rpl-managed-labels .rpl-badge { font-size: 9px; letter-spacing: .08em; padding: 4px 7px; }
}
/* Legacy theme, WPCode and third-party labels are visually suppressed only when the
   global replacement is switched on. Favourite heart and quick cart stay visible. */
body.rpl-managed-labels .c-product-grid__badges > :not(.rpl-badge),
body.rpl-managed-labels .c-product__badges > :not(.rpl-badge),
body.rpl-managed-labels .c-product-grid__item .rosa-soft-po26-badge,
body.rpl-managed-labels .c-product-grid__item .rosa-lb-po26-badge,
body.rpl-managed-labels .c-product-grid__item .rp-ed-productbadge,
body.rpl-managed-labels .c-product-grid__item .c-product-grid__stock--out-of-stock,
body.rpl-managed-labels .c-product-grid__item span.onsale,
body.rpl-managed-labels .c-product .rosa-soft-po26-badge,
body.rpl-managed-labels .c-product .rosa-lb-po26-badge,
body.rpl-managed-labels .c-product .rp-ed-productbadge,
body.rpl-managed-labels .c-product .onsale { display: none !important; }
/* Product cards: badge above the image, never takes card height. */
body.rpl-managed-labels .c-product-grid__item > .c-product-grid__badges,
body.rpl-managed-labels .c-product-grid__item > .c-badge__list {
  position: absolute !important; z-index: 8 !important;
  top: 10px !important; left: 10px !important;
  max-width: calc(100% - 53px); margin: 0 !important; padding: 0 !important;
}
body.rpl-managed-labels .c-product-grid__item .rpl-badge { margin: 0 !important; }
/* Product detail: badge immediately above the product title. */
body.rpl-managed-labels .rp-ed-head > .rpl-badge,
body.rpl-managed-labels .summary.entry-summary > .rpl-badge {
  display: inline-flex !important; position: relative !important;
  align-self: flex-start; margin: 0 0 10px !important;
}
/* On single product pages, never show the label twice inside the gallery. */
body.rpl-managed-labels .c-product__gallery .c-product__badges > * { display: none !important; }
/* CSS-only fallback for JavaScript-disabled clients. JS uses a real element and
   adds rpl-badge-mounted, thereby disabling this fallback. */
body.rpl-managed-labels .c-product-grid__item:not(.rpl-badge-mounted):is(.rpl-label-new,.rpl-label-preorder,.rpl-label-bestseller,.rpl-label-outofstock)::before {
  content: ''; position: absolute; z-index: 11;
  top: 10px; left: 10px; padding: 5px 8px; background: #22211f;
  color: #fff; font: 500 10px/1.15 Inter,Arial,sans-serif; letter-spacing: .1em;
  border-radius: 2px; pointer-events: none;
}
body.rpl-managed-labels .c-product-grid__item.rpl-label-new:not(.rpl-badge-mounted)::before { content: 'NEW'; }
body.rpl-managed-labels .c-product-grid__item.rpl-label-preorder:not(.rpl-badge-mounted)::before { content: 'PRE-ORDER'; }
body.rpl-managed-labels .c-product-grid__item.rpl-label-bestseller:not(.rpl-badge-mounted)::before { content: 'BESTSELLER'; }
body.rpl-managed-labels .c-product-grid__item.rpl-label-outofstock:not(.rpl-badge-mounted)::before { content: 'OUT OF STOCK'; }
body.rpl-managed-labels .c-product:is(.rpl-label-new,.rpl-label-preorder,.rpl-label-bestseller,.rpl-label-outofstock):not(.rpl-badge-mounted) .c-product__gallery::before {
  content: ''; position: absolute; top: 10px; left: 10px; z-index: 11;
  background: #22211f; color: #fff; border-radius: 2px; padding: 5px 8px;
  font: 500 10px/1.15 Inter,Arial,sans-serif;letter-spacing: .1em; pointer-events:none;
}
body.rpl-managed-labels .c-product.rpl-label-new:not(.rpl-badge-mounted) .c-product__gallery::before {content:'NEW';}
body.rpl-managed-labels .c-product.rpl-label-preorder:not(.rpl-badge-mounted) .c-product__gallery::before {content:'PRE-ORDER';}
body.rpl-managed-labels .c-product.rpl-label-bestseller:not(.rpl-badge-mounted) .c-product__gallery::before {content:'BESTSELLER';}
body.rpl-managed-labels .c-product.rpl-label-outofstock:not(.rpl-badge-mounted) .c-product__gallery::before {content:'OUT OF STOCK';}

/* Badge inside the title block must not compress the price/title grid. */
body.rpl-managed-labels .rp-ed-head > .rpl-badge {grid-column:1 / -1!important;justify-self:start!important;}
