/* A discounted price (elements/price-tag.blade.php), on the product cards, the product page and
   the cart, loaded by both layouts. The price before the discount, grey and struck through, with the
   percent off in an orange pill on its left; the price charged below them, black and larger. */

.price-tag {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.35;
  vertical-align: middle;
}

/* the first line: the price before the discount at the start (right), the pill at the end */
.price-tag__was,
.price-tag__now {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.price-tag__off {
  padding: 1px 7px;
  border-radius: 999px;
  background-color: var(--orange-400, #f18815);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.price-tag__before {
  color: var(--gray-700, #9d9d9d);
  font-size: 12px;
  white-space: nowrap;
}

.price-tag__now {
  color: #1a1d20;
}

.price-tag__amount {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.price-tag__unit {
  font-size: 11px;
  font-weight: 500;
}

/* On a card. The card's price box was made for a one-line price: 40px tall, no room above it when
   discounted (style.css, collections.css). The tag is two lines: the box grows with it, and where the
   price sits under the «افزودن به سبد» button (below 992px) it keeps a little room from it. */
.product-box .product-price.has-discount {
  height: auto;
}

@media (max-width: 991.98px) {
  .product-box .product-price.has-discount {
    padding-top: 10px;
  }
}

/* the product's own page: the same, larger */
.price-tag--page {
  gap: 4px;
}

.price-tag--page .price-tag__off {
  padding: 2px 9px;
  font-size: 14px;
}

.price-tag--page .price-tag__before {
  font-size: 16px;
}

.price-tag--page .price-tag__amount {
  font-size: 24px;
}

.price-tag--page .price-tag__unit {
  font-size: 14px;
}

/* a row of the cart: smaller, as the table's other figures */
.price-tag--cart {
  gap: 2px;
}

.price-tag--cart .price-tag__was {
  gap: 6px;
}

.price-tag--cart .price-tag__off {
  padding: 0 6px;
  font-size: 10px;
}

.price-tag--cart .price-tag__before {
  font-size: 0.74rem;
  font-weight: 500;
}

.price-tag--cart .price-tag__amount {
  font-size: 0.88rem;
}
