/*
 * Bohemi — the wood gallery's own design layer, on top of app.css (and commerce.css).
 *
 * Editorial and quiet: linen paper, charcoal type, walnut as the only accent; light display
 * type, generous space, one strict grid; photographs edge to edge or in soft rectangles, all
 * on the gallery's plain grey backdrop. One motif only — growth rings, the shape of Bohemi's
 * round mark — used sparingly (wood swatches, the «all» tile, list bullets).
 */

:root {
	--ring-line: rgb(107 74 52 / 0.16);
	--ring-line-strong: rgb(107 74 52 / 0.32);
	--r-card: 16px;
	--r-panel: 24px;
}

/* Nothing may widen the page sideways (full-bleed parts, sliders). */
body {
	overflow-x: clip;
}

/* Type and sections: lighter, calmer headings everywhere. --------------------------------- */

.section {
	padding-top: clamp(64px, 8vw, 128px);
}

.section-head {
	margin-bottom: clamp(24px, 3vw, 40px);
}

.section-title {
	font-size: clamp(28px, 3vw, 46px);
	font-weight: 300;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.section-title em {
	color: var(--plum);
	font-style: normal;
}

.eyebrow {
	letter-spacing: 0.01em;
}

.shop-hero__title {
	font-size: clamp(34px, 4.4vw, 64px);
	font-weight: 300;
}

.blog-hero__title {
	font-size: clamp(32px, 4vw, 56px);
	font-weight: 300;
}

/* Header: five items beside the centred logo; under 1200px the menu button. */
@media (min-width: 1024px) and (max-width: 1199px) {
	.primary-nav {
		display: none;
	}

	.menu-toggle {
		display: inline-flex;
	}
}

.primary-nav__list {
	gap: clamp(14px, 1.7vw, 30px);
}

/* Frames: soft rectangles (no arches, no animated shapes). */
.arch {
	clip-path: none;
	border-radius: var(--r-panel);
}

.arch-outline {
	display: none;
}

/* Hero: the copy on the reading side; beside it one frame in which the gallery's pieces take
   turns, each opening out from the middle like a growth ring. A card names the piece, thumbnails
   under the frame choose one and show the time left. Under 900px the frame comes first. ------- */

.stage {
	max-width: var(--max);
	margin-inline: auto;
	padding: clamp(14px, 2.2vw, 32px) var(--gutter) clamp(28px, 4vw, 64px);
}

.stage__inner {
	display: grid;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(32px, 5.5vw, 96px);
}

.stage__copy {
	max-width: 620px;
}

.stage__eyebrow {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	color: var(--muted);
	font-size: 13px;
	font-weight: 500;
	animation: stage-rise 1s 0.05s var(--ease-out) backwards;
}

.stage__eyebrow::before {
	content: "";
	flex: none;
	width: 32px;
	height: 1px;
	background: var(--plum);
	transform-origin: right;
	animation: stage-draw 1.1s 0.15s var(--ease-out) backwards;
}

[dir="ltr"] .stage__eyebrow::before {
	transform-origin: left;
}

.stage__title {
	margin: 18px 0 0;
	font-size: clamp(44px, 5.4vw, 88px);
	font-weight: 300;
	line-height: 1.3;
	letter-spacing: -0.02em;
}

.stage__line {
	display: block;
	overflow: hidden;
}

.stage__line > span {
	display: block;
	animation: stage-line 1.25s calc(0.12s + var(--i, 0) * 0.13s) var(--ease-out) backwards;
}

.stage__line + .stage__line > span {
	color: var(--plum);
}

.stage__lead {
	max-width: 44ch;
	margin: clamp(14px, 1.8vw, 24px) 0 0;
	color: var(--ink-2);
	font-size: var(--step-1);
	line-height: 2;
	animation: stage-rise 1s 0.45s var(--ease-out) backwards;
}

.stage__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: clamp(22px, 2.8vw, 36px);
	animation: stage-rise 1s 0.6s var(--ease-out) backwards;
}

/* The gallery in figures: a quiet line under the buttons; the numbers count up once. */
.stage__facts {
	display: flex;
	gap: clamp(28px, 3.4vw, 56px);
	margin: clamp(30px, 3.6vw, 52px) 0 0;
	padding: clamp(18px, 2vw, 24px) 0 0;
	border-top: 1px solid var(--line);
	list-style: none;
	animation: stage-rise 1s 0.75s var(--ease-out) backwards;
}

.stage__fact {
	display: grid;
	gap: 2px;
}

.stage__fact-number {
	color: var(--ink);
	font-size: clamp(24px, 2.2vw, 32px);
	font-weight: 300;
	line-height: 1.3;
}

.stage__fact-label {
	color: var(--muted);
	font-size: 13px;
}

@keyframes stage-rise {
	from {
		opacity: 0;
		translate: 0 16px;
	}
}

