/* BikeSense PDP stock chrome — keep a single status visible. */

/* Hide native Woo stock when the custom box is present (avoids duplicate OOS / backorder lines). */
body.single-product div.product .bs-pdp-stock ~ p.stock,
body.single-product div.product p.stock.available-on-backorder,
body.single-product div.product p.stock.out-of-stock,
body.single-product .bs-pdp-cart p.stock,
body.single-product .bs-pdp-cart .stock {
	display: none !important;
}

/*
 * Backorder: restyle the custom box that ships as --out so shoppers never see
 * red "Out of stock" next to Woo "Ship from supplier" — even before JS runs.
 */
body.single-product div.product.onbackorder .bs-pdp-stock--out,
body.single-product div.product .bs-pdp-stock.bs-pdp-stock--bo {
	display: flex !important;
	visibility: visible !important;
	color: inherit;
}

/* Pre-JS fallback: restyle the shipped --out box on backorder PDPs. */
body.single-product div.product.onbackorder .bs-pdp-stock--out strong {
	color: #8a5a00 !important;
	font-size: 0 !important;
}

body.single-product div.product.onbackorder .bs-pdp-stock--out strong::after {
	content: "Ship from supplier";
	font-size: 14px;
	font-weight: 700;
	color: #8a5a00;
}

body.single-product div.product.onbackorder .bs-pdp-stock--out span {
	font-size: 0 !important;
}

body.single-product div.product.onbackorder .bs-pdp-stock--out span::after {
	content: "We order it from our supplier after payment and confirm your delivery date. Delivery is 3–7 working days from when the part reaches us.";
	font-size: 14px;
	color: var(--bs-muted, #4a535c);
}

/* After JS flip to --bo, use real text (no ::after duplication). */
body.single-product .bs-pdp-stock--bo strong {
	color: #8a5a00 !important;
}

.bs-avail.is-bo,
.bs-rel-stock.is-bo {
	color: #8a5a00;
}

/* Archive loop label */
li.product.onbackorder .fusion-price-rating::after {
	content: "Ship from supplier";
	display: block;
	font-size: 12px;
	line-height: 1.4;
	color: #8a5a00;
	margin-top: 4px;
}

/* Variable products: supplier tint on variation availability */
.woocommerce-variation-availability p.stock.available-on-backorder {
	color: #8a5a00;
}

div.product .bs-pdp-stock.bs-var-set {
	visibility: visible;
}

.product.bs-var-oos .bs-pjn-prod,
.product.bs-var-oos .woocommerce-variation-add-to-cart {
	display: none !important;
}
