.mbp-sale-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: max-content;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--mb02-primary, #bf2639);
  color: #fff;
  font-size: .83rem;
  line-height: 1.1;
  font-weight: 750;
  white-space: nowrap;
  pointer-events: none;
}

.mb05-card:has(> .mbp-sale-badge) {
  position: relative;
}

.mb05-card > .mbp-sale-badge {
  inset-block-start: calc(clamp(8px, 1.2vw, 14px) + 5px);
  inset-inline-end: calc(clamp(8px, 1.2vw, 14px) + 5px);
}

.mb05-card:has(> .mbp-sale-badge) .mb05-favorite {
  top: 34px;
}

.mb05-card:has(> .mbp-sale-badge) .mb05-plan {
  max-width: calc(100% - 82px);
  overflow-wrap: anywhere;
}

.mb06-single div.product:has(> .mbp-sale-badge) {
  position: relative;
}

.mb06-single div.product > .mbp-sale-badge {
  grid-area: 1 / 1 / 2 / 2;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  padding: 7px 10px;
  font-size: .94rem;
}

.woocommerce .mb06-single div.product:has(> .mbp-sale-badge) .woocommerce-product-gallery__trigger {
  top: 47px;
  right: 10px;
}

@media (max-width: 860px) {
  .mb06-single div.product > .mbp-sale-badge {
    inset-inline-end: max(10px, calc((100% - 620px) / 2 + 10px));
  }
}