@keyframes stage-draw {
	from {
		scale: 0 1;
	}
}

@keyframes stage-line {
	from {
		translate: 0 110%;
	}
}

/* The frame and its pieces; on wide screens the frame keeps to the page's edge. */
.stage__visual {
	display: grid;
	grid-template-columns: auto;
	justify-content: end;
	justify-items: center;
	gap: 22px;
}

.stage__piece {
	position: relative;
	max-width: 100%;
}

.stage__frame {
	position: relative;
	height: clamp(420px, calc(100svh - var(--header-h) - 44px - 150px), 700px);
	aspect-ratio: 4 / 5;
	max-width: 100%;
	overflow: hidden;
	border-radius: var(--r-panel);
	background: var(--paper-2);
	isolation: isolate;
	animation: stage-open 1.6s 0.1s cubic-bezier(0.65, 0, 0.35, 1) backwards;
}

.stage__shot {
	position: absolute;
	inset: 0;
	display: block;
	opacity: 0;
	pointer-events: none;
}

.stage__shot.is-active {
	z-index: 2;
	opacity: 1;
	pointer-events: auto;
}

.stage__shot.is-leaving {
	z-index: 1;
	opacity: 1;
}

.stage__shot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 55%;
	transition: scale 1.4s var(--ease-out);
}

.stage__shot.is-active img {
	animation: stage-settle 2s var(--ease-out) backwards;
}

.stage__shot.is-entering {
	animation: stage-ring 1.3s cubic-bezier(0.65, 0, 0.35, 1) backwards;
}

.stage__shot.is-leaving img {
	animation: stage-recede 1.3s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@media (hover: hover) {
	.stage__piece:hover .stage__shot.is-active:not(.is-entering) img {
		scale: 1.03;
	}
}

@keyframes stage-open {
	from {
		clip-path: circle(0% at 50% 56%);
	}

	to {
		clip-path: circle(82% at 50% 56%);
	}
}

@keyframes stage-ring {
	from {
		clip-path: circle(0% at 50% 56%);
	}

	to {
		clip-path: circle(82% at 50% 56%);
	}
}

@keyframes stage-settle {
	from {
		scale: 1.14;
	}
}

@keyframes stage-recede {
	to {
		scale: 0.96;
		filter: brightness(0.9);
	}
}

/* The card: the piece's name, spec and price; it reaches past the frame towards the copy. */
.stage__cards {
	position: absolute;
	bottom: clamp(20px, 3vw, 40px);
	inset-inline-start: clamp(-84px, -5vw, -20px);
	z-index: 3;
	display: grid;
	width: min(290px, 78%);
	animation: stage-rise 1s 1.05s var(--ease-out) backwards;
}

.stage__card {
	position: relative;
	grid-area: 1 / 1;
	padding: 16px 18px 14px;
	border: 1px solid rgb(255 255 255 / 0.6);
	border-radius: var(--r-card);
	background: rgb(251 249 246 / 0.92);
	box-shadow: 0 1px 2px rgb(40 40 40 / 0.05), 0 24px 48px -24px rgb(40 40 40 / 0.4);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	visibility: hidden;
	opacity: 0;
	translate: 0 12px;
	transition: opacity 0.3s var(--ease), translate 0.6s var(--ease-out), visibility 0s 0.6s;
}

.stage__card.is-active {
	visibility: visible;
	opacity: 1;
	translate: 0 0;
	transition: opacity 0.5s 0.35s var(--ease), translate 0.8s 0.35s var(--ease-out), visibility 0s;
}

.stage__card-label {
	margin: 0;
	color: var(--muted);
	font-size: 12px;
}

.stage__card-name {
	display: block;
	margin-top: 2px;
	color: var(--ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.7;
	text-decoration: none;
}

.stage__card-name::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.stage__card-spec {
	margin: 2px 0 0;
	color: var(--muted);
	font-size: 12.5px;
	line-height: 1.75;
}

.stage__card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--line);
}

.stage__card-price {
	font-size: 14px;
	font-weight: 600;
}

.stage__card-price del {
	color: var(--muted);
	font-weight: 400;
}

.stage__card-go {
	display: grid;
	flex: none;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.stage__card-go .icon {
	width: 16px;
	height: 16px;
}

@media (hover: hover) {
	.stage__card:hover .stage__card-go {
		border-color: var(--ink);
		background: var(--ink);
		color: var(--paper);
	}
}

.stage__card-name:focus-visible {
	outline: none;
}

.stage__card:has(.stage__card-name:focus-visible) {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}

/* Thumbnails (each with the time left on the current piece) and the stop button. */
.stage__controls {
	display: flex;
	align-items: center;
	gap: 16px;
	animation: stage-rise 1s 1.2s var(--ease-out) backwards;
}

.stage__controls[hidden] {
	display: none;
}

.stage__thumbs {
	display: flex;
	gap: 10px;
}

.stage__thumb {
	position: relative;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: var(--paper-2);
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 0.3s var(--ease);
	-webkit-tap-highlight-color: transparent;
}

.stage__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: cover;
}

