/* Keep each WooCommerce regular/sale pair together, including selected variations.
 * The existing typography, amounts and screen-reader labels stay intact. */
body :is(.price, .price-wrapper, .gg-pegasus-accessory__price):has(> del):has(> ins) {
    align-items: baseline;
    column-gap: .35em;
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    position: relative;
    white-space: nowrap;
}

body :is(.price, .price-wrapper, .gg-pegasus-accessory__price):has(> del):has(> ins) > :is(del, ins) {
    display: inline-block !important;
    flex: 0 0 auto;
    margin: 0 !important;
    white-space: nowrap;
}

body :is(.price, .price-wrapper, .gg-pegasus-accessory__price):has(> del):has(> ins) > br {
    display: none;
}

/* Lead with the current price while retaining WooCommerce's accessible labels. */
body :is(.price, .price-wrapper, .gg-pegasus-accessory__price):has(> del):has(> ins) > ins {
    order: 1 !important;
}

body :is(.price, .price-wrapper, .gg-pegasus-accessory__price):has(> del):has(> ins) > del {
    order: 2 !important;
}

body :is(.price, .price-wrapper, .gg-pegasus-accessory__price):has(> del):has(> ins) > .woocommerce-price-suffix {
    order: 3 !important;
}

/* Product cards no longer need the space reserved for two stacked prices. */
body ul.products li.product .wc-product__price {
    align-items: baseline !important;
    flex: 0 0 auto !important;
    margin-top: 8px !important;
    min-height: 0 !important;
}

/* Search cards must not move the released price space above the purchase button. */
body.gg-product-search-results ul.products li.product .wc-product__add_to_cart {
    margin-top: 0 !important;
}

/* Block-level sale prices retain the normal collapsed gap before Add to cart. */
body.gg-native-single-product .summary p.price:has(> del):has(> ins) {
    display: flex !important;
}
