/* Soma: exact monetary savings in storefront badges (desktop / mobile). */
.product-labels:has(.wd-soma-sale-amount) {
  max-width: 72%;
}
.product-labels .product-label.onsale.wd-soma-sale-amount,
.product-labels .product-label.onsale.wd-fbt-sale-label {
  direction: rtl;
  unicode-bidi: plaintext;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  line-height: 1.5;
  max-width: 100%;
  min-width: 0;
  width: max-content;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 750;
}
/* Woodmart's circular badges are too narrow for a real currency amount. */
.product-labels.labels-rounded .product-label.onsale.wd-soma-sale-amount,
.product-labels.labels-rounded .product-label.onsale.wd-fbt-sale-label {
  border-radius: 14px;
  min-height: 0;
  padding: 7px 10px;
  font-size: 11px;
}
.wd-soma-discount-badge,
.wd-so-badge,
.wd-soma-compare-sale {
  direction: rtl;
  unicode-bidi: plaintext;
  line-height: 1.6;
  white-space: normal;
  word-break: normal;
}
@media (max-width: 767px) {
  .product-labels:has(.wd-soma-sale-amount) { max-width: 75%; }
  .product-labels .product-label.onsale.wd-soma-sale-amount,
  .product-labels .product-label.onsale.wd-fbt-sale-label {
    font-size: 10px;
    padding: 5px 7px;
    line-height: 1.4;
  }
  .wd-soma-discount-badge { font-size: 11px; }
}

/* A longer currency label must not cover the crossed-out/current price. */
body.wd-soma-single-product-v2 .wd-soma-price-card {
  flex-direction: column;
  gap: 8px;
}
body.wd-soma-single-product-v2 .wd-soma-price-card .wd-soma-discount-badge {
  position: static !important;
  align-self: flex-start;
  max-width: 100%;
  padding: 6px 10px;
}
/* The Elementor special-offers ribbon originally forced a single line. */
.wd-special-offers .wd-so-badge {
  white-space: normal;
  max-width: calc(100% - 20px);
  line-height: 1.45;
  text-align: center;
  overflow-wrap: normal;
}
@media (max-width: 767px) {
  .wd-special-offers .wd-so-badge {
    max-width: calc(100% - 12px);
    font-size: 10px;
  }
}
