/* V0.10.0 sale badges and sale prices (see class-sale-badge.php). Red so a reduction stands out on any theme; the
   !important rules are deliberate, because themes and WooCommerce style .onsale and sale prices in their own way
   (this site's theme loads after the plugin and paints .onsale purple). Recolour with --em-sale if needed. */
:root{--em-sale:#c62828;--em-sale-text:#fff;--em-sale-was:#8a8290}

/* Badge: a pill in the top-left corner of the product picture. */
.em-sale-badge,.woocommerce span.onsale.em-sale-badge{position:absolute!important;top:var(--em-sale-inset,12px)!important;left:var(--em-sale-inset,12px)!important;right:auto!important;bottom:auto!important;z-index:3!important;display:inline-flex!important;align-items:center;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;margin:0!important;padding:5px 11px!important;border:0!important;border-radius:999px!important;background:var(--em-sale)!important;color:var(--em-sale-text)!important;font-size:12.5px!important;font-weight:800!important;line-height:1.2!important;letter-spacing:.01em!important;text-transform:none!important;text-align:left!important;white-space:nowrap;box-shadow:0 4px 12px rgba(150,20,20,.28);pointer-events:none}
/* Shop and theme grids: product cards usually have padding, so sit the badge on the picture rather than the card edge. */
ul.products li.product{position:relative}
ul.products li.product span.onsale.em-sale-badge{--em-sale-inset:20px}
.em-category-picture{position:relative}
.em-category-picture .em-sale-badge{--em-sale-inset:10px}
/* Product page: a little larger, on the main photo. */
.em-store-media{position:relative}
.single-product span.onsale.em-sale-badge{--em-sale-inset:16px;padding:7px 14px!important;font-size:14px!important}
/* WooCommerce blocks keep their own badge position; only the colours and shape change. */
.wc-block-components-product-sale-badge{border:0!important;border-radius:999px!important;background:var(--em-sale)!important;color:var(--em-sale-text)!important;font-weight:800!important;text-transform:none!important;box-shadow:0 4px 12px rgba(150,20,20,.28)}

/* Prices: the old price grey and struck through, the sale price red and not underlined. */
.price ins,.em-category-price ins,.wc-block-components-product-price ins{color:var(--em-sale)!important;background:none!important;text-decoration:none!important;font-weight:800!important}
.price del,.em-category-price del,.wc-block-components-product-price del{color:var(--em-sale-was)!important;font-weight:500!important;text-decoration:line-through!important;opacity:1!important}
.price ins *,.em-category-price ins *,.wc-block-components-product-price ins *{color:inherit!important;text-decoration:none!important}
.price del *,.em-category-price del *,.wc-block-components-product-price del *{color:inherit!important}
@media(max-width:600px){.em-sale-badge,.woocommerce span.onsale.em-sale-badge{padding:4px 9px!important;font-size:11.5px!important}ul.products li.product span.onsale.em-sale-badge{--em-sale-inset:14px}.single-product span.onsale.em-sale-badge{padding:6px 12px!important;font-size:13px!important}}
