/**
 * Product card - every product grid (shop, categories, attribute archives,
 * related / upsell rails).
 *
 * Direction: subtraction. White card, one hairline, packshot on the light
 * plate, ink price, and the orange reserved for the single primary action.
 *
 * Woodmart prints its loop CSS as <link> tags inside <body>, after this file,
 * so every rule is scoped under a prefix that out-ranks Woodmart's own
 * selectors instead of relying on source order:
 *
 *   .wd-products .wd-product.wd-product.product   (0,4,0)
 *
 * The doubled class is deliberate. Only the site's legacy custom CSS forced
 * !important onto the SKU label, so that one rule answers in kind.
 *
 * Height contract - every card in a row has the same boxes at the same size:
 *   plate    aspect-ratio 1/1
 *   SKU      22px a line (14px model number); a long model wraps to a
 *            second line, and only that row of cards grows
 *   title    exactly 2 lines, reserved even for a 1-line title
 *   meta     20px - stock (start) + rating (end, optional)
 *   chips    26px, reserved even when a product has none
 *   price    52px narrow (2 rows) / 26px wide (1 row), sale or not
 *   button   44px
 */

/* ---------------------------------------------------------------------------
 * Grid
 * ------------------------------------------------------------------------ */

/* Cards in a row stretch to the tallest, so the bottom zone can be pinned. */
.wd-products.elements-grid { align-items: stretch; }

/* Four across on desktop (~240px cards beside the filter sidebar) is the
   products_columns option (al-card.php), so the grid switcher can change it;
   three on small laptops and tablets; two on phones. The widget prints
   --wd-col-* as inline styles, which only !important answers. */
@media (min-width: 1025px) and (max-width: 1199.98px) {
	/* Small laptops: four would be ~190px cards; a chosen 2 or 3 stays. */
	.wd-products.elements-grid.grid-columns-4[data-source="main_loop"] {
		--wd-col-lg: 3 !important;
	}
}
@media (max-width: 768.98px) {
	.wd-products.elements-grid[data-source="main_loop"] {
		--wd-col-sm: 3 !important;
		--wd-gap-sm: var(--al-s-3) !important;
	}
}
@media (max-width: 576.98px) {
	.wd-products.elements-grid[data-source="main_loop"] {
		--wd-col-sm: 2 !important;
	}
	/* The grid sat 35px from each screen edge (three nested paddings), leaving
	   146px cards that clipped half the titles. One 12px gutter instead. */
	:is(.e-con, .elementor-element):has(> .e-con-inner .wd-products[data-source="main_loop"], > .elementor-widget-container .wd-products[data-source="main_loop"]) {
		padding-inline: 0;
	}
	.wd-content-layout:has(.wd-products[data-source="main_loop"]) {
		padding-inline: var(--al-s-3);
	}
	/* The column holding the product grid stacks as blocks, not flex. As a
	   flex column it sized the grid from a measuring pass in which the
	   cards' container queries (below) came out ~22px shorter a row, so the
	   category text under the grid rode up over the last row (Chromium and
	   WebKit alike, 2026-09-25). Same 20px between the pieces. */
	.e-con:has(> .elementor-widget .wd-products[data-source="main_loop"]) {
		display: block;
	}
	.e-con:has(> .elementor-widget .wd-products[data-source="main_loop"]) > :not(:first-child) {
		margin-block-start: var(--row-gap, 20px);
	}
}

/* ---------------------------------------------------------------------------
 * Card shell
 * ------------------------------------------------------------------------ */

/* FlyingPress "lazy render" puts content-visibility: auto and a placeholder
   height measured on desktop (contain-intrinsic-size: auto 508px) on card
   parts below the fold, as inline styles. In a phone carousel the cards
   scrolled out of view sideways never render, keep the 508px, and the strip
   stretches every card to it: 526px cards with an empty middle (Raz,
   2026-10-05). Cards are cheap to render; let them size by their content. */
.wd-products .wd-product.wd-product.product :is(.wd-product-wrapper, .product-element-bottom) {
	content-visibility: visible !important;
	contain-intrinsic-size: none !important;
}

