.totals {
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.totals > * {
  font-size: 1.6rem;
  margin: 0;
}

.totals * {
  line-height: 1;
}

.totals > * + * {
  margin-left: 2rem;
}

.totals__subtotal-value {
  font-size: 1.8rem;
  position: relative;
}

.totals__subtotal-value .loading-overlay{
  left: 50%;
  transform: translate(-50%,-22%);
}

.cart__ctas + .totals {
  margin-top: 2rem;
}

@media all and (min-width: 750px) {
  .totals {
    justify-content: flex-end;
  }
}

@media screen and (max-width: 749px) {
  /* each total row: label left, amount right */
  .cart__footer .totals,
  #main-cart-footer .totals {
    justify-content: space-between;
    align-items: baseline;
    gap: 1.2rem;
  }
  .cart__footer .totals > * + *,
  #main-cart-footer .totals > * + * {
    margin-left: 0;
  }

  /* discount label: allowed to wrap, scales with screen */
  .totals > .totals__discount {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    line-height: 1.3;
    font-size: clamp(1.3rem, 3.6vw, 1.6rem);   /* "DISCOUNT" */
  }
  .totals__discount small {
    font-size: clamp(1.1rem, 3vw, 1.4rem);     /* "(MIX & MATCH 3 …)" */
  }

  /* amounts never break onto two lines */
  .totals .totals__subtotal-value {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}