.stage__thumb[aria-current="true"] {
	opacity: 1;
}

@media (hover: hover) {
	.stage__thumb:hover {
		opacity: 0.85;
	}
}

.stage__time {
	position: absolute;
	inset-inline: 0;
	bottom: -9px;
	height: 2px;
	overflow: hidden;
	border-radius: 2px;
	background: var(--line);
}

.stage__time::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--ink);
	transform-origin: right;
	scale: var(--p, 0) 1;
}

[dir="ltr"] .stage__time::after {
	transform-origin: left;
}

.stage__pause {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	background: transparent;
	color: var(--ink);
	cursor: pointer;
	transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

@media (hover: hover) {
	.stage__pause:hover {
		border-color: var(--ink);
	}
}

.stage__pause-icon {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.stage__icon-play {
	display: none;
	fill: currentColor;
	stroke: none;
}

.stage.is-paused .stage__icon-pause {
	display: none;
}

.stage.is-paused .stage__icon-play {
	display: block;
}

@media (max-width: 899px) {
	.stage {
		padding-top: 12px;
	}

	.stage__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 30px;
	}

	.stage__visual {
		order: -1;
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.stage__title {
		margin-top: 14px;
		font-size: clamp(40px, 11vw, 64px);
	}

	.stage__lead {
		font-size: 15.5px;
		line-height: 1.95;
	}

	.stage__actions .button {
		flex: 1 1 0;
		padding-inline: 18px;
	}

	.stage__facts {
		justify-content: space-between;
		gap: 16px;
		margin-top: 28px;
	}

	.stage__piece {
		width: 100%;
		margin-bottom: 52px;
	}

	.stage__frame {
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 4.5;
	}

	.stage__cards {
		inset-inline: 14px;
		bottom: -52px;
		width: auto;
	}

	.stage__card {
		padding: 12px 16px;
	}

	.stage__card-label {
		display: none;
	}

	.stage__card-name {
		margin-top: 0;
		font-size: 14.5px;
	}

	.stage__card-foot {
		margin-top: 6px;
		padding-top: 8px;
	}

	.stage__card-go {
		width: 30px;
		height: 30px;
	}

	.stage__thumb {
		width: 48px;
		height: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.stage__eyebrow,
	.stage__eyebrow::before,
	.stage__line > span,
	.stage__lead,
	.stage__actions,
	.stage__facts,
	.stage__frame,
	.stage__cards,
	.stage__controls,
	.stage__shot,
	.stage__shot img {
		animation: none !important;
	}

	.stage__card,
	.stage__card.is-active,
	.stage__shot img {
		transition: none;
	}
}

/* Categories: photo cards. ------------------------------------------------------------------ */

.cat-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: clamp(12px, 1.4vw, 22px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cat-card {
	display: grid;
	gap: 4px;
}

.cat-card__media {
	display: block;
	aspect-ratio: 4 / 5;
	margin-bottom: 10px;
	overflow: hidden;
	border-radius: var(--r-card);
	background: var(--paper-2);
}

.cat-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: scale 0.9s var(--ease-out);
}

@media (hover: hover) {
	.cat-card:hover .cat-card__media img {
		scale: 1.05;
	}
}

.cat-card__name {
	font-size: var(--step-0);
	font-weight: 500;
}

.cat-card__count {
	color: var(--muted);
	font-size: 13px;
}

@media (max-width: 1024px) {
	.cat-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.cat-grid {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 44%;
		margin-inline: calc(-1 * var(--gutter));
		padding-inline: var(--gutter);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: var(--gutter);
		scrollbar-width: none;
	}

	.cat-grid::-webkit-scrollbar {
		display: none;
	}

	.cat-grid > li {
		scroll-snap-align: start;
	}
}

/* Product cards: a quiet «تک‌نسخه» badge. */
.badge--one-off {
	border: 1px solid rgb(107 74 52 / 0.22);
	background: rgb(251 249 246 / 0.94);
	color: var(--plum);
	backdrop-filter: blur(4px);
}

/* Tabbed sliders (picks, woods). ----------------------------------------------------------- */

.slider-tabs {
	display: flex;
	gap: clamp(18px, 2.6vw, 36px);
	margin: 0 0 clamp(22px, 3vw, 34px);
	border-bottom: 1px solid var(--line);
	overflow-x: auto;
	scrollbar-width: none;
}

.slider-tabs::-webkit-scrollbar {
	display: none;
}

.slider-tab {
	position: relative;
	flex: none;
	padding: 0 0 14px;
	border: 0;
	background: none;
	color: var(--muted);
	font: inherit;
	font-size: 15px;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.2s;
}

.slider-tab::after {
	content: "";
	position: absolute;
	inset-inline: 0;
	bottom: -1px;
	height: 2px;
	background: var(--ink);
	scale: 0 1;
	transition: scale 0.35s var(--ease);
}

.slider-tab[aria-selected="true"] {
	color: var(--ink);
	font-weight: 600;
}

.slider-tab[aria-selected="true"]::after {
	scale: 1 1;
}

@media (hover: hover) {
	.slider-tab:hover {
		color: var(--ink);
	}
}

.js .slider-panel[data-hidden] {
	display: none;
}

.no-js .slider-panel + .slider-panel {
	margin-top: 48px;
}

.slider-panel__more {
	margin-top: clamp(16px, 2vw, 24px);
}

.product-slider {
	margin-inline: calc(-1 * var(--gutter));
}

.products.product-slider__track {
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: clamp(210px, 22.6%, 320px);
	gap: clamp(14px, 1.6vw, 24px);
	padding: 4px var(--gutter) 12px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--gutter);
	scrollbar-width: none;
}

.products.product-slider__track::-webkit-scrollbar {
	display: none;
}

.product-slider__track > li {
	scroll-snap-align: start;
}

@media (max-width: 760px) {
	.products.product-slider__track {
		grid-auto-columns: 64%;
	}
}

.slider-arrows {
	display: flex;
	gap: 8px;
}

.slider-arrow {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	background: transparent;
	color: var(--ink);
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, color 0.2s, opacity 0.2s;
}

.slider-arrow .icon {
	width: 18px;
	height: 18px;
}

[dir="rtl"] .slider-arrow[data-slider-prev] .icon {
	transform: scaleX(-1);
}

@media (hover: hover) {
	.slider-arrow:hover:not(:disabled) {
		border-color: var(--ink);
		background: var(--ink);
		color: var(--paper);
	}
}

.slider-arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

@media (max-width: 760px) {
	.slider-arrows {
		display: none;
	}
}

/* «Choose your wood»: each tab is a small slice of that wood. */
.wood-tabs {
	display: flex;
	gap: clamp(18px, 3vw, 40px);
	margin: 0 0 clamp(16px, 2.4vw, 26px);
	padding: 6px 2px 2px;
	overflow-x: auto;
	scrollbar-width: none;
}

.wood-tabs::-webkit-scrollbar {
	display: none;
}

.wood-tab {
	display: grid;
	flex: none;
	justify-items: center;
	gap: 4px;
	min-width: 84px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--muted);
	font: inherit;
	cursor: pointer;
}

.wood-tab__swatch {
	width: 58px;
	height: 58px;
	margin-bottom: 6px;
	border-radius: 50%;
	background:
		radial-gradient(circle at 46% 54%, rgb(255 255 255 / 0.16), transparent 62%),
		repeating-radial-gradient(circle at 46% 54%, var(--tone) 0 4px, var(--ring) 4px 5.2px, var(--tone) 5.2px 8px);
	box-shadow: inset 0 0 0 2px rgb(0 0 0 / 0.06), 0 0 0 4px var(--paper), 0 0 0 5px var(--line);
	transition: box-shadow 0.3s var(--ease);
}

.wood-tab[aria-selected="true"] {
	color: var(--ink);
}

.wood-tab[aria-selected="true"] .wood-tab__swatch {
	box-shadow: inset 0 0 0 2px rgb(0 0 0 / 0.06), 0 0 0 4px var(--paper), 0 0 0 6px var(--ink);
}

.wood-tab__name {
	font-size: 14px;
	font-weight: 600;
}

.wood-tab__count {
	font-size: 12px;
}

.wood-note {
	max-width: 560px;
	margin: 0 0 clamp(18px, 2.4vw, 26px);
	color: var(--ink-2);
	line-height: 1.9;
}

/* Story: an editorial split. --------------------------------------------------------------- */

.story-split {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	align-items: stretch;
}

.story-split__media {
	position: relative;
	min-height: clamp(380px, 42vw, 620px);
	margin: 0;
	overflow: hidden;
	background: var(--paper-2);
	border-start-start-radius: var(--r-panel);
	border-end-start-radius: var(--r-panel);
}

.story-split__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.story-split__copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	padding: clamp(32px, 5vw, 80px);
	background: var(--paper-2);
	border-start-end-radius: var(--r-panel);
	border-end-end-radius: var(--r-panel);
}

