/* ==========================================================================
   The showroom: Products and category pages.
   The home page Wall hangs pieces on a wall (experience). Here they stand on lit acrylic
   shelves at one scale, so they can be compared (find and choose).
   ========================================================================== */

.qc-products--showroom,
.qc-products--category {
	--pw: clamp(170px, 14.5vw, 232px);   /* one piece width for the whole room: comparison */
	--pg: clamp(28px, 3.2vw, 48px);      /* the space between pieces on a ledge */
	padding: 0 0 var(--section);
}

/* ---------- Skip link ---------- */

/* Visible only when focused from the keyboard. */
.qc-skip-to {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
.qc-skip-to:focus {
	left: var(--gutter);
	z-index: 40;
	width: auto;
	height: auto;
	clip-path: none;
	padding: 0.6rem 1rem;
	border-radius: 3px;
	background: var(--espresso);
	color: var(--ivory);
	font-weight: 600;
	text-decoration: none;
	transform: translateY(-120%);
}

/* ---------- The finder: compact, sticky, one row of chips at a time ---------- */

.qc-finder {
	position: sticky;
	top: var(--hd);
	z-index: 20;
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
	background: var(--frost);
	-webkit-backdrop-filter: blur(16px) saturate(1.3);
	backdrop-filter: blur(16px) saturate(1.3);
	box-shadow: inset 0 -1px 0 var(--line), inset 0 1px 0 var(--line);
}
.qc-finder__inner {
	display: flex;
	align-items: center;
	gap: 0.75rem 1.25rem;
	max-width: var(--max);
	margin-inline: auto;
	padding: 0.6rem var(--gutter);
}
.qc-finder__switch {
	flex: none;
	display: inline-flex;
	padding: 3px;
	border-radius: 999px;
	box-shadow: inset 0 0 0 1px var(--stroke);
}
.qc-finder__switch[hidden] { display: none; }
.qc-finder__tab {
	min-height: 36px;
	padding: 0 1rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--fg-2);
	font: 600 0.85rem/1 var(--f-text);
	cursor: pointer;
}
.qc-finder__tab[aria-pressed="true"] { background: var(--espresso); color: var(--ivory); }
.qc-finder__rows { flex: 1; min-width: 0; display: grid; gap: 0.3rem; }
.qc-finder__row {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	overflow-x: auto;
	scrollbar-width: none;
	padding: 5px;
}
.qc-finder__row::-webkit-scrollbar { display: none; }
/* The row fades at its edge only while there is more to scroll to. */
.qc-finder__row.has-more {
	-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
	mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
}
.qc-finder.is-switchable[data-show="occasion"] [data-strip-row="category"],
.qc-finder.is-switchable[data-show="category"] [data-strip-row="occasion"] { display: none; }
.qc-finder__count { flex: none; font: 600 0.85rem/1 var(--f-text); color: var(--fg-2); font-variant-numeric: tabular-nums; }
.qc-chip:focus-visible { outline-offset: 2px; }

/* ---------- The room ---------- */

.qc-showroom {
	max-width: var(--max);
	margin-inline: auto;
	padding-inline: var(--gutter);
	overflow-x: clip;
	scroll-margin-top: calc(var(--hd) + 70px);
}
.qc-showroom:focus { outline: none; }

/* A shelf: one category, or several small ones sharing the same physical ledge. */
.qc-shelf { padding-top: clamp(2.25rem, 4.5vw, 3.75rem); }
.qc-shelf:first-child { padding-top: 0.5rem; }
.qc-shelf[hidden],
.qc-shelf__seg[hidden] { display: none; }
.qc-shelf--shared { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 2.25rem var(--pg); }