.wd-products .wd-product.wd-product.product {
	--text-align: start;
	--wd-prod-gap: var(--al-s-2);
	--wd-prod-bg-sp: var(--al-s-3);
	--wd-prod-bg: var(--al-bg);
	--wd-prod-shadow: none;
	--wd-bordered-brd: var(--al-line);
	--wd-brd-radius: var(--al-r-lg);
	--btn-accented-height: 44px;
	display: flex;
	flex-direction: column;
	font-size: var(--al-fs-sm);
	line-height: 1.4;
	text-align: start;
}

.wd-products .wd-product.wd-product.product .wd-product-wrapper {
	flex: 1 1 auto;
	gap: var(--al-s-3);
	border: 1px solid var(--al-line);
	border-radius: var(--al-r-lg);
	background-color: var(--al-bg);
	box-shadow: none;
}

/* The hover surface Woodmart fades in behind the card (it also carries the
   spec table that drops below). Same shape as the card, the token lift. */
.wd-products .wd-product.wd-product.product .wd-product-card-bg {
	border: 1px solid var(--al-line);
	border-radius: var(--al-r-lg);
	background-color: var(--al-bg);
	box-shadow: var(--al-sh-2);
}
.wd-products .wd-hover-with-fade.wd-product.product.hover-ready:hover .wd-product-wrapper,
.wd-products .wd-hover-with-fade.wd-product.product.hover-ready.state-hover .wd-product-wrapper {
	transform: translateY(-3px) translateZ(0);
}

/* ---------------------------------------------------------------------------
 * Image plate
 * ------------------------------------------------------------------------ */

.wd-products .wd-product.wd-product.product .wd-product-thumb {
	order: 1;
	position: relative;
	aspect-ratio: 1 / 1;
	inline-size: 100%;
	border-radius: var(--al-r-md);
	background-color: var(--al-plate);
}

.wd-products .wd-product.wd-product.product :is(.wd-product-img-link, .wd-product-img-hover) {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	block-size: 100%;
	padding: var(--al-s-3);
}
.wd-products .wd-product.wd-product.product .wd-product-img-hover {
	background-color: var(--al-plate);
}

.wd-products .wd-product.wd-product.product :is(.wd-product-img-link, .wd-product-img-hover) :is(img, picture) {
	inline-size: 100%;
	block-size: 100%;
	max-block-size: 100%;
	object-fit: contain;
	/* Packshots are shot on white. Multiply drops the white box into the plate
	   and leaves black/silver hardware untouched. */
	mix-blend-mode: multiply;
}

/* Out of stock: the photo steps back, the stock pill says why. */
.wd-products .wd-product.wd-product.product.outofstock :is(.wd-product-img-link, .wd-product-img-hover) :is(img, picture) {
	opacity: .5;
	filter: grayscale(1);
}

/* Woodmart's floating action buttons (quick view / compare / wishlist). */
.wd-products .wd-product.wd-product.product .wd-buttons {
	border-radius: var(--al-r-md);
	box-shadow: var(--al-sh-1);
}

/* ---------------------------------------------------------------------------
 * SKU - model number under the image
 * ------------------------------------------------------------------------ */

/* Positioned: the template prints the row before Woodmart's absolute hover
   surface (.wd-product-card-bg), which would otherwise paint over it. */
.wd-products .wd-product.wd-product.product .wd-product-sku {
	order: 2;
	position: relative;
	display: flex;
	gap: var(--al-s-1);
	justify-content: flex-start;
	min-block-size: 22px;
	margin: 0;
	overflow: hidden;
	color: var(--al-ink-3);
	font-size: var(--al-fs-sm);
	font-weight: 400;
	line-height: 22px;
	text-align: start;
	white-space: nowrap;
}
.wd-products .wd-product.wd-product.product .wd-product-sku :is(.wd-label, a) {
	color: var(--al-ink-3) !important; /* answers the legacy orange !important */
	font-weight: 400;
	text-decoration: none;
}
/* The model number itself: isolated like <bdi>, so "NB P6 New" never
   reorders inside Hebrew. It is what shoppers search by: ink-2, semibold.
   Never cut: a long one wraps beside the label (after a hyphen or space,
   mid-string only when a piece is wider than the card), and its lines keep
   to the label's side. */
