/**
 * Stock status colours + single-product language switcher.
 *
 * These rules were originally appended to blocks/smartland-product-card/style.css.
 * That file is served with `cache-control: max-age=31557600`, and LiteSpeed's
 * combined bundle keeps the same filename when a stylesheet's contents change,
 * so browsers that had already loaded the old copy kept it and never saw the
 * edits. Living in a filename that has never existed before guarantees a fetch.
 *
 * Colours are hard-coded rather than using the --sl-* custom properties, so
 * this file does not depend on a fresh copy of the other stylesheet either.
 */

/* ── Product cards ──────────────────────────────────────────────── */

.sl-stock--in {
	color: #3e8e40;
}

.sl-stock--out {
	color: #e02020;
}

.sl-stock--backorder {
	color: #f48222;
}

/* ── Single product page stock line ─────────────────────────────────
 * Different element from the card badge:
 *   <p class="stock available-on-backorder wd-style-bordered"><span>…</span></p>
 * Woodmart gives backorder the same green border and dot as in-stock, so it
 * reads as available. Match the cards. Out of stock is already red.
 */

p.stock.available-on-backorder,
p.stock.available-on-backorder span {
	color: #f48222;
}

/* Clears the green !important rule in Woodmart Theme Settings → Custom CSS. */
body p.stock.wd-style-default.available-on-backorder {
	color: #f48222 !important;
}

p.stock.wd-style-bordered.available-on-backorder span {
	border-color: #f48222;
}

p.stock.wd-style-bordered.available-on-backorder span:before,
p.stock.wd-style-with-bg.available-on-backorder span:before {
	background-color: #f48222;
}

p.stock.wd-style-with-bg.available-on-backorder span {
	background-color: #fdf1e6;
}

/* ── Language switcher ──────────────────────────────────────────────
 * Rendered by [smartland_language_switcher] in the breadcrumb row.
 */

.sl-lang-switcher {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex-shrink: 0;
	padding: 3px;
	background: #f2f4f6;
	border-radius: 999px;
}

.sl-lang {
	display: inline-block;
	padding: 5px 14px;
	border-radius: 999px;
	color: #555;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .2s ease, color .2s ease;
}

.sl-lang:hover {
	color: #28b9de;
	text-decoration: none;
}

.sl-lang--active,
.sl-lang--active:hover {
	background: #28b9de;
	color: #fff;
}

/* The breadcrumb row is justify:space-between; without this the switcher
   lands in the middle on desktop instead of beside the prev/next nav. */
.single-product .wp-block-wd-container > .sl-lang-switcher {
	margin-inline-start: auto;
}

@media (max-width: 768.98px) {
	.sl-lang {
		padding: 4px 11px;
		font-size: 12px;
	}
}
