/* ==========================================================================
   Quattro Design · product card (benchmark, materials/benchmark/benchmark.md §2.9 to §2.11)
   Lock 15.10 "floating shoe on stone": 1:1 frame on stone with a soft contact shadow under the shoe,
   the cutout (includes/card.php, meta _qc_cutout_id) when one exists. Hover, only on real hover screens:
   the shoe lifts and turns -4deg, the shadow tightens, the in-stock sizes slide up. Phones: none of it.
   No border on the frame; 1.7.0: the frame takes the site's one corner (--qc-radius-surface). Text: name 16/600 · colour count 14 grey ·
   price 16/700, sale price red + struck regular. Swatches under the image. No add-to-cart in the card.
   Gap 16px desktop, 8px mobile. Loaded site-wide: cards also live in home carousels and related products.
   Markup: WoodMart 8.5.7 woocommerce/content-product-standard.php (products_hover = standard).
   ========================================================================== */

html body .wd-product {
	--text-align: start;
	text-align: start;
}
html body .wd-product .product-wrapper {
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	container-type: inline-size;
}

/* ---------- Frame ---------- */
html body .wd-product .product-element-top {
	position: relative;
	aspect-ratio: 1 / 1;
	margin: 0 0 12px;
	overflow: hidden;
	border-radius: var(--qc-radius-surface, 16px); /* 1.7.0: the mock's one corner (.pc__media) */
	background-color: var(--qc-stone);
	isolation: isolate;
}
/* Contact shadow: a soft ellipse on the stone, under the shoe (behind the image). */
html body .wd-product .product-element-top::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	margin-inline: auto;
	inset-block-end: 13%;
	z-index: 0;
	inline-size: 62%;
	block-size: 7%;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(23, 23, 25, .22), rgba(23, 23, 25, .08) 60%, rgba(23, 23, 25, 0));
	transform-origin: 50% 50%;
	transition: transform .6s var(--qc-ease), opacity .6s var(--qc-ease);
	pointer-events: none;
}
html body .wd-product .product-image-link {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: none;
}
/* Photo fallback (no cutout yet, staging 15.10): the photo fills the 1:1 frame edge to edge, centred, no inner padding,
   no contact shadow. Only a cutout floats on the stone with air around it. */
html body .wd-product .product-image-link :is(img, picture) {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
	padding: 0;
	box-sizing: border-box;
	mix-blend-mode: normal;
	transition: transform .6s var(--qc-ease);
}
html body .wd-product .product-element-top:not(:has(img.qc-cutout))::before { display: none; }
/* Cutout: transparent already; air so the turn never touches the frame. */
html body .wd-product .product-image-link img.qc-cutout {
	object-fit: contain;
	padding: 9%;
	object-position: center 46%;
}
html body .wd-product .hover-img { display: none; }

/* ---------- Size chips (in-stock pa_size): hidden everywhere but real hover screens ---------- */
.qc-sizes { display: none; }

@media (hover: hover) and (pointer: fine) {
	html body .wd-product .product-image-link img { will-change: transform; }
	html body .wd-product:hover .product-image-link img.qc-cutout {
		transform: translateY(-5%) rotate(-4deg);
	}
	html body .wd-product:hover .product-image-link img:not(.qc-cutout) { transform: scale(1.04); }
	html body .wd-product:hover .product-element-top::before {
		transform: scale(.82);
		opacity: .7;
	}

	html body .wd-product .qc-sizes {
		position: absolute;
		inset-inline: 0;
		inset-block-end: 0;
		z-index: 3;
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 4px;
		margin: 0;
		padding: 10px 10px 12px;
		list-style: none;
		background: linear-gradient(to top, var(--qc-stone) 55%, rgba(241, 240, 236, 0));
		opacity: 0;
		transform: translateY(100%);
		transition: transform .45s var(--qc-ease), opacity .3s ease;
		pointer-events: none;
	}
	html body .wd-product:is(:hover, :focus-within) .qc-sizes {
		opacity: 1;
		transform: translateY(0);
	}
	html body .wd-product .qc-sizes__chip {
		min-inline-size: 30px;
		margin: 0;
		padding: 4px 6px;
		border: 1px solid var(--qc-line);
		border-radius: var(--qc-radius);
		background-color: var(--qc-white);
		color: var(--qc-ink);
		font-family: var(--qc-font);
		font-size: 12px;
		font-weight: 600;
		line-height: 1.2;
		text-align: center;
		font-variant-numeric: tabular-nums;
	}
	html body .wd-product .qc-sizes__more { border-color: transparent; background: none; color: var(--qc-grey); }
	/* the promo tag shares the bottom edge: it steps aside while the sizes are up */
	html body .wd-product:is(:hover, :focus-within) .qc-promo-tag { opacity: 0; }
	html body .wd-product .qc-promo-tag { transition: opacity .2s ease; }
}