.wd-products .wd-product.wd-product.product .wd-product-sku > span:not(.wd-label) {
	min-inline-size: 0;
	overflow-wrap: anywhere;
	white-space: normal;
}
.wd-products .wd-product.wd-product.product .wd-product-sku > span:not(.wd-label) a {
	color: var(--al-ink-2) !important;
	font-weight: 600;
	unicode-bidi: plaintext;
}

/* A product saved without a SKU prints no SKU row: keep its slot, so the
   title never rides 30px above its neighbours. */
.wd-products .wd-product.wd-product.product .wd-product-wrapper:not(:has(> .wd-product-sku)) > .product-element-bottom {
	margin-block-start: calc(22px + var(--al-s-3));
}

/* ---------------------------------------------------------------------------
 * Text block - a grid, so optional pieces never shift the rows below them
 * ------------------------------------------------------------------------ */

.wd-products .wd-product.wd-product.product .product-element-bottom {
	order: 3;
	flex: 1 1 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto 20px 1fr auto auto;
	gap: var(--al-s-2);
}
.wd-products .wd-product.wd-product.product .product-element-bottom > * {
	grid-column: 1 / -1;
	margin: 0;
}

/* Title: exactly two lines, reserved even when the name fits in one. */
.wd-products .wd-product.wd-product.product .wd-entities-title {
	--wd-line-height: 1.35em;
	grid-row: 1;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	block-size: calc(2 * 1.35em);
	max-height: none;
	margin: 0;
	color: var(--al-ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	text-align: start;
	letter-spacing: 0;
}
.wd-products .wd-product.wd-product.product .wd-entities-title a {
	color: inherit;
}

/* Meta row: stock at the start, stars (when there are any) at the end. */
.wd-products .wd-product.wd-product.product p.wd-product-stock {
	grid-row: 2;
	grid-column: 1;
	justify-self: start;
	align-self: center;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	box-sizing: border-box;
	block-size: 20px;
	margin: 0;
	color: var(--al-stock-in-ink);
	font-size: var(--al-fs-xs);
	font-weight: 600;
	line-height: 20px;
	white-space: nowrap;
}
.wd-products .wd-product.wd-product.product p.wd-product-stock::before {
	content: "";
	flex: 0 0 auto;
	inline-size: 6px;
	block-size: 6px;
	margin: 0;
	border-radius: 50%;
	background-color: var(--al-stock-in-ink);
	font-family: inherit;
}
.wd-products .wd-product.wd-product.product p.wd-product-stock.available-on-backorder {
	color: var(--al-ink-2);
}
.wd-products .wd-product.wd-product.product p.wd-product-stock.available-on-backorder::before {
	background-color: var(--al-ink-3);
}
/* Sold out: a red pill (Raz, 2026-09-27); the button says it too (al-card.php). */
.wd-products .wd-product.wd-product.product p.wd-product-stock.out-of-stock {
	padding-inline: 10px;
	border: 1px solid transparent;
	border-radius: var(--al-r-pill);
	background-color: var(--al-stock-out-bg);
	color: var(--al-stock-out-ink);
	line-height: 18px;
}
.wd-products .wd-product.wd-product.product p.wd-product-stock.out-of-stock::before {
	content: none;
}

.wd-products .wd-product.wd-product.product .product-element-bottom > :is(.star-rating, .wd-star-rating) {
	grid-row: 2;
	grid-column: 2;
	align-self: center;
	justify-self: end;
	font-size: var(--al-fs-xs);
	letter-spacing: 1px;
}

/* A narrow card cannot fit the out-of-stock pill and five stars on one line:
   the stock state wins. */
.wd-products .wd-product.wd-product.product .product-element-bottom {
	container-type: inline-size;
}
@container (max-width: 229.98px) {
	.wd-products .wd-product.wd-product.product.outofstock .product-element-bottom > :is(.star-rating, .wd-star-rating) {
		display: none;
	}
}
/* A 94px card (280px screen) cannot fit even "במלאי" beside them. */
@container (max-width: 113.98px) {
	.wd-products .wd-product.wd-product.product .product-element-bottom > :is(.star-rating, .wd-star-rating) {
		display: none;
	}
}

/* Price zone: chip row, then the price row. Both locked. */
.wd-products .wd-product.wd-product.product .wrap-price {
	grid-row: 4;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: 26px auto;
	gap: var(--al-s-2);
	justify-content: stretch;
	align-items: stretch;
	margin: 0;
	container-type: inline-size;
}
.wd-products .wd-product.wd-product.product .wrap-price > .al-chips {
	grid-row: 1;
	margin: 0;
}
/* Chip row, card context. al-chips.css caps BOTH the <li> and its <a> at 48%,
   which nests to ~23% and clips the pill; here the cap sits on the <li> only. */
.wd-products .wd-product.wd-product.product .wrap-price > .al-chips--card {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 6px;
	block-size: 26px;
	overflow: hidden;
}
.wd-products .wd-product.wd-product.product .al-chips--card > .al-chip {
	display: block;
	margin: 0; /* theme list spacing gives every li but the last a bottom margin */
	flex: 0 1 auto;
	box-sizing: border-box;
	min-inline-size: 0;
	max-inline-size: 100%;
	block-size: 26px;
	overflow: hidden;
	line-height: 24px;
	text-overflow: ellipsis;
	white-space: nowrap;
}
/* Sized by content: the first chip (the highest priority - a כרטיס שיווקי
   when there is one) keeps its full text; the second yields the space. */
.wd-products .wd-product.wd-product.product .al-chips--card > .al-chip:first-child {
	flex: 0 0 auto;
	max-inline-size: 100%;
}
/* On a card, feature chips are neutral facts; only the promo card keeps the
   orange tint, and the saving pill below reads as price information. */
.wd-products .wd-product.wd-product.product .al-chips--card > .al-chip--link:not(.al-chip--promo) > a {
	border-color: var(--al-line);
	background: var(--al-surface);
	color: var(--al-ink-2);
}
.wd-products .wd-product.wd-product.product .al-chips--card > .al-chip--link:not(.al-chip--promo) > a:is(:hover, :focus-visible) {
	border-color: var(--al-ink-3);
	background: var(--al-surface);
	color: var(--al-ink);
}
.wd-products .wd-product.wd-product.product .al-chips--card > .al-chip:not(.al-chip--link) {
	padding-block: 0;
	padding-inline: 10px;
}
.wd-products .wd-product.wd-product.product .al-chips--card > .al-chip--link > a {
	display: block;
	box-sizing: border-box;
	max-inline-size: 100%;
	block-size: 26px;
	padding-block: 0;
	padding-inline: 10px;
	overflow: hidden;
	line-height: 24px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wd-products .wd-product.wd-product.product .wrap-price > .price {
	grid-row: 2;
}
.wd-products .wd-product.wd-product.product .wrap-price > .wd-swatches-grid {
	grid-row: 3;
}

.wd-products .wd-product.wd-product.product .add-to-cart-loop,
.wd-products .wd-product.wd-product.product .wd-add-btn {
	grid-row: 5;
}

/* The fade-in spec table lives outside the grid flow. */
.wd-products .wd-product.wd-product.product .wd-product-card-hover {
	grid-row: auto;
}

/* ---------------------------------------------------------------------------
 * Price
 *   narrow card:  ₪229 ~~₪299~~        wide card:  ₪229 ~~₪299~~ [חיסכון ₪70]
 *                 [חיסכון ₪70]
 * Digits are ink. There is no sale red, and no orange price.
 * ------------------------------------------------------------------------ */

.wd-products .wd-product.wd-product.product .price {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	align-content: flex-start;
	column-gap: var(--al-s-2);
	row-gap: 0;
	block-size: 52px;
	margin: 0;
	overflow: hidden;
	color: var(--al-price);
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 26px;
	text-transform: none;
	white-space: nowrap;
}
.wd-products .wd-product.wd-product.product .price:hover {
	color: var(--al-price);
}
.wd-products .wd-product.wd-product.product .price .amount {
	color: inherit;
	font-weight: inherit;
}

.wd-products .wd-product.wd-product.product .price > * { order: 2; }
.wd-products .wd-product.wd-product.product .price > :is(ins, .amount, .al-price-from) { order: 1; }
.wd-products .wd-product.wd-product.product .price::before {
	content: "";
	order: 3;
	flex: 0 0 100%;
	block-size: 0;
}
.wd-products .wd-product.wd-product.product .price > .al-save { order: 4; margin-block-start: 4px; }

.wd-products .wd-product.wd-product.product .price ins {
	padding: 0;
	background: none;
	color: var(--al-price);
	text-decoration: none;
}

.wd-products .wd-product.wd-product.product .price > del {
	color: var(--al-price-was);
	font-size: var(--al-fs-xs);
	font-weight: 400;
	text-decoration: line-through;
	text-decoration-thickness: 1px;
	opacity: 1;
}

/* Non-sale cards carry an invisible old price so both kinds share a box. */
.wd-products .wd-product.wd-product.product .price > del.al-price-ph {
	visibility: hidden;
}

.wd-products .wd-product.wd-product.product .al-price-from {
	color: var(--al-ink-2);
	font-size: var(--al-fs-xs);
	font-weight: 600;
}

.wd-products .wd-product.wd-product.product .al-save {
	display: inline-flex;
	align-items: center;
	gap: var(--al-s-1);
	box-sizing: border-box;
	block-size: 22px;
	padding-inline: 8px;
	border: 1px solid var(--al-save-brd);
	border-radius: var(--al-r-pill);
	background-color: var(--al-save-bg);
	color: var(--al-save-ink);
	font-size: var(--al-fs-xs);
	font-weight: 600;
	line-height: 1;
}
/* Out of stock: nothing to buy, so the saving steps back to neutral too. */
.wd-products .wd-product.wd-product.product.outofstock .al-save {
	border-color: var(--al-line);
	background-color: var(--al-surface);
	color: var(--al-ink-3);
}
.wd-products .wd-product.wd-product.product .al-save .amount {
	color: inherit;
	font-weight: inherit;
}

/* A ~130px phone card cannot show two readable chips side by side: it shows
   the first (highest-priority) chip at full width instead of two stubs. */
@container (max-width: 229.98px) {
	.wd-products .wd-product.wd-product.product .al-chips--card > .al-chip:nth-child(n+2) {
		display: none;
	}
	.wd-products .wd-product.wd-product.product .al-chips--card > .al-chip {
		max-inline-size: 100%;
	}
	/* The struck old price already says "sale"; a second line just for the
	   pill left every non-sale phone card with a blank row. One line for all. */
	.wd-products .wd-product.wd-product.product .price {
		block-size: 26px;
	}
	.wd-products .wd-product.wd-product.product .price::before,
	.wd-products .wd-product.wd-product.product .price > .al-save {
		display: none;
	}
}

@container (min-width: 230px) {
	.wd-products .wd-product.wd-product.product .price {
		block-size: 26px;
		font-size: 18px;
	}
	.wd-products .wd-product.wd-product.product .price::before {
		display: none;
	}
	.wd-products .wd-product.wd-product.product .price > .al-save {
		margin-block-start: 0;
	}
}

/* ---------------------------------------------------------------------------
 * Add to cart / select options - orange fill, ink label, 44px target
 * ------------------------------------------------------------------------ */

.wd-products .wd-product.wd-product.product .wd-add-btn > a {
	min-block-size: 44px;
	border-radius: var(--al-r-md);
	background-color: var(--al-orange);
	color: var(--al-ink);
	box-shadow: none;
	font-size: var(--al-fs-sm);
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	transition: background-color var(--al-t-fast) var(--al-ease);
}
.wd-products .wd-product.wd-product.product .wd-add-btn > a:is(:hover, :focus-visible) {
	background-color: var(--al-orange-hover);
	color: var(--al-ink);
}
.wd-products .wd-product.wd-product.product .wd-add-btn > a:active {
	background-color: var(--al-orange-active);
}
.wd-products .wd-product.wd-product.product .wd-add-btn .wd-action-text {
	min-block-size: 44px;
	padding-inline: var(--al-s-3);
	color: var(--al-ink);
	font-size: var(--al-fs-sm);
	font-weight: 600;
	line-height: 44px;
}
.wd-products .wd-product.wd-product.product .wd-add-btn .wd-action-icon {
	color: var(--al-ink);
	font-size: 16px; /* was set by Theme Settings → Custom CSS until 2026-09-25 */
}

/* Out of stock: "read more" is not a purchase, so it drops to the neutral
   button - one orange action per region, and this card has none. */
.wd-products .wd-product.wd-product.product.outofstock .wd-add-btn > a {
	box-shadow: inset 0 0 0 1px var(--al-line); /* a border would add 2px */
	background-color: var(--al-surface);
}
.wd-products .wd-product.wd-product.product.outofstock .wd-add-btn > a:is(:hover, :focus-visible) {
	background-color: var(--al-line-soft);
}
/* ...and on hover an info icon and "פרטים נוספים" slide in, not the cart
   (al-card.php). */
.wd-products .wd-product.wd-product.product .wd-add-btn .wd-action-icon.al-card-more {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: var(--al-fs-sm);
	font-weight: 600;
}
.wd-products .wd-product.wd-product.product .wd-add-btn .wd-action-icon.al-card-more::before {
	content: none;
}
.wd-products .wd-product.wd-product.product .wd-add-btn .al-card-more svg {
	flex: none;
	inline-size: 18px;
	block-size: 18px;
}

/* ---------------------------------------------------------------------------
 * Quantity stepper - for buyers ordering multiples (switched on in
 * al-card.php). [− 1 +] sits beside the button, in the form style, inside
 * the same 44px row, so rows never grow. Cards without one (variable parents,
 * out of stock, sold individually) keep the full-width button.
 * ------------------------------------------------------------------------ */

.wd-products .wd-product.wd-product.product .wd-add-btn:has(> div.quantity:not(.hidden)) {
	display: flex;
	gap: var(--al-s-2);
}
.wd-products .wd-product.wd-product.product .wd-add-btn > div.quantity {
	flex: 0 0 auto;
}
.wd-products .wd-product.wd-product.product .wd-add-btn > div.quantity .btn {
	min-inline-size: 32px;
}
.wd-products .wd-product.wd-product.product .wd-add-btn > div.quantity input.qty {
	inline-size: 36px;
	padding: 0;
}
/* The field's focus ring would sit under the "+" beside it. */
.wd-products .wd-product.wd-product.product .wd-add-btn > div.quantity input.qty:focus-visible {
	position: relative;
	z-index: 1;
}
.wd-products .wd-product.wd-product.product .wd-add-btn:has(> div.quantity:not(.hidden)) > a {
	flex: 1 1 0;
	min-inline-size: 0;
}

/* A card under 192px (desktop grids at 1200–1365px, tablets, phones) cannot
   fit the 100px stepper beside the 84px label: the two share the row half and
   half instead, the stepper parts at least 24px wide. "הוספה לסל" (71px with
   the tighter padding) still fits down to a 150px card. */
@container (max-width: 191.98px) {
	.wd-products .wd-product.wd-product.product .wd-add-btn:has(> div.quantity:not(.hidden)) {
		gap: 6px;
	}
	.wd-products .wd-product.wd-product.product .wd-add-btn > div.quantity {
		flex: 1 1 0;
		min-inline-size: 72px; /* 3 × 24px */
	}
	.wd-products .wd-product.wd-product.product .wd-add-btn > div.quantity :is(.btn, input.qty) {
		flex: 1 1 0;
		min-inline-size: 24px;
		inline-size: auto;
	}
	.wd-products .wd-product.wd-product.product .wd-add-btn:has(> div.quantity:not(.hidden)) > a .wd-action-text {
		padding-inline: 6px;
	}
}

/* Phones (touch) and any card under 150px: the button becomes a 44px cart
   icon - its aria-label still names the product - so the stepper gets the
   room fingers need (30px+ parts on a 360px phone). A 320px screen narrows
   the icon to 36px to keep the parts at 24px. The same three rules twice:
   a container size and a pointer type cannot share one condition. */
@container (max-width: 191.98px) {
	@media (pointer: coarse) {
		.wd-products .wd-product.wd-product.product .wd-add-btn:has(> div.quantity:not(.hidden)) > a {
			flex: 0 1 44px;
			min-inline-size: 36px;
		}
		.wd-products .wd-product.wd-product.product .wd-add-btn:has(> div.quantity:not(.hidden)) > a .wd-action-text {
			visibility: hidden;
		}
		.wd-products .wd-product.wd-product.product .wd-add-btn:has(> div.quantity:not(.hidden)) > a .wd-action-icon {
			transform: none;
		}
	}
}
@container (max-width: 149.98px) {
	.wd-products .wd-product.wd-product.product .wd-add-btn:has(> div.quantity:not(.hidden)) > a {
		flex: 0 1 44px;
		min-inline-size: 36px;
	}
	.wd-products .wd-product.wd-product.product .wd-add-btn:has(> div.quantity:not(.hidden)) > a .wd-action-text {
		visibility: hidden;
	}
	.wd-products .wd-product.wd-product.product .wd-add-btn:has(> div.quantity:not(.hidden)) > a .wd-action-icon {
		transform: none;
	}
}

/* A sold-out card under 150px (the home page carousel on a 320px phone):
   "אזל מהמלאי" takes the smaller size, so it is not cut. */
@container (max-width: 149.98px) {
	.wd-products .wd-product.wd-product.product.outofstock .wd-add-btn > a :is(.wd-action-text, .al-card-more) {
		padding-inline: 6px;
		font-size: var(--al-fs-xs);
	}
	.wd-products .wd-product.wd-product.product .wd-add-btn .al-card-more {
		gap: 4px;
	}
	.wd-products .wd-product.wd-product.product .wd-add-btn .al-card-more svg {
		inline-size: 14px;
		block-size: 14px;
	}
}

/* Under 114px (a 280px cover screen) four targets of 24px+ no longer fit in
   one row: the −/+ step aside and the field (type the number) sits beside
   the 44px icon, so the row, and the card, keep their height. */
@container (max-width: 113.98px) {
	.wd-products .wd-product.wd-product.product .wd-add-btn > div.quantity {
		min-inline-size: 0;
	}
	.wd-products .wd-product.wd-product.product .wd-add-btn > div.quantity .btn {
		display: none;
	}
	.wd-products .wd-product.wd-product.product .wd-add-btn > div.quantity input.qty {
		border-inline: var(--wd-form-brd-width) solid var(--wd-form-brd-color);
		border-radius: var(--btn-accented-brd-radius);
	}
	.wd-products .wd-product.wd-product.product .wd-add-btn:has(> div.quantity:not(.hidden)) > a {
		flex: 0 0 44px;
	}
}

/* ---------------------------------------------------------------------------
 * Woodmart product labels (sale %, out of stock, new, hot). Cards print only
 * the custom labels (al_card_custom_labels() in al-card.php, styled in
 * Woodmart's label editor), but other loops and quick view can print these:
 * no sale red, no white text on orange/yellow.
 * ------------------------------------------------------------------------ */

.wd-product .product-labels .product-label {
	min-block-size: 22px;
	padding-inline: 8px;
	border: 1px solid var(--al-line);
	border-radius: var(--al-r-pill);
	background-color: var(--al-bg);
	color: var(--al-ink);
	font-size: var(--al-fs-xs);
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}
.wd-product .product-labels .product-label.onsale {
	border-color: var(--al-save-brd);
	background-color: var(--al-save-bg);
	color: var(--al-save-ink);
}
.wd-product .product-labels .product-label.out-of-stock {
	background-color: var(--al-stock-out-bg);
	color: var(--al-stock-out-ink);
}

/* Custom labels (al_card_custom_labels()) keep the look set in Woodmart's
   label editor; two guards for narrow pictures. The picture is measured
   as a container. */
.wd-products .wd-product.wd-product.product .wd-product-thumb {
	container: al-thumb / inline-size;
}
.al-card-labels {
	transition: opacity var(--al-t-fast) var(--al-ease);
}
/* Under ~130px (two columns at 320) a label wrapped to two lines and hid a
   third of the photo: one line, at 80%, from the label's corner (the
   inline-start top: right, the site is RTL). */
@container al-thumb (max-width: 129.98px) {
	.al-card-labels {
		scale: 0.8; /* not transform: Woodmart sets its own on .product-labels */
		transform-origin: top right;
	}
	.al-card-labels .wd-custom-label {
		white-space: nowrap;
	}
}
@container al-thumb (max-width: 99.98px) {
	.al-card-labels {
		scale: 0.65; /* the 82-90px pictures of the home carousels at 320 */
	}
}
/* Under ~180px (desktop carousels near 1025px) the quick view and compare
   buttons slide in over the label on hover: the label steps aside then. */
@media (hover: hover) {
	@container al-thumb (max-width: 179.98px) {
		.wd-product:hover .al-card-labels,
		.wd-product:focus-within .al-card-labels {
			opacity: 0;
		}
	}
}

/* ---------------------------------------------------------------------------
 * Phones: two columns of ~170px
 * ------------------------------------------------------------------------ */

@media (max-width: 768.98px) {
	.wd-products .wd-product.wd-product.product {
		--wd-prod-bg-sp: var(--al-s-2);
	}
	.wd-products .wd-product.wd-product.product .wd-product-wrapper {
		gap: var(--al-s-2);
		border-radius: var(--al-r-md);
	}
	.wd-products .wd-product.wd-product.product .wd-product-card-bg {
		border-radius: var(--al-r-md);
	}
	.wd-products .wd-product.wd-product.product .wd-product-thumb {
		border-radius: var(--al-r-sm);
	}
	.wd-products .wd-product.wd-product.product :is(.wd-product-img-link, .wd-product-img-hover) {
		padding: var(--al-s-2);
	}
	.wd-products .wd-product.wd-product.product .wd-entities-title {
		font-size: var(--al-fs-sm);
	}
	.wd-products .wd-product.wd-product.product .product-element-bottom {
		gap: 6px;
	}
	.wd-products .wd-product.wd-product.product .wrap-price {
		gap: 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wd-products .wd-hover-with-fade.wd-product.product.hover-ready:hover .wd-product-wrapper,
	.wd-products .wd-hover-with-fade.wd-product.product.hover-ready.state-hover .wd-product-wrapper {
		transform: none;
	}
}

/* Warning cards (al-fit.php; typed in the product's "אודיו ליין" tab): an
   amber surface with an edge on the start side, the icon and a bold lead;
   the text itself in ink. They follow the short description on the product
   page and in Woodmart's quick view, which opens on any page with cards, so
   they live here and not in al-pdp.css. */
.woocommerce-product-details__short-description .al-warn {
	display: flex;
	align-items: flex-start;
	gap: var(--al-s-3);
	margin-block: var(--al-s-4);
	padding: var(--al-s-3) var(--al-s-4);
	border-inline-start: 3px solid var(--al-warn-edge);
	border-radius: var(--al-r-sm);
	background: var(--al-warn-bg);
	color: var(--al-ink);
	line-height: 1.55;
}
.woocommerce-product-details__short-description .al-warn:last-child {
	margin-block-end: 0;
}
.al-warn__icon {
	flex: none;
	margin-block-start: 2px; /* centred on the first line */
	fill: var(--al-warn-ink);
}
.al-warn__text {
	flex: 1 1 auto;
	min-inline-size: 0;
}
.al-warn__text p {
	margin-block: 0 var(--al-s-2);
}
.al-warn__text a {
	text-decoration-color: currentColor;
}
.woocommerce-product-details__short-description .al-warn .al-warn__lead {
	font-weight: 700;
	color: var(--al-warn-ink);
}
@media (max-width: 768.98px) {
	/* Same weight as the base rule, later in the file; the last card keeps
	   margin-block-end: 0 (:last-child weighs more). */
	.woocommerce-product-details__short-description .al-warn {
		margin-block: var(--al-s-3);
		padding: var(--al-s-2) var(--al-s-3);
		line-height: 1.45;
	}
}
