/* BLD OOS Overlay 1.0.0: "Out Of Stock!" overlay on product cards.
   Server adds .bld-oos-card + the overlay markup only for products that are completely out of stock;
   the script moves the overlay into .product-image-wrap and adds .bld-oos-ready (no JS = no change).
   Choice: the product IMAGE is blurred/greyed like the reference; badges (SALE, Bundle) stay crisp and the
   name / price / description stay readable (greyed, not blurred). */

.bld-oos-overlay { display: none; }

body .products li.product.bld-oos-ready .product-image-wrap > .bld-oos-overlay {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 12px;
	box-sizing: border-box;
	background: rgba(236, 240, 246, 0.42);
	pointer-events: none; /* the blurred image underneath stays a link to the product */
	font-family: inherit;
	text-align: center;
}

/* Image: blurred + greyed. Scale hides the soft blurred edge inside overflow:hidden. */
body .products li.product.bld-oos-ready .product-image-wrap > a img {
	filter: blur(5px) grayscale(0.85) !important;
	opacity: 0.8 !important;
	transform: scale(1.06);
	transition: none !important;
}
/* Keep the SALE / Bundle badges crisp and above the tint. */
body .products li.product.bld-oos-ready .bld-card-tools { z-index: 5 !important; }
body .products li.product.bld-oos-ready .onsale { z-index: 5 !important; }
/* The theme's own small "Out of stock" chip would duplicate the pill. */
body .products li.product.bld-oos-ready .bld-card-stock { display: none !important; }

/* Details: greyed but readable. */
body .products li.product.bld-oos-ready .product-meta { filter: grayscale(1); opacity: 0.72; }
body .products li.product.bld-oos-ready .product-add-to-cart { filter: grayscale(1); opacity: 0.8; }

body .products li.product.bld-oos-ready .bld-oos-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 24px;
	border-radius: 12px;
	background: #fff;
	color: #0f1b2d;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0;
	box-shadow: 0 6px 18px rgba(15, 27, 45, 0.14);
	white-space: nowrap;
}

body .products li.product.bld-oos-ready .bld-oos-notify {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	max-width: 100%;
	padding: 10px 20px;
	box-sizing: border-box;
	border: 0;
	border-radius: 12px;
	background: #087cf0;
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none !important;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: 0 6px 16px rgba(8, 124, 240, 0.28);
	pointer-events: auto;
	transition: background-color .15s ease, box-shadow .15s ease;
}
body .products li.product.bld-oos-ready .bld-oos-notify:hover,
body .products li.product.bld-oos-ready .bld-oos-notify:focus { background: #066ad0; color: #fff !important; }
body .products li.product.bld-oos-ready .bld-oos-notify:focus-visible { outline: 3px solid #0f1b2d; outline-offset: 2px; }

/* Narrow cards (Salient phone breakpoint; also the bld-mobile-cards 4:3 homepage cards). */
@media only screen and (max-width: 690px) {
	body .products li.product.bld-oos-ready .product-image-wrap > .bld-oos-overlay { gap: 6px; padding: 8px; }
	body .products li.product.bld-oos-ready .bld-oos-pill { padding: 6px 12px; border-radius: 9px; font-size: 12px; }
	body .products li.product.bld-oos-ready .bld-oos-notify {
		min-height: 34px;
		padding: 6px 10px;
		border-radius: 9px;
		font-size: 11px;
		white-space: nowrap;
	}
	/* Invisible hit area: the tap target stays at least 44px tall. */
	body .products li.product.bld-oos-ready .bld-oos-notify::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		top: -5px;
		bottom: -5px;
	}
	body .products li.product.bld-oos-ready .product-image-wrap > a img { filter: blur(4px) grayscale(0.85) !important; }
}

@media (prefers-reduced-motion: reduce) {
	body .products li.product.bld-oos-ready .bld-oos-notify { transition: none; }
}