@media (prefers-reduced-motion: reduce) {
	html body .wd-product:hover .product-image-link img,
	html body .wd-product:hover .product-element-top::before { transform: none; }
}

/* ---------- Labels (top, start side) ---------- */
html body .wd-product .product-labels {
	position: absolute;
	top: 12px;
	inset-inline-start: 12px;
	inset-inline-end: auto;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	margin: 0;
	pointer-events: none;
}
html body .product-labels .product-label {
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 4px 8px;
	border-radius: 0;
	font-family: var(--qc-font);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: .02em;
	text-transform: none;
	color: var(--qc-white);
	background-color: var(--qc-ink);
}
html body .product-labels .product-label.onsale { background-color: var(--qc-red); }
html body .product-labels .product-label.out-of-stock { background-color: var(--qc-white); color: var(--qc-grey); }

/* ---------- Promo tag (bottom, start side): "2 ב-499 ₪", red for the sale category ---------- */
.qc-promo-tag {
	position: absolute;
	bottom: 12px;
	inset-inline-start: 12px;
	z-index: 3;
	max-width: calc(100% - 24px);
	padding: 5px 10px;
	border-radius: var(--qc-pill);
	background-color: var(--qc-ink);
	color: var(--qc-white);
	font-family: var(--qc-font);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
}
.qc-promo-tag--sale { background-color: var(--qc-red); }

/* ---------- Wishlist (top, end side). Always visible on touch screens ---------- */
html body .wd-product .wd-buttons {
	top: 8px;
	inset-inline-end: 8px;
	inset-inline-start: auto;
	z-index: 4;
	background: none;
	box-shadow: none;
}
html body .wd-product .wd-buttons .wd-compare-btn,
html body .wd-product .wd-buttons .quick-view { display: none; }
@media (hover: none) {
	html body .wd-product .wd-buttons { opacity: 1; visibility: visible; transform: none; }
}

/* ---------- Text ---------- */
html body .wd-product .wd-swatches-grid {
	justify-content: flex-start;
	margin: 0 0 8px;
}
html body .wd-product .wd-entities-title {
	margin: 0 0 2px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-align: start;
}
html body .wd-product .wd-entities-title a { color: var(--qc-ink); }
.qc-colors {
	min-height: 1.45em; /* same height in every card, also when empty */
	margin: 0 0 4px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--qc-grey);
}
html body .wd-product .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: flex-start;
	gap: 0 8px;
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--qc-ink);
}
html body .wd-product .price del { font-size: 14px; }

/* No add-to-cart inside the card (benchmark §2.10). The card is the link. */
html body .wd-product.wd-hover-standard .wd-add-btn,
html body .wd-product .wd-add-btn { display: none; }
html body .wd-product .wd-product-cats,
html body .wd-product .wd-product-brands-links,
html body .wd-product .star-rating { display: none; }

/* ---------- Grid gaps ---------- */
html body .wd-products.wd-grid-g,
html body .products.wd-grid-g {
	--wd-col-gap: 16px;
	--wd-row-gap: 36px;
	--wd-gap: 36px 16px;
	gap: 36px 16px;
}

/* ---------- Narrow cards (2 per row on phones) ---------- */
@container (max-width: 220px) {
	.wd-product .wd-entities-title { font-size: 14px; }
	.wd-product .price { font-size: 15px; }
	.qc-promo-tag { font-size: 11px; padding: 4px 8px; bottom: 8px; inset-inline-start: 8px; }
}
@media (max-width: 767px) {
	html body .wd-products.wd-grid-g,
	html body .products.wd-grid-g {
		--wd-col-gap: 8px;
		--wd-row-gap: 28px;
		--wd-gap: 28px 8px;
		gap: 28px 8px;
	}
	html body .wd-product .product-labels { top: 8px; inset-inline-start: 8px; }
	html body .product-labels .product-label { font-size: 11px; padding: 3px 6px; }
}

/* ---------- Promo shortcodes for the home promo chapter: [qc_promo cat="68" style="big"], [qc_promos] ---------- */
.qc-promo-big { display: flex; flex-wrap: wrap; gap: 8px 40px; }
.qc-promo-big__deal {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	font-family: var(--qc-font-display);
	font-weight: 900;
	line-height: .9;
	letter-spacing: -.02em;
	color: inherit;
}
.qc-promo-big__n,
.qc-promo-big__x { font-size: clamp(64px, 11vw, 168px); }
.qc-promo-big__word,
.qc-promo-big__cur { font-family: var(--qc-font); font-weight: 700; font-size: clamp(18px, 2vw, 28px); letter-spacing: 0; }
.qc-promos { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.qc-promos__item { margin: 0; }
.qc-promos__item > a {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--qc-line);
	color: var(--qc-ink);
}
.qc-promos__cat { font-weight: 600; }
.qc-promos__deal { font-weight: 700; }
.qc-promos__item.is-sale .qc-promos__deal { color: var(--qc-red); }