.story-split__text {
	margin: 16px 0 22px;
	color: var(--ink-2);
	line-height: 2.05;
}

@media (max-width: 900px) {
	.story-split {
		grid-template-columns: minmax(0, 1fr);
	}

	.story-split__media {
		min-height: 0;
		aspect-ratio: 4 / 3;
		border-radius: var(--r-panel) var(--r-panel) 0 0;
	}

	.story-split__copy {
		border-radius: 0 0 var(--r-panel) var(--r-panel);
	}
}

/* Care: the store's guides and its wood butter. ------------------------------------------ */

.care {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.1fr);
	gap: clamp(28px, 5vw, 72px);
	align-items: start;
}

.care__text {
	margin: 0;
	color: var(--ink-2);
	line-height: 2;
}

.care__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(14px, 2vw, 24px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.care-card {
	display: grid;
	gap: 6px;
}

.care-card__media {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--r-card);
	background: var(--paper-2);
}

.care-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: scale 0.8s var(--ease-out);
}

@media (hover: hover) {
	.care-card:hover .care-card__media img {
		scale: 1.04;
	}
}

.care-card__label {
	margin-top: 8px;
	color: var(--plum);
	font-size: 12px;
	font-weight: 600;
}

.care-card__title {
	font-size: var(--step-1);
	font-weight: 500;
	line-height: 1.6;
}