/* The label above a shelf: the category, its count, and the way to its page. */
.qc-shelf__label {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	min-height: 2.6rem;
	margin-bottom: 1.1rem;
}
.qc-shelf__name {
	font-family: var(--f-text);
	font-stretch: 75%;
	font-weight: 640;
	font-size: clamp(1.7rem, 1.1rem + 1.6vw, 2.6rem);
	line-height: 1;
	letter-spacing: -0.03em;
}
.qc-shelf__name a { color: var(--fg); text-decoration: none; }
.qc-shelf__name a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.14em; }
.qc-shelf__count { font: 600 0.85rem/1 var(--f-text); color: var(--fg-2); font-variant-numeric: tabular-nums; }
/* Small categories on a shared shelf: a smaller label, and a divider standing on the ledge between them. */
.qc-shelf--shared .qc-shelf__name { font-size: clamp(1.25rem, 1rem + 0.7vw, 1.6rem); }
.qc-shelf--shared .qc-shelf__seg { position: relative; }
.qc-shelf--shared .qc-shelf__seg + .qc-shelf__seg::before {
	content: "";
	position: absolute;
	left: calc(var(--pg) / -2);
	top: 0.2rem;
	height: calc(2.6rem + 1.1rem + var(--pw) * 1.112);
	width: 1px;
	background: linear-gradient(180deg, transparent, var(--stroke) 18%, var(--stroke));
}

.qc-shelf__row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 2.5rem var(--pg); }

/* Filtered views: shelves stand side by side along one run of ledge, each keeping its label.
   A few results (three or fewer) stand at the larger, open scale. */
@media (min-width: 701px) {
	.qc-showroom.is-filtered { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 var(--pg); }
	.qc-showroom.is-filtered > .qc-shelf { position: relative; padding-top: 1.5rem; }
	.qc-showroom.is-filtered > .qc-shelf:not([hidden]) ~ .qc-shelf::before {
		content: "";
		position: absolute;
		left: calc(var(--pg) / -2);
		top: 1.7rem;
		height: calc(2.6rem + 1.1rem + var(--pw) * 1.112);
		width: 1px;
		background: linear-gradient(180deg, transparent, var(--stroke) 18%, var(--stroke));
	}
	.qc-showroom.is-filtered > .qc-empty { flex-basis: 100%; }
	.qc-showroom.is-few { --pw: clamp(230px, 24vw, 340px); --pg: clamp(40px, 5vw, 80px); }
}

/* ---------- A showpiece: standing on the ledge ---------- */

.qc-showpiece { position: relative; width: var(--pw); }
.qc-showpiece[hidden] { display: none; }
.qc-showpiece__object { position: relative; display: block; }
/* Standing close to the wall: a short shadow, not the lift of a wall-mounted plate. */
.qc-showpiece .qc-piece__mount {
	--lift: 0px;
	box-shadow: 6px 4px 14px -8px rgba(51, 32, 27, 0.45), 1px 1px 3px -1px rgba(51, 32, 27, 0.3);
	transform: none;
	transition: transform var(--t-mid) var(--ease-out), box-shadow var(--t-mid) var(--ease-out);
}
/* Picked up for a closer look: it rises off the ledge and its shadow falls behind it. */
.qc-showpiece:hover .qc-piece__mount,
.qc-showpiece:focus-within .qc-piece__mount {
	transform: translateY(-6px);
	box-shadow: 10px 14px 24px -12px rgba(51, 32, 27, 0.5), 1px 1px 3px -1px rgba(51, 32, 27, 0.25);
}
.qc-showpiece:hover .qc-glass,
.qc-showpiece:focus-within .qc-glass { background-position: 0 0; }
.qc-showpiece:focus-within .qc-piece__mount { outline: 2px solid var(--espresso); outline-offset: 5px; }

/* Contact shadow where the piece meets the ledge. */
.qc-showpiece__contact {
	position: absolute;
	left: 8%;
	right: 8%;
	bottom: -5px;
	height: 10px;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(51, 32, 27, 0.42), rgba(51, 32, 27, 0));
	transition: transform var(--t-mid) var(--ease-out), opacity var(--t-mid);
}
.qc-showpiece:hover .qc-showpiece__contact,
.qc-showpiece:focus-within .qc-showpiece__contact { transform: scaleX(1.25); opacity: 0.55; }

