/* Quattro Design · quick buy (1.7.4). The card's size chips are buttons (includes/quick.php, assets/quick.js).
   Desktop: the sizes slide up on hover (card.css), a tap on a size adds it. Phones: a quiet bag button in the image
   corner opens the same sizes. The classic layer: no shadows, 6px corners, ink on paper. */

/* the list items are only wrappers: the button is the chip */
html body .wd-product .qc-qb__li { display: contents; }
html body .wd-product .qc-qb .qc-sizes__chip {
	appearance: none;
	cursor: pointer;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
html body .wd-product .qc-qb__label {
	flex-basis: 100%;
	margin: 0 0 2px;
	color: var(--qc-ink);
	font-family: var(--qc-font);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
}
html body .qc-qb .qc-sizes__chip:focus-visible,
html body .qc-qb__open:focus-visible,
html body .qc-w .qc-qb__chip:focus-visible { outline: 2px solid var(--qc-ink); outline-offset: 2px; }

/* states (cards and the home showroom) */
html body :is(.qc-qb .qc-sizes__chip, .qc-w .qc-qb__chip).is-loading { opacity: .5; cursor: progress; }
html body :is(.qc-qb .qc-sizes__chip, .qc-w .qc-qb__chip).is-added { border-color: var(--qc-ink); background-color: var(--qc-ink); color: var(--qc-paper); }
html body :is(.qc-qb .qc-sizes__chip, .qc-w .qc-qb__chip).is-failed { opacity: .4; text-decoration: line-through; cursor: not-allowed; }

/* desktop: the sizes panel takes clicks while it is up */
@media (hover: hover) and (pointer: fine) {
	html body .wd-product:is(:hover, :focus-within) .qc-qb { pointer-events: auto; }
	html body .wd-product .qc-qb .qc-sizes__chip { min-inline-size: 34px; min-block-size: 28px; }
	html body .wd-product .qc-qb .qc-sizes__chip:not(.qc-sizes__more):hover { border-color: var(--qc-ink); background-color: var(--qc-ink); color: var(--qc-paper); }
	html body .wd-product .qc-qb__open { display: none; }
}

/* phones and touch screens: the "+" button opens the sizes over the bottom of the image */
@media not all and (hover: hover) and (pointer: fine) {
	html body .wd-product .qc-qb__open {
		position: absolute;
		inset-block-start: 8px;
		inset-inline-end: 8px;
		z-index: 6;
		display: grid;
		place-items: center;
		inline-size: 40px;
		block-size: 40px;
		margin: 0;
		padding: 0;
		border: 1px solid var(--qc-line);
		border-radius: var(--qc-pill);
		background-color: var(--qc-white);
		color: var(--qc-ink);
		cursor: pointer;
	}
	html body .wd-product .qc-qb__open::after { content: ""; position: absolute; inset: -4px; } /* 48px finger target */
	html body .wd-product .qc-qb__open .qc-qb__plus { transition: transform .25s ease; transform-origin: 12px 12px; } /* 1.9.19: "+" → "×" around its centre */
	html body .wd-product.is-qb .qc-qb__open { border-color: var(--qc-ink); background-color: var(--qc-ink); color: var(--qc-paper); }
	html body .wd-product.is-qb .qc-qb__open .qc-qb__plus { transform: rotate(45deg); }

	html body .wd-product .qc-qb {
		position: absolute;
		inset: 0; /* a sheet over the whole image; the bag button (now ×) stays above it in the corner */
		z-index: 5;
		display: flex;
		flex-wrap: wrap;
		align-content: center;
		justify-content: center;
		gap: 4px;
		margin: 0;
		padding: 52px 6px 10px;
		list-style: none;
		background-color: var(--qc-stone);
		opacity: 0;
		visibility: hidden;
		transform: translateY(12px);
		transition: opacity .25s ease, transform .3s var(--qc-ease), visibility 0s linear .3s;
	}
	html body .wd-product.is-qb .qc-qb {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: opacity .25s ease, transform .3s var(--qc-ease), visibility 0s;
	}
	html body .wd-product .qc-qb .qc-sizes__chip {
		display: inline-grid;
		place-items: center;
		min-inline-size: 36px; /* four in a row on a 390px phone */
		min-block-size: 36px;
		margin: 0;
		padding: 4px;
		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: 13px;
		font-weight: 600;
		line-height: 1;
		font-variant-numeric: tabular-nums;
	}
	html body .wd-product .qc-qb .qc-sizes__more { border-color: transparent; background: none; color: var(--qc-grey); }
	html body .wd-product.is-qb .qc-promo-tag { opacity: 0; }
}

/* home showroom: the stage's sizes are buttons */
html body .qc-w .show__sizes--quick { align-items: center; }
html body .qc-w .show__qb { flex-basis: 100%; margin-block-end: 2px; color: var(--on-ground-soft, var(--qc-grey)); font-size: 12px; }
html body .qc-w .qc-qb__chip {
	min-width: 40px;
	min-height: 36px;
	padding: 5px 7px;
	border: 1px solid transparent;
	border-radius: var(--radius-sm, 6px);
	background: var(--qc-paper);
	color: var(--qc-ink);
	font: 600 13px/1 var(--qc-font);
	font-variant-numeric: tabular-nums;
	text-align: center;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
	html body .qc-w .qc-qb__chip:hover { background: var(--qc-ink); color: var(--qc-paper); }
}

/* the flying shoe and the screen-reader line */
.qc-fly {
	position: fixed;
	z-index: 100000;
	margin: 0;
	object-fit: contain;
	pointer-events: none;
	will-change: transform, opacity;
}
.qc-qb-live {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* 1.7.5 · colour row (18.10: "רוצה שיהיה אפשר לבחור גם צבע מתצוגה"): small pictures of each colour above the sizes */
html body .wd-product .qc-qb :is(.qc-qb__colors, .qc-qb__sizes) {
	display: flex;
	flex-basis: 100%;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}
html body .wd-product .qc-qb__colors { margin-block-end: 4px; }
html body .wd-product .qc-qb__color {
	display: inline-grid;
	place-items: center;
	inline-size: 36px;
	block-size: 36px;
	margin: 0;
	padding: 2px;
	border: 1px solid var(--qc-line);
	border-radius: var(--qc-radius);
	background-color: var(--qc-white);
	color: var(--qc-ink);
	cursor: pointer;
	appearance: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}
html body .wd-product .qc-qb__color img { inline-size: 100%; block-size: 100%; margin: 0; object-fit: contain; }
html body .wd-product .qc-qb__color--text { inline-size: auto; min-inline-size: 36px; padding-inline: 8px; font: 600 12px/1 var(--qc-font); }
html body .wd-product .qc-qb__color[aria-pressed="true"] { border-color: var(--qc-ink); box-shadow: inset 0 0 0 1px var(--qc-ink); }
html body .wd-product .qc-qb__color:focus-visible { outline: 2px solid var(--qc-ink); outline-offset: 2px; }
html body .wd-product .qc-qb__hint { padding-block: 8px; color: var(--qc-ink); font: 400 12px/1.4 var(--qc-font); }
@media (hover: hover) and (pointer: fine) {
	html body .wd-product .qc-qb__color:hover { border-color: var(--qc-ink); }
	html body .wd-product .qc-qb--colors { background: linear-gradient(to top, var(--qc-stone) 80%, rgba(241, 240, 236, 0)); padding-block-start: 18px; }
}
@media not all and (hover: hover) and (pointer: fine) {
	/* phones: the colours sit in the top row beside the bag button, the sizes under them, no label */
	html body .wd-product .qc-qb--colors { align-content: flex-start; padding: 8px 6px 8px; }
	html body .wd-product .qc-qb--colors .qc-qb__label { display: none; }
	html body .wd-product .qc-qb--colors .qc-qb__colors { justify-content: flex-start; margin-block-end: 8px; padding-inline-end: 46px; }
}