.care-card__price {
	color: var(--ink-2);
	font-size: 14px;
}

@media (max-width: 960px) {
	.care {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 640px) {
	.care__list {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Product page: the care panel. */
.care-list {
	display: grid;
	gap: 10px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.care-list li {
	position: relative;
	padding-inline-start: 24px;
	line-height: 1.9;
}

.care-list li::before {
	content: "";
	position: absolute;
	top: 0.66em;
	inset-inline-start: 2px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: repeating-radial-gradient(circle, var(--plum) 0 1.4px, transparent 1.4px 2.8px);
}

.care-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin: 0;
}

/* Shop: categories as a hierarchy. ---------------------------------------------------------- */

.cat-nav {
	display: grid;
	gap: 16px;
	margin: 6px 0 22px;
}

.cat-rail {
	display: flex;
	gap: clamp(12px, 1.6vw, 22px);
	margin: 0 calc(-1 * var(--gutter));
	padding: 8px var(--gutter) 6px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
}

.cat-rail::-webkit-scrollbar {
	display: none;
}

.cat-rail > li {
	flex: none;
	scroll-snap-align: start;
}

.cat-rail__item {
	display: grid;
	justify-items: center;
	gap: 3px;
	width: 92px;
	text-align: center;
}

.cat-rail__media {
	display: block;
	width: 76px;
	height: 76px;
	margin-bottom: 6px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--paper-2);
	box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--line);
	transition: box-shadow 0.3s var(--ease);
}

.cat-rail__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: scale 0.6s var(--ease-out);
}

.cat-rail__item--all .cat-rail__media {
	background: repeating-radial-gradient(circle at 50% 50%, var(--paper-2) 0 6px, var(--ring-line-strong) 6px 7px);
}

.cat-rail__item.is-active .cat-rail__media,
.cat-rail__item[aria-current="page"] .cat-rail__media {
	box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--ink);
}

@media (hover: hover) {
	.cat-rail__item:hover .cat-rail__media img {
		scale: 1.07;
	}
}

.cat-rail__name {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.5;
}

.cat-rail__item.is-active .cat-rail__name,
.cat-rail__item[aria-current="page"] .cat-rail__name {
	font-weight: 700;
}

.cat-rail__count {
	color: var(--muted);
	font-size: 11px;
}

.cat-sub {
	margin-inline: calc(-1 * var(--gutter));
	padding-inline: var(--gutter);
}

