/* Sale prices — global, because a price with a discount can show up anywhere:
   loop cards, the quick-view modal, the single product's packaging rows, the
   mega menu recommendations, My Account → Produkty.

   inc/sale-price.php wraps the whole price in .pprice-stack and puts the
   original price in front of it as a <del>. The wrapper is a wrapping flex row
   where the <del> claims a full line, so everything else drops to the line
   below it — including a variable product's "od ", which has to read next to
   the current price, not under a struck-through one:

       0,180 €
       od 0,164 € / ks · s DPH

   width:100% rather than shrink-to-fit: a flex box sized by its content adds up
   both rows for its max-content width, which would push the wrapper wider than
   the tier card or table cell holding it. A price is always its own element
   here (.price, .t-price, .v-price, .mprice, .cp-price), so taking the full
   width of that element costs nothing. */
.pprice-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  width: 100%;
}

.pprice-stack > del {
  flex: 0 0 100%;
  order: -1;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.2;
  opacity: 1;
}

/* The <del> reuses ametica-rbp's amount markup, so anything that scales up the
   current figure has to be undone inside it. .amount in particular is flattened
   with display:contents on the loop card — left alone, its parts would become
   items of the wrapper and escape the strike-through. */
.pprice-stack > del .amount { display: inline; }
.pprice-stack > del .ametica-rbp-price-amount,
.pprice-stack > del .ametica-rbp-currency-symbol {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  letter-spacing: normal;
}