/* The ledge: a clear acrylic shelf, seen slightly from above. Each piece carries its stretch of
   ledge half a gap past both sides, so neighbouring stretches meet into one continuous shelf. */
.qc-showpiece__ledge {
	position: relative;
	display: block;
	width: calc(100% + var(--pg));
	height: 13px;
	margin: 0 calc(var(--pg) / -2);
	border-radius: 1px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0, rgba(255, 255, 255, 0.55) 55%, rgba(235, 202, 180, 0.55) 56%, rgba(235, 202, 180, 0.3) 100%);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.95),
		inset 0 -1px 0 rgba(212, 170, 145, 0.7),
		0 9px 14px -9px rgba(51, 32, 27, 0.45);
	pointer-events: none;
}
/* Light catches the cut front edge. */
.qc-showpiece__ledge::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9) 30%, rgba(235, 202, 180, 0.9) 70%, transparent);
	opacity: 0.6;
}

/* The annotation on the shelf edge: a rule, the name, and the round Quote mount. */
/* Name on its own line (never cut short by the button); the Quote mount sits beneath it. */
.qc-showpiece__tag {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 0.35rem 0.5rem;
	margin-top: 0.75rem;
}
.qc-showpiece__rule { flex: none; width: 12px; height: 1px; margin-top: 0.62em; background: var(--fg-2); }
.qc-showpiece__name {
	flex: 1 1 calc(100% - 20px);
	min-width: 0;
	min-height: 2.6em;
	font: 600 0.9rem/1.3 var(--f-text);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
.qc-showpiece__name a { color: var(--fg); text-decoration: none; }
.qc-showpiece__name a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.qc-showpiece__name a:focus-visible { outline-offset: 2px; }
.qc-showpiece__lede { margin-top: 0.6rem; padding-left: 1.2rem; color: var(--fg-2); font-size: 0.9rem; line-height: 1.5; }

/* The round Quote mount (catalogue): a small bolt-like disc with the word beside it. */
.qc-showpiece .qc-add {
	position: static;
	flex: none;
	gap: 0.4rem;
	min-height: 32px;
	margin-left: calc(12px + 0.5rem - 2px);
	padding: 0 0.4rem 0 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: var(--fg);
	font-size: 0.78rem;
	opacity: 1;
}
.qc-showpiece .qc-add__icon {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #fff, rgba(255, 255, 255, 0.4) 60%, rgba(235, 202, 180, 0.4));
	box-shadow: inset 0 0 0 1px var(--stroke), 1px 2px 3px -1px rgba(51, 32, 27, 0.35);
	transition: background-color var(--t-mid), box-shadow var(--t-mid);
}
.qc-showpiece .qc-add__icon .qc-icon { position: static; grid-area: 1 / 1; width: 14px; height: 14px; }
.qc-showpiece .qc-add:hover { transform: none; }
.qc-showpiece .qc-add:hover .qc-add__icon { box-shadow: inset 0 0 0 1px var(--fg), 1px 2px 4px -1px rgba(51, 32, 27, 0.45); }
.qc-showpiece .qc-add[aria-pressed="true"] { background: transparent; color: var(--fg); }
.qc-showpiece .qc-add[aria-pressed="true"] .qc-add__icon { background: var(--edge); box-shadow: inset 0 0 0 1px rgba(51, 32, 27, 0.25); }

/* ---------- Setting a piece on the shelf (restrained) ---------- */

.qc-motion .qc-showpiece.qc-await .qc-piece__mount,
.qc-motion .qc-showpiece.qc-await .qc-showpiece__tag,
.qc-motion .qc-showpiece.qc-await .qc-showpiece__contact { opacity: 0; }
.qc-motion .qc-showpiece.is-mounting .qc-piece__mount { animation: qc-set 560ms var(--ease-out) calc(var(--j, 0) * 55ms) both; }
.qc-motion .qc-showpiece.is-mounting .qc-showpiece__contact { animation: qc-contact 560ms var(--ease-out) calc(var(--j, 0) * 55ms) both; }
.qc-motion .qc-showpiece.is-mounting .qc-showpiece__tag { animation: qc-fade 360ms var(--ease-out) calc(var(--j, 0) * 55ms + 240ms) both; }
.qc-motion .qc-showpiece.is-mounting .qc-showpiece__ledge::after { animation: qc-edge 900ms var(--ease-out) calc(var(--j, 0) * 55ms + 200ms) both; }
.qc-motion .qc-showpiece.is-mounting .qc-bolts i { animation: none; }
@keyframes qc-set {
	from { opacity: 0; transform: translateY(-14px); }
	60% { opacity: 1; }
	to { opacity: 1; transform: none; }
}
@keyframes qc-contact {
	from { opacity: 0; transform: scaleX(0.4); }
	to { opacity: 1; transform: none; }
}
@keyframes qc-edge {
	from { opacity: 0; transform: scaleX(0.2); }
	50% { opacity: 1; }
	to { opacity: 0.6; transform: none; }
}

/* ---------- Category pages ---------- */

.qc-products--category .qc-shelf { max-width: var(--max); margin-inline: auto; padding: clamp(2rem, 4vw, 3rem) var(--gutter) 0; overflow-x: clip; }

/* Two or three pieces: an open shelf, larger pieces, their own ledes, more air between them. */
.qc-shelf--open { --pw: clamp(230px, 24vw, 340px); --pg: clamp(40px, 6vw, 96px); }
.qc-shelf--open .qc-showpiece__name { font-size: 1.05rem; -webkit-line-clamp: 3; }
.qc-shelf--open .qc-showpiece__tag { min-height: 0; }

/* One piece: a specimen sheet. The piece large on the left; its own lede and key features
   annotated on the right, each feature drawn back to the piece with a leader line. */
.qc-specimen {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
	gap: 2rem clamp(3rem, 7vw, 7rem);
	align-items: center;
	max-width: var(--max);
	margin-inline: auto;
	padding: clamp(2rem, 4vw, 3rem) var(--gutter) 0;
}
.qc-specimen__plate { margin: 0; max-width: 640px; }
.qc-specimen__object { display: block; }
.qc-specimen .qc-piece__mount { box-shadow: 18px 26px 44px -24px rgba(51, 32, 27, 0.55), 2px 3px 6px -3px rgba(51, 32, 27, 0.35); }
.qc-specimen .qc-bolts { --b: 16px; }
.qc-specimen__notes { max-width: 34rem; }
.qc-specimen__title { margin-top: 0.5rem; font-size: clamp(2rem, 1.4rem + 2vw, 3.2rem); line-height: 1.02; }
.qc-specimen__title a { color: var(--fg); text-decoration: none; }
.qc-specimen__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.14em; }
.qc-specimen__lede { margin-top: 1rem; color: var(--fg-2); font-size: 1.05rem; line-height: 1.55; }
.qc-specimen__label { margin-top: 1.75rem; }
.qc-specimen__callouts { margin-top: 0.6rem; border-bottom: 1px solid var(--line); }
.qc-specimen__callouts li { position: relative; padding: 0.7rem 0; border-top: 1px solid var(--line); font-weight: 600; }
/* Leader line: from the feature back across the gap to the edge of the piece. */
.qc-specimen__leader {
	position: absolute;
	right: calc(100% + 0.9rem);
	top: 50%;
	width: calc(clamp(3rem, 7vw, 7rem) - 1.4rem);
	height: 1px;
	background: var(--stroke);
}
.qc-specimen__leader::before {
	content: "";
	position: absolute;
	left: -3px;
	top: -3px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--kraft);
}
.qc-specimen__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.75rem; }
.qc-specimen .qc-add--full { color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }

/* ---------- Wayfinding: right after the pieces, before the guide ---------- */

.qc-way { padding: clamp(3rem, 6vw, 4.5rem) var(--gutter) clamp(3rem, 6vw, 4.5rem); }
.qc-way__inner { max-width: var(--max); margin-inline: auto; border-top: 1px solid var(--line); padding-top: 1.75rem; }
.qc-way__step { display: flex; justify-content: space-between; gap: 1.5rem; }
.qc-way__link { display: grid; gap: 0.25rem; min-height: 44px; color: var(--fg); text-decoration: none; }
.qc-way__link--next { margin-left: auto; text-align: right; }
.qc-way__name {
	font-family: var(--f-text);
	font-stretch: 75%;
	font-weight: 640;
	font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.4rem);
	line-height: 1;
	letter-spacing: -0.03em;
}
.qc-way__link:hover .qc-way__name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.14em; }
.qc-way__label { margin-top: 2rem; }
.qc-way__index { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.qc-way__index .qc-chip[aria-current="page"] { background: var(--espresso); color: var(--ivory); box-shadow: none; opacity: 1; }
.qc-way__count { font-size: 0.75rem; opacity: 0.75; font-variant-numeric: tabular-nums; }

/* ---------- Tablet: the same shelves, fewer pieces to a ledge ---------- */

@media (max-width: 1099px) {
	.qc-products--showroom,
	.qc-products--category { --pw: clamp(160px, 21vw, 220px); }
	.qc-shelf--open { --pw: clamp(220px, 34vw, 320px); }
}
/* The specimen keeps its side-by-side layout down to about 900px, then stacks. */
@media (max-width: 899px) {
	.qc-specimen { grid-template-columns: 1fr; }
	.qc-specimen__plate { max-width: min(100%, 540px); }
	.qc-specimen__leader { right: auto; left: 0; width: 0.9rem; }
	.qc-specimen__leader::before { display: none; }
	.qc-specimen__callouts li { padding-left: 1.5rem; }
}

/* ---------- Phones: swipeable ledges, the next piece peeking in ---------- */

@media (max-width: 700px) {
	.qc-products--showroom,
	.qc-products--category { --pw: 58vw; --pg: 1.25rem; }
	.qc-finder__inner { flex-wrap: wrap; padding: 0.5rem 0; row-gap: 0.4rem; }
	.qc-finder__switch { margin-left: var(--gutter); }
	.qc-finder__count { margin-left: auto; margin-right: var(--gutter); }
	.qc-finder__rows { flex-basis: 100%; }
	.qc-finder__row { padding-inline: var(--gutter); }

	.qc-shelf { padding-top: 2.25rem; }
	.qc-shelf__label { margin-bottom: 0.75rem; min-height: 0; }
	/* One ledge per shelf, swiped sideways; it runs to the screen edges. */
	.qc-shelf__row,
	.qc-shelf--shared {
		flex-wrap: nowrap;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--gutter);
		scrollbar-width: none;
		margin-inline: calc(var(--gutter) * -1);
		padding: 0.5rem var(--gutter) 0.75rem;
	}
	.qc-shelf__row::-webkit-scrollbar,
	.qc-shelf--shared::-webkit-scrollbar { display: none; }
	.qc-showpiece { flex: none; scroll-snap-align: start; }
	/* A shared shelf scrolls as a whole; its small categories sit side by side on it. */
	.qc-shelf--shared { align-items: flex-start; gap: 0 var(--pg); }
	.qc-shelf--shared .qc-shelf__row { overflow: visible; margin: 0; padding: 0; }
	.qc-shelf--shared .qc-shelf__seg { flex: none; }
	.qc-showroom,
	.qc-products--category .qc-shelf { overflow-x: visible; }
	.qc-products--showroom .qc-showroom { overflow-x: clip; }
	.qc-shelf--open { --pw: 70vw; }
	.qc-way__step { flex-direction: column; }
	.qc-way__link--next { margin-left: 0; text-align: left; }
}

/* Desktop: the chip rows wrap onto a second line instead of running past the finder's width,
   so every category stays readable. Tablet and phone keep the horizontal scroll. */
@media (min-width: 1101px) {
	.qc-finder__row { flex-wrap: wrap; overflow: visible; }
	.qc-finder__row.has-more { -webkit-mask-image: none; mask-image: none; }
}