.cat-collections {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.cat-collections__label {
	flex: none;
	color: var(--muted);
	font-size: 13px;
}

.cat-collections .chip-list {
	min-width: 0;
}

/* Shop: the filters — a sidebar beside the list from 1024px, a sheet below that. ----------- */

.shop-layout {
	display: grid;
	grid-template-columns: 252px minmax(0, 1fr);
	align-items: start;
	gap: clamp(28px, 3vw, 52px);
	scroll-margin-top: calc(var(--header-h) + 12px);
}

.shop-sidebar {
	position: sticky;
	top: calc(var(--header-h) + 20px);
	max-height: calc(100vh - var(--header-h) - 40px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding-inline-end: 6px;
	scrollbar-width: thin;
	scrollbar-color: var(--line-strong) transparent;
}

.shop-results {
	position: relative;
	min-width: 0;
}

/* Three cards a row beside the sidebar; two with large photos. */
@media (min-width: 1024px) {
	.shop-layout .products:is(ul, ol) {
		--cols: 3;
	}
}

/* The form. */
.filters {
	display: grid;
}

.filters__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 14px;
}

.filters__title {
	margin: 0;
	font-size: 18px;
	font-weight: 500;
}

.filters__clear {
	color: var(--muted);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.filters__clear[hidden] {
	display: none;
}

.facet {
	min-width: 0;
	margin: 0;
	padding: 18px 0;
	border: 0;
	border-top: 1px solid var(--line);
}

.facet__title {
	width: 100%;
	margin: 0 0 8px;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
}

.facet__list {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.facet__option,
.facet__switch {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 42px;
	margin-inline: -8px;
	padding: 6px 8px;
	border-radius: 10px;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.2s var(--ease), opacity 0.2s var(--ease);
	-webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
	.facet__option:not(.is-disabled):hover,
	.facet__switch:not(.is-disabled):hover {
		background: var(--paper-2);
	}
}

.facet__option.is-disabled,
.facet__switch.is-disabled {
	cursor: default;
	opacity: 0.42;
}

/* The real input stays in the page (keyboard, screen readers); the mark is what shows. */
.facet__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.facet__mark {
	display: grid;
	flex: none;
	place-items: center;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--line-field);
	border-radius: 5px;
	background: var(--card);
	transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.facet__mark--radio {
	border-radius: 50%;
}

.facet__input:checked + .facet__mark {
	border-color: var(--ink);
	background: var(--ink);
}

.facet__input:checked + .facet__mark--checkbox::after {
	content: "";
	width: 9px;
	height: 5px;
	border: solid var(--paper);
	border-width: 0 0 2px 2px;
	rotate: -45deg;
	translate: 0 -1px;
}

.facet__input:checked + .facet__mark--radio {
	background: var(--card);
}

.facet__input:checked + .facet__mark--radio::after {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ink);
}

.facet__input:focus-visible + .facet__mark,
.facet__input:focus-visible ~ .facet__track {
	outline: 2px solid var(--ink);
	outline-offset: 2px;
}

.facet__label {
	flex: 1;
	min-width: 0;
	line-height: 1.5;
}

.facet__label small {
	margin-inline-start: 4px;
	color: var(--muted);
	font-size: 12px;
}

.facet__count {
	flex: none;
	color: var(--muted);
	font-size: 12px;
}

/* Size: a dot that grows with the class. */
.facet__size {
	display: grid;
	flex: none;
	place-items: center;
	width: 16px;
	height: 16px;
}

.facet__size::before {
	content: "";
	border-radius: 50%;
	background: var(--plum-light);
}

.facet__size--s::before {
	width: 6px;
	height: 6px;
}

.facet__size--m::before {
	width: 9px;
	height: 9px;
}

.facet__size--l::before {
	width: 12px;
	height: 12px;
}

.facet__size--xl::before {
	width: 15px;
	height: 15px;
}

.facet__more > summary {
	display: inline-flex;
	padding: 8px 0 2px;
	color: var(--plum);
	font-size: 13px;
	font-weight: 500;
	list-style: none;
	cursor: pointer;
}

.facet__more > summary::-webkit-details-marker {
	display: none;
}

.facet__more-hide,
.facet__more[open] .facet__more-show {
	display: none;
}

.facet__more[open] .facet__more-hide {
	display: inline;
}

.facet__more[open] > summary {
	padding-bottom: 6px;
}

/* «Only pieces in stock»: a switch. */
.facet--stock {
	padding-block: 12px;
}

.facet__switch .facet__label {
	font-weight: 500;
}

.facet__track {
	position: relative;
	flex: none;
	width: 38px;
	height: 22px;
	border-radius: 999px;
	background: var(--line-strong);
	transition: background-color 0.2s var(--ease);
}

.facet__track::after {
	content: "";
	position: absolute;
	top: 3px;
	inset-inline-start: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
	transition: inset-inline-start 0.2s var(--ease);
}

.facet__input:checked ~ .facet__track {
	background: var(--ink);
}

.facet__input:checked ~ .facet__track::after {
	inset-inline-start: 19px;
}

.filters__actions {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 10px;
	padding-top: 18px;
	border-top: 1px solid var(--line);
}

.filters__actions .button {
	min-height: 50px;
	padding-inline: 20px;
}

.filters__apply[disabled] {
	opacity: 0.5;
	cursor: default;
}

.filters__apply.is-loading {
	opacity: 0.75;
}

/* Beside the list the choices apply as they are made: no buttons. */
.js .shop-sidebar .filters__actions {
	display: none;
}

/* In the sheet: its own title; the buttons stay at the bottom. */
.filters-drawer .filters__head {
	display: none;
}

.filters-drawer .facet:first-of-type {
	border-top: 0;
}

.filters-drawer .drawer__body {
	padding-bottom: 0;
}

.filters-drawer .filters__actions {
	position: sticky;
	bottom: 0;
	z-index: 1;
	margin-inline: -24px;
	padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
	background: var(--paper);
}

/* The toolbar: the count, the order and the grid size; on narrower screens «Filters» first. */
.shop-toolbar--bohemi {
	margin-bottom: 18px;
}

.shop-toolbar__count {
	min-width: 0;
}

.filters-button,
.filters-fab {
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 18px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: var(--card);
	color: var(--ink);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.filters-button {
	display: none;
}

.filters-button .icon,
.filters-fab .icon {
	width: 18px;
	height: 18px;
}

.filters-button__badge {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--ink);
	color: var(--paper);
	font-size: 12px;
	line-height: 1;
}

.filters-button__badge:empty {
	display: none;
}

/* Further down the list on a phone, «Filters» floats above the tab bar. */
.filters-fab {
	position: fixed;
	z-index: 44;
	bottom: calc(24px + env(safe-area-inset-bottom));
	left: 50%;
	display: inline-flex;
	border-color: var(--ink);
	background: var(--ink);
	color: var(--paper);
	box-shadow: 0 16px 34px -14px rgb(40 40 40 / 0.6);
	translate: -50% 0;
	animation: stage-rise 0.4s var(--ease-out);
}

.filters-fab .filters-button__badge {
	background: var(--paper);
	color: var(--ink);
}

.filters-fab[hidden] {
	display: none;
}

@media (max-width: 900px) {
	.filters-fab {
		bottom: calc(10px + 66px + 14px + env(safe-area-inset-bottom));
	}
}

.shop-chips:empty {
	display: none;
}

.active-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.chip--remove {
	height: 34px;
	border-color: transparent;
	background: var(--plum-tint);
	color: var(--plum);
	font-size: 13px;
	white-space: nowrap;
}

.chip--remove .icon {
	width: 14px;
	height: 14px;
}

.active-filters__clear {
	padding: 0 6px;
	color: var(--muted);
	font-size: 13px;
	white-space: nowrap;
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* While a new list is on its way: the old one fades, a thin line runs above it. */
.shop-list {
	transition: opacity 0.25s var(--ease);
}

[data-shop].is-loading .shop-list {
	opacity: 0.45;
	pointer-events: none;
}

[data-shop].is-loading .shop-results::before {
	content: "";
	position: absolute;
	top: -2px;
	inset-inline: 0;
	z-index: 2;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--plum), transparent) no-repeat;
	background-size: 40% 100%;
	animation: shop-loading 1s linear infinite;
}

@keyframes shop-loading {
	from {
		background-position: -40% 0;
	}

	to {
		background-position: 140% 0;
	}
}

@media (max-width: 1023px) {
	.shop-layout {
		display: block;
	}

	.js .shop-sidebar {
		display: none;
	}

	.no-js .shop-sidebar {
		position: static;
		max-height: none;
		margin-bottom: 24px;
	}

	.js .filters-button {
		display: inline-flex;
		flex: none;
		padding-inline: 14px;
	}

	/* «Filters», the order and the grid size in one row. */
	.shop-toolbar--bohemi {
		flex-wrap: nowrap;
		gap: 8px;
	}

	.shop-toolbar__count {
		display: none;
	}

	.shop-toolbar--bohemi .shop-toolbar__actions {
		flex: 1;
		justify-content: flex-end;
		gap: 8px;
		width: auto;
		min-width: 0;
	}

	.shop-toolbar__order {
		flex: 0 1 220px;
		min-width: 0;
	}

	.shop-toolbar__order :is(.sort-form, .select-wrap, select) {
		width: 100%;
		min-width: 0;
	}

	.shop-toolbar__order select {
		min-height: 44px;
		text-overflow: ellipsis;
	}

	.shop-toolbar--bohemi .grid-toggle {
		flex: none;
	}

	.shop-toolbar--bohemi .grid-toggle button {
		width: 36px;
		height: 36px;
	}

	/* On a phone the chips scroll sideways in one row. */
	.active-filters {
		flex-wrap: nowrap;
		margin-inline: calc(-1 * var(--gutter));
		padding-inline: var(--gutter);
		overflow-x: auto;
		scrollbar-width: none;
	}
}

@media (min-width: 1024px) {
	.filters-fab {
		display: none !important;
	}
}

@media (max-width: 600px) {
	.shop-toolbar--bohemi .sort-form__label {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.filters-fab,
	[data-shop].is-loading .shop-results::before {
		animation: none;
	}
}

/* Blog: a few stories side by side; more get the wide first one. ------------------------- */

@media (min-width: 600px) {
	.blog-grid--few {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		max-width: 1040px;
		margin-inline: auto;
	}
}


/* Product page: the spec line right under the name (on phones too, where the theme moves
   everything it doesn't know after the buy button), the code as a quiet tag beside it. */
.product-spec__code {
	padding: 0 10px;
	border-radius: 999px;
	background: var(--paper-2);
	font-size: 12px;
	line-height: 2;
	white-space: nowrap;
}

@media (max-width: 899px) {
	.product-summary > .product-spec {
		order: 0;
		gap: 8px 10px;
		margin: 2px 0 14px;
		font-size: 14.5px;
		line-height: 1.9;
	}
}

/* Product page: the size, drawn to scale next to a mug. ------------------------------------- */

.size-card {
	margin: 20px 0 6px;
	padding: 18px 18px 14px;
	border: 1px solid var(--line);
	border-radius: var(--r-card);
	background: var(--card);
}

.size-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.size-card__title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
}

.size-card__class {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--plum-tint);
	color: var(--plum);
	font-size: 12px;
	font-weight: 600;
}

