/* PMS Discount Wizard — promotion badge. Same look everywhere, scaled on small screens. */
.woocommerce ul.products li.product,
.wc-block-components-product-image,
.woocommerce-product-gallery,
.wp-block-woocommerce-product-image-gallery,
.pmsdw-preview-image { position: relative; }

.pmsdw-flash {
	--pmsdw-scale: 1;
	--pmsdw-offset: 0.7em;
	position: absolute;
	z-index: 9;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: auto;
	height: auto;
	min-width: 0;
	min-height: 0;
	max-width: calc(100% - 2 * var(--pmsdw-offset));
	margin: 0;
	padding: 0.42em 0.85em;
	border: 0;
	border-radius: 999px;
	background: var(--pmsdw-bg, #e11d48);
	color: var(--pmsdw-color, #fff);
	font-family: var(--pmsdw-font, inherit);
	font-size: calc(var(--pmsdw-size, 15px) * var(--pmsdw-scale));
	font-weight: var(--pmsdw-weight, 700);
	font-style: normal;
	line-height: 1.15;
	letter-spacing: 0.01em;
	text-transform: none;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 0.15em 0.6em rgba(0, 0, 0, 0.14);
	pointer-events: none;
}
.pmsdw-pos-top-left { top: var(--pmsdw-offset); left: var(--pmsdw-offset); right: auto; bottom: auto; }
.pmsdw-pos-top-right { top: var(--pmsdw-offset); right: var(--pmsdw-offset); left: auto; bottom: auto; }
.pmsdw-pos-bottom-left { bottom: var(--pmsdw-offset); left: var(--pmsdw-offset); top: auto; right: auto; }
.pmsdw-pos-bottom-right { bottom: var(--pmsdw-offset); right: var(--pmsdw-offset); top: auto; left: auto; }
.pmsdw-shape-pill { border-radius: 999px; }
.pmsdw-shape-rounded { border-radius: 0.4em; }
.pmsdw-shape-square { border-radius: 0; }
.pmsdw-shape-circle {
	border-radius: 50%;
	width: 4.2em;
	height: 4.2em;
	padding: 0.3em;
	white-space: normal;
	overflow-wrap: anywhere;
}
.pmsdw-flash.pmsdw-static { position: static; margin: 0 0 0.5em; max-width: 100%; }

@media (max-width: 782px) {
	.pmsdw-flash { --pmsdw-scale: 0.88; }
}
@media (max-width: 480px) {
	.pmsdw-flash { --pmsdw-scale: 0.78; }
}

/* Cart block on phones: WooCommerce fixes the product column at 132px and keeps
   "You save …" on one line, which pushes prices off narrow screens. Let them fit. */
.wc-block-cart.is-mobile .wc-block-cart-items, .wc-block-cart.is-small .wc-block-cart-items { width: 100%; table-layout: fixed; }
.wc-block-cart.is-mobile table.wc-block-cart-items .wc-block-cart-items__row, .wc-block-cart.is-small table.wc-block-cart-items .wc-block-cart-items__row { grid-template-columns: 80px minmax(0, 1fr) auto; }
.wc-block-cart.is-mobile .wc-block-cart-item__product, .wc-block-cart.is-small .wc-block-cart-item__product { min-width: 0; overflow-wrap: anywhere; }
.wc-block-cart.is-mobile .wc-block-cart-item__total .wc-block-components-sale-badge, .wc-block-cart.is-small .wc-block-cart-item__total .wc-block-components-sale-badge { white-space: normal; text-align: right; max-width: 6.5em; }
@media (max-width: 360px) {
.wc-block-cart.is-mobile table.wc-block-cart-items .wc-block-cart-items__row, .wc-block-cart.is-small table.wc-block-cart-items .wc-block-cart-items__row { grid-template-columns: 56px minmax(0, 1fr) auto; }
.wc-block-cart.is-mobile .wc-block-cart-item__image, .wc-block-cart.is-small .wc-block-cart-item__image { width: 48px; }
.wc-block-cart.is-mobile .wc-block-cart-item__total, .wc-block-cart.is-small .wc-block-cart-item__total { font-size: 0.9em; }
}

/* "You save" summary in the cart */
.pmsdw-savings__list { list-style: none; margin: 0; padding: 0; }
.pmsdw-savings__list li { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 2px; }
.pmsdw-savings__amount { white-space: nowrap; font-weight: 600; color: #15803d; }
.pmsdw-savings__total { margin-top: 4px !important; padding-top: 4px; border-top: 1px solid rgba(0, 0, 0, .1); font-weight: 600; }
.pmsdw-savings--mini { width: 100%; box-sizing: border-box; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid rgba(0, 0, 0, .1); font-size: .9em; list-style: none; }
.pmsdw-savings--mini .pmsdw-savings__title { display: block; margin-bottom: 4px; }
.woocommerce-mini-cart .pmsdw-savings--mini { padding-left: 0; padding-right: 0; }
.pmsdw-savings--totals td { text-align: right; }
.pmsdw-savings--totals .pmsdw-savings__list li { justify-content: flex-end; }
.pmsdw-savings--blocks .pmsdw-savings__list { font-size: .875em; opacity: .85; margin-top: 4px; }
.pmsdw-savings--blocks .wc-block-components-totals-item__value { color: #15803d; font-weight: 600; }