/* Small · medium · large · extra large as four rising bars, filled up to the piece's class. */
.size-card__scale {
	display: inline-flex;
	align-items: flex-end;
	gap: 2px;
	height: 13px;
}

.size-card__step {
	display: block;
	width: 3px;
	height: 5px;
	border-radius: 1px;
	background: rgb(107 74 52 / 0.25);
}

.size-card__step:nth-child(2) {
	height: 7.5px;
}

.size-card__step:nth-child(3) {
	height: 10px;
}

.size-card__step:nth-child(4) {
	height: 13px;
}

.size-card__step.is-on {
	background: var(--plum);
}

.size-figure {
	display: block;
	width: 100%;
	height: auto;
	direction: ltr;
	overflow: visible;
}

.size-figure__ground {
	stroke: var(--line-strong);
	stroke-width: 1;
}

.size-figure__piece {
	fill: #e9dccd;
	stroke: var(--plum);
	stroke-width: 1.4;
	stroke-linejoin: round;
}

.size-figure__piece-grain {
	fill: url(#bohemi-grain);
	stroke: none;
}

.size-figure__grain {
	stroke: rgb(107 74 52 / 0.22);
	stroke-width: 0.8;
}

.size-figure__tick {
	stroke: var(--plum);
	stroke-width: 0.9;
}

.size-figure__dim {
	fill: none;
	stroke: var(--ink-2);
	stroke-width: 0.9;
}

.size-figure__mug rect,
.size-figure__mug path {
	fill: none;
	stroke: var(--muted);
	stroke-width: 1.2;
	stroke-dasharray: 3 3;
}

.size-figure__plan {
	fill: #e9dccd;
	stroke: var(--plum);
	stroke-width: 1.2;
}

.size-figure__label {
	direction: rtl;
	unicode-bidi: embed;
	fill: var(--ink);
	font-family: var(--font);
	font-size: 12px;
	font-weight: 600;
	text-anchor: middle;
}

.size-figure__label--muted {
	fill: var(--muted);
	font-weight: 500;
}

.size-card__note {
	margin: 6px 0 0;
	color: var(--muted);
	font-size: 12px;
	line-height: 1.8;
}

/* The drawing draws itself once it comes into view (bohemi.js adds .is-armed, then .is-drawn):
   the ground line, the outline, its wood, then the dimension lines and the numbers. */
@media (prefers-reduced-motion: no-preference) {
	.size-card.is-armed:not(.is-drawn) :is(.size-figure__ground, .size-figure__piece, .size-figure__dim) {
		stroke-dasharray: 1;
		stroke-dashoffset: 1;
	}

	.size-card.is-armed:not(.is-drawn) .size-figure__piece {
		fill-opacity: 0;
	}

	.size-card.is-armed:not(.is-drawn) :is(.size-figure__piece-grain, .size-figure__tick, .size-figure__mug, .size-figure__plan, .size-figure__label) {
		opacity: 0;
	}

	.size-card.is-drawn .size-figure__ground {
		animation: size-draw 0.9s var(--ease-out) backwards;
	}

	.size-card.is-drawn .size-figure__piece {
		animation: size-draw 1.4s 0.2s var(--ease-out) backwards, size-fill 0.9s 1s var(--ease) backwards;
	}

	.size-card.is-drawn .size-figure__piece-grain {
		animation: size-fade 0.9s 1.2s var(--ease) backwards;
	}

	.size-card.is-drawn .size-figure__tick {
		animation: size-fade 0.6s 1s var(--ease) backwards;
	}

	.size-card.is-drawn .size-figure__mug {
		animation: size-fade 0.8s 0.6s var(--ease) backwards;
	}

	.size-card.is-drawn .size-figure__dim {
		animation: size-draw 0.8s 1.1s var(--ease-out) backwards;
	}

	.size-card.is-drawn .size-figure__plan {
		animation: size-fade 0.8s 1.3s var(--ease) backwards;
	}

	.size-card.is-drawn .size-figure__label {
		animation: size-fade 0.7s 1.5s var(--ease) backwards;
	}
}

@keyframes size-draw {
	from {
		stroke-dasharray: 1;
		stroke-dashoffset: 1;
	}

	to {
		stroke-dasharray: 1;
		stroke-dashoffset: 0;
	}
}

@keyframes size-fill {
	from {
		fill-opacity: 0;
	}
}

@keyframes size-fade {
	from {
		opacity: 0;
	}
}
