/*
 * Webstore storefront.
 *
 * Everything is scoped under a ws- prefix and inside the plugin's own
 * container, so it cannot leak into the surrounding theme - the store is a
 * guest on somebody else's page.
 *
 * There is not a single literal colour, measurement or shape in this file.
 * Every visual decision reads a custom property from `tokens.css`, which is the
 * same set of names the shop owner edits in the Customizer (§14.4a). That is
 * what makes the store personalisable without anybody editing CSS - and it
 * means a theme overriding one of our templates can use the same names and stay
 * in step with the shop's palette.
 */

.webstore {
	color: var(--webstore-color-ink);
	font-family: var(--webstore-font-body);
}

.webstore__container {
	box-sizing: border-box;
	margin: 0 auto;
	max-width: var(--webstore-container);
	padding: var(--webstore-space-8) var(--webstore-space-4);
	width: 100%;
}

.webstore *,
.webstore *::before,
.webstore *::after {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------- Listing */

.ws-listing__header {
	margin-bottom: var(--webstore-space-6);
}

.ws-listing__title {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-3xl);
	font-weight: var(--webstore-weight-heading);
	letter-spacing: var(--webstore-tracking-heading);
	line-height: 1.15;
	margin: 0 0 var(--webstore-space-2);
}

.ws-listing__intro {
	color: var(--webstore-color-ink-muted);
	margin: 0 0 var(--webstore-space-2);
	max-width: 60ch;
}

.ws-listing__count {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
	margin: 0;
}

.ws-toolbar {
	align-items: center;
	border-bottom: var(--webstore-border-width) solid var(--webstore-color-border);
	display: flex;
	flex-wrap: wrap;
	gap: var(--webstore-space-3);
	justify-content: space-between;
	margin-bottom: var(--webstore-space-6);
	padding-bottom: var(--webstore-space-3);
}

.ws-toolbar__sort {
	align-items: center;
	display: flex;
	gap: var(--webstore-space-2);
	margin-left: auto;
}

.ws-toolbar__label {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
}

.ws-toolbar__sort select {
	background: var(--webstore-color-bg);
	border: var(--webstore-field-border-width) solid var(--webstore-color-field-border);
	border-radius: var(--webstore-radius-control);
	color: var(--webstore-color-ink);
	font: inherit;
	padding: var(--webstore-space-2) var(--webstore-space-3);
}

.ws-chip {
	background: var(--webstore-color-surface);
	border: var(--webstore-field-border-width) solid var(--webstore-color-field-border);
	border-radius: 999px;
	color: var(--webstore-color-ink);
	font-size: var(--webstore-scale-sm);
	padding: var(--webstore-space-1) var(--webstore-space-3);
	text-decoration: none;
}

.ws-chip:hover,
.ws-chip:focus-visible {
	border-color: var(--webstore-color-ink);
}

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

/*
 * Sized by the smallest acceptable card rather than by a column count. A shop
 * owner who wants bigger product images changes one measurement and the grid
 * re-flows on every screen size, instead of us guessing three breakpoints on
 * their behalf.
 *
 * Two columns is the floor on the narrowest phones, because one enormous card
 * per row makes a shop feel empty.
 */
.ws-grid {
	display: grid;
	gap: var(--webstore-grid-gap);
	grid-template-columns: repeat(auto-fill, minmax(min(var(--webstore-grid-min), 45%), 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.ws-grid__item {
	margin: 0;
}

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

.ws-card {
	display: flex;
	flex-direction: column;
	gap: var(--webstore-space-2);
	height: 100%;
}

.ws-card__link {
	color: inherit;
	display: flex;
	flex-direction: column;
	gap: var(--webstore-space-2);
	text-decoration: none;
}

.ws-card__media {
	background: var(--webstore-color-surface);
	border-radius: var(--webstore-radius-media);
	overflow: hidden;
	position: relative;
	/* One aspect ratio, no exceptions. Mixed ratios are what make a grid
	   look untidy however good the photography is - so the shop owner picks
	   the ratio, not the photographer. */
	aspect-ratio: var(--webstore-card-ratio);
}

.ws-card__image {
	display: block;
	height: 100%;
	object-fit: var(--webstore-image-fit);
	transition: opacity var(--webstore-transition);
	width: 100%;
}

.ws-card__image--hover {
	inset: 0;
	opacity: 0;
	position: absolute;
}

.ws-card:hover .ws-card__image--hover,
.ws-card:focus-within .ws-card__image--hover {
	opacity: 1;
}

.ws-card__image--placeholder {
	background: var(--webstore-color-surface);
}

.ws-card__title {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-md);
	font-weight: 500;
	line-height: 1.35;
	margin: 0;
}

.ws-card__options {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-xs);
	margin: 0;
}

.ws-card__price {
	align-items: baseline;
	display: flex;
	gap: var(--webstore-space-2);
	margin: 0;
}

.ws-card--unavailable .ws-card__media {
	opacity: 0.55;
}

/*
 * The buy control sits on the floor of the card, not under the text.
 *
 * Without this the button follows the copy, so a row of cards has its buttons
 * at four different heights - one product has a two-line title, another has an
 * option summary, a third is on sale and carries a struck-through price. The
 * grid reads as ragged even though every card is the same height, and the eye
 * has nowhere to rest. `margin-top: auto` inside the existing flex column is
 * the whole fix.
 */
.ws-card > .ws-button,
.ws-card > .ws-button--secondary {
	margin-top: auto;
}

/* The link is the part that grows, so the button below it is pushed down. */
.ws-card__link {
	flex: 1 1 auto;
}

/* ------------------------------------------------------------------ Price */

.ws-price__was {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
	text-decoration: line-through;
}

.ws-price__now {
	font-size: var(--webstore-scale-md);
}

/* The sale price is visually larger than the struck-through original, which
   is what makes the saving read at a glance rather than needing arithmetic. */
.ws-price__now--sale {
	color: var(--webstore-color-sale);
	font-size: var(--webstore-scale-lg);
	font-weight: 600;
}

/* ----------------------------------------------------------------- Badges */

.ws-badges {
	display: flex;
	flex-wrap: wrap;
	gap: var(--webstore-space-1);
	left: var(--webstore-space-2);
	list-style: none;
	margin: 0;
	padding: 0;
	position: absolute;
	top: var(--webstore-space-2);
}

/*
 * Badges in the flow, rather than over a picture.
 *
 * `.ws-badges` is absolutely positioned because on a product card it sits in
 * the corner of the image. The product page asks for `--inline` and that
 * modifier was never written, so the badge kept its corner position - and with
 * no positioned image beside it, it landed on top of the product's own title.
 * "Sold out" was printed across the middle of the word it applied to.
 */
.ws-badges--inline {
	margin-bottom: var(--webstore-space-3);
	position: static;
}

.ws-badge {
	background: var(--webstore-color-bg);
	border-radius: var(--webstore-radius-control);
	color: var(--webstore-color-ink);
	box-shadow: var(--webstore-shadow-sm);
	font-size: var(--webstore-scale-xs);
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: var(--webstore-space-1) var(--webstore-space-2);
	text-transform: uppercase;
}

.ws-badge--sale {
	background: var(--webstore-color-sale);
	color: var(--webstore-color-bg);
}

.ws-badge--sold-out {
	background: var(--webstore-color-ink);
	color: var(--webstore-color-bg);
}

.ws-badge--low-stock {
	background: var(--webstore-color-warning);
	color: var(--webstore-color-bg);
}

/* ---------------------------------------------------------------- Buttons */

.ws-button {
	background: var(--webstore-color-accent);
	border: var(--webstore-border-width) solid var(--webstore-color-accent);
	border-radius: var(--webstore-radius-control);
	color: var(--webstore-color-accent-ink);
	cursor: pointer;
	display: inline-block;
	font: inherit;
	font-weight: 500;
	letter-spacing: var(--webstore-tracking-heading);
	padding: var(--webstore-space-3) var(--webstore-space-5);
	text-align: center;
	text-decoration: none;
	text-transform: var(--webstore-transform-button);
	transition: background var(--webstore-transition), border-color var(--webstore-transition);
}

.ws-button:hover:not([disabled]),
.ws-button:focus-visible:not([disabled]) {
	background: var(--webstore-color-accent-hover);
	border-color: var(--webstore-color-accent-hover);
}

/*
 * Restyled, not faded.
 *
 * `opacity: 0.45` took white-on-near-black down to about 2.6:1 - and the button
 * this applies to is the one that says **Sold out**, which is the single most
 * important word on an unavailable product. WCAG exempts disabled controls, and
 * the exemption is the wrong call here: the customer is not being asked to
 * operate this control, they are being asked to read it.
 *
 * So it takes real colours instead. `ink-muted` on `surface` is 5.8:1, and both
 * are already held to that by the contrast check.
 */
.ws-button[disabled] {
	background: var(--webstore-color-surface);
	border-color: var(--webstore-color-field-border);
	color: var(--webstore-color-ink-muted);
	cursor: not-allowed;
}

/* Exactly one primary button style. Everything else is secondary or a link -
   that restraint is most of what makes an interface feel considered. */
.ws-button--secondary {
	background: transparent;

	/* Transparent, so the border is the only thing saying this is a button -
	   which is why it takes the floored width as well as the darker colour.
	   The primary button is identified by its fill and needs neither. */
	border-color: var(--webstore-color-field-border);
	border-width: var(--webstore-field-border-width);
	color: var(--webstore-color-ink);
}

.ws-button--secondary:hover:not([disabled]),
.ws-button--secondary:focus-visible:not([disabled]) {
	background: var(--webstore-color-surface);
	border-color: var(--webstore-color-ink);
}

.ws-button--add {
	margin-top: auto;
	width: 100%;
}

.ws-loadmore {
	display: flex;
	justify-content: center;
	margin-top: var(--webstore-space-10);
}

/* ------------------------------------------------------------ Empty state */

.ws-empty {
	border: var(--webstore-border-width) dashed var(--webstore-color-border);
	border-radius: var(--webstore-radius-lg);
	padding: var(--webstore-space-12) var(--webstore-space-6);
	text-align: center;
}

.ws-empty__title {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-xl);
	margin: 0 0 var(--webstore-space-2);
}

.ws-empty__body {
	color: var(--webstore-color-ink-muted);
	margin: 0 0 var(--webstore-space-6);
}

/* ---------------------------------------------------------- Accessibility */

.webstore :focus-visible {
	outline: 2px solid var(--webstore-color-ink);
	outline-offset: 2px;
}

.ws-visually-hidden {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

@media (prefers-reduced-motion: reduce) {
	.webstore *,
	.webstore *::before,
	.webstore *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* --------------------------------------------------------------- Feedback */

.ws-toast {
	background: var(--webstore-color-ink);
	border-radius: var(--webstore-radius-md);
	bottom: var(--webstore-space-6);
	box-shadow: var(--webstore-shadow-lg);
	color: var(--webstore-color-bg);
	left: 50%;
	padding: var(--webstore-space-3) var(--webstore-space-5);
	position: fixed;
	transform: translateX(-50%);
	z-index: 9999;
}

.ws-toast--error {
	background: var(--webstore-color-danger);
	color: var(--webstore-color-bg);
}

/* --------------------------------------------------------------- Notices */

.ws-notice {
	background: var(--webstore-color-surface);
	border: var(--webstore-border-width) solid var(--webstore-color-border);
	border-left-color: var(--webstore-color-success);
	border-left-width: 3px;
	border-radius: var(--webstore-radius-sm);
	margin: 0 0 var(--webstore-space-4);
	padding: var(--webstore-space-3) var(--webstore-space-4);
}

.ws-notice--error {
	border-left-color: var(--webstore-color-danger);
}

.ws-notice--warning {
	border-left-color: var(--webstore-color-warning);
}

/* ----------------------------------------------------------------- Forms */

.ws-field {
	margin-bottom: var(--webstore-space-4);
}

.ws-field-row {
	display: grid;
	gap: var(--webstore-space-4);
	grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}

.ws-field__label {
	display: block;
	font-size: var(--webstore-scale-sm);
	font-weight: 500;
	margin-bottom: var(--webstore-space-1);
}

.ws-field__optional {
	color: var(--webstore-color-ink-muted);
	font-weight: 400;
}

.ws-field__control {
	background: var(--webstore-color-bg);
	border: var(--webstore-field-border-width) solid var(--webstore-color-field-border);
	border-radius: var(--webstore-radius-control);
	color: var(--webstore-color-ink);
	font: inherit;
	padding: var(--webstore-space-3);
	width: 100%;
}

.ws-field__control:focus {
	border-color: var(--webstore-color-accent);
}

.ws-field__control--qty {
	max-width: 5.5rem;
	padding: var(--webstore-space-2);
	text-align: center;
}

.ws-field__help {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-xs);
	margin: var(--webstore-space-1) 0 0;
}

.ws-fieldset {
	border: 0;
	margin: 0 0 var(--webstore-space-8);
	padding: 0;
}

.ws-fieldset__legend {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-lg);
	font-weight: var(--webstore-weight-heading);
	letter-spacing: var(--webstore-tracking-heading);
	margin-bottom: var(--webstore-space-4);
	padding: 0;
}

.ws-checkbox,
.ws-radio {
	align-items: flex-start;
	cursor: pointer;
	display: flex;
	gap: var(--webstore-space-3);
	margin-bottom: var(--webstore-space-2);
}

.ws-checkbox input,
.ws-radio input {
	margin-top: 0.2em;
}

/* --------------------------------------------------------- Product detail */

.ws-breadcrumb {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
	margin-bottom: var(--webstore-space-6);
}

/*
 * An ordered list, because a trail is ordered and a screen reader should say
 * how many levels deep the page is. The separator is generated rather than
 * written into the markup: a literal "/" between links is read aloud as
 * "slash" by some screen readers and copied into the clipboard by everyone.
 */
.ws-breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--webstore-space-2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ws-breadcrumb__item + .ws-breadcrumb__item::before {
	content: "/";
	margin-right: var(--webstore-space-2);
	opacity: 0.6;
}

.ws-breadcrumb a {
	color: inherit;
}

/* The page you are on is the one worth reading; the path back is quieter. */
.ws-breadcrumb [aria-current="page"] {
	color: var(--webstore-color-ink);
}

.ws-product__layout {
	display: grid;
	gap: var(--webstore-space-10);
	grid-template-columns: 1fr;
}

@media (min-width: 820px) {
	.ws-product__layout {
		align-items: start;
		grid-template-columns: 1.1fr 1fr;
	}

	/* Sticky on desktop only. On a phone it would eat the viewport. */
	.ws-product__detail {
		position: sticky;
		top: var(--webstore-space-6);
	}
}

.ws-product__image {
	aspect-ratio: var(--webstore-card-ratio);
	background: var(--webstore-color-surface);
	border-radius: var(--webstore-radius-lg);
	margin: 0;
	overflow: hidden;
}

.ws-product__image img {
	display: block;
	height: 100%;
	object-fit: var(--webstore-image-fit);
	width: 100%;
}

.ws-product__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: var(--webstore-space-2);
	list-style: none;
	margin: var(--webstore-space-3) 0 0;
	padding: 0;
}

.ws-product__thumb {
	background: none;
	border: var(--webstore-border-width) solid transparent;
	border-radius: var(--webstore-radius-sm);
	cursor: pointer;
	overflow: hidden;
	padding: 0;
	width: 72px;
}

.ws-product__thumb.is-active {
	border-color: var(--webstore-color-accent);
}

.ws-product__thumb img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.ws-product__title {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-2xl);
	font-weight: var(--webstore-weight-heading);
	letter-spacing: var(--webstore-tracking-heading);
	line-height: 1.2;
	margin: 0 0 var(--webstore-space-3);
}

.ws-product__summary {
	color: var(--webstore-color-ink-muted);
	margin: 0 0 var(--webstore-space-4);
	max-width: 60ch;
}

.ws-product__price {
	align-items: baseline;
	display: flex;
	gap: var(--webstore-space-3);
	margin: 0 0 var(--webstore-space-1);
}

.ws-product__price .ws-price__now {
	font-size: var(--webstore-scale-xl);
}

.ws-product__taxnote,
.ws-product__sku {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-xs);
	margin: 0 0 var(--webstore-space-4);
}

.ws-product__form {
	margin: var(--webstore-space-6) 0;
}

.ws-product__stock {
	color: var(--webstore-color-warning);
	font-size: var(--webstore-scale-sm);
	margin: var(--webstore-space-3) 0 0;
	min-height: 1.4em;
}

.ws-product__promise {
	background: var(--webstore-color-surface);
	border-radius: var(--webstore-radius-md);
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
	margin: 0 0 var(--webstore-space-6);
	padding: var(--webstore-space-4);
}

.ws-product__section-title {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-lg);
	font-weight: var(--webstore-weight-heading);
	margin: 0 0 var(--webstore-space-3);
}

.ws-product__description {
	border-top: var(--webstore-border-width) solid var(--webstore-color-border);
	max-width: 65ch;
	padding-top: var(--webstore-space-6);
}

.ws-button--block {
	display: block;
	width: 100%;
}

.ws-button--small {
	font-size: var(--webstore-scale-sm);
	padding: var(--webstore-space-2) var(--webstore-space-3);
}

/* ------------------------------------------------------------------ Lines */

.ws-lines {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ws-line {
	align-items: center;
	border-bottom: var(--webstore-border-width) solid var(--webstore-color-border);
	display: grid;
	gap: var(--webstore-space-3);
	grid-template-columns: 80px 1fr auto auto auto;
	padding: var(--webstore-space-4) 0;
}

.ws-line--compact {
	grid-template-columns: auto 1fr auto;
	padding: var(--webstore-space-3) 0;
}

.ws-line__media {
	border-radius: var(--webstore-radius-media);
	display: block;
	overflow: hidden;
}

.ws-line__media img,
.ws-line__placeholder {
	aspect-ratio: 1 / 1;
	background: var(--webstore-color-surface);
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.ws-line__detail {
	display: flex;
	flex-direction: column;
	gap: var(--webstore-space-1);
	min-width: 0;
}

.ws-line__title {
	color: inherit;
	font-weight: 500;
	text-decoration: none;
}

.ws-line__options,
.ws-line__unit,
.ws-line__sku {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-xs);
	margin: 0;
}

.ws-line__qty {
	color: var(--webstore-color-ink-muted);
	font-variant-numeric: tabular-nums;
}

.ws-line__total {
	font-variant-numeric: tabular-nums;
	margin: 0;
	white-space: nowrap;
}

.ws-line__remove-button {
	background: none;
	border: 0;
	color: var(--webstore-color-ink-muted);
	cursor: pointer;
	font-size: var(--webstore-scale-lg);
	line-height: 1;
	padding: var(--webstore-space-2);
}

.ws-line__remove-button:hover,
.ws-line__remove-button:focus-visible {
	color: var(--webstore-color-danger);
}

@media (max-width: 620px) {
	.ws-line {
		grid-template-columns: 64px 1fr auto;
	}

	.ws-line__quantity,
	.ws-line__total {
		grid-column: 2 / -1;
	}
}

/* ----------------------------------------------------------------- Totals */

.ws-totals {
	margin: var(--webstore-space-4) 0;
}

.ws-totals__row {
	display: flex;
	justify-content: space-between;
	padding: var(--webstore-space-2) 0;
}

.ws-totals__row dt {
	color: var(--webstore-color-ink-muted);
}

.ws-totals__row dd {
	font-variant-numeric: tabular-nums;
	margin: 0;
}

.ws-totals__row--total {
	border-top: var(--webstore-border-width) solid var(--webstore-color-border);
	font-size: var(--webstore-scale-lg);
	margin-top: var(--webstore-space-2);
	padding-top: var(--webstore-space-3);
}

.ws-totals__row--total dt {
	color: var(--webstore-color-ink);
	font-weight: var(--webstore-weight-heading);
}

.ws-totals__row--hidden {
	display: none;
}

/* ------------------------------------------------------------------- Cart */

.ws-cart__title,
.ws-checkout__title,
.ws-order__title {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-2xl);
	font-weight: var(--webstore-weight-heading);
	letter-spacing: var(--webstore-tracking-heading);
	margin: 0 0 var(--webstore-space-6);
}

.ws-cart__layout,
.ws-checkout__layout {
	display: grid;
	gap: var(--webstore-space-8);
	grid-template-columns: 1fr;
}

@media (min-width: 860px) {
	.ws-cart__layout,
	.ws-checkout__layout {
		align-items: start;
		grid-template-columns: 1.6fr 1fr;
	}
}

.ws-cart__summary,
.ws-checkout__summary {
	background: var(--webstore-color-surface);
	border-radius: var(--webstore-radius-md);
	padding: var(--webstore-space-6);
	/* The summary stays in view while the customer works down the form. A
	   total that scrolls away is a total people stop trusting. */
	position: sticky;
	top: var(--webstore-space-6);
}

.ws-cart__summary-title {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-lg);
	font-weight: var(--webstore-weight-heading);
	margin: 0 0 var(--webstore-space-4);
}

.ws-cart__continue,
.ws-checkout__edit {
	color: var(--webstore-color-ink-muted);
	display: inline-block;
	font-size: var(--webstore-scale-sm);
	margin-top: var(--webstore-space-4);
}

.ws-cart__reassurance,
.ws-checkout__secure,
.ws-checkout__terms {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-xs);
	margin: var(--webstore-space-3) 0 0;
}

.ws-discount__row {
	display: flex;
	gap: var(--webstore-space-2);
}

.ws-discount__row .ws-button {
	flex: 0 0 auto;
	padding: var(--webstore-space-3);
}

/* --------------------------------------------------------------- Checkout */

.ws-checkout__status {
	border-radius: var(--webstore-radius-md);
	margin-bottom: var(--webstore-space-6);
	padding: var(--webstore-space-4);
}

.ws-checkout__status--working,
.ws-checkout__status--waiting {
	background: var(--webstore-color-surface);
	border-left: 3px solid var(--webstore-color-warning);
}

.ws-checkout__status--error {
	background: var(--webstore-color-surface);
	border-left: 3px solid var(--webstore-color-danger);
}

.ws-checkout__status--success {
	background: var(--webstore-color-surface);
	border-left: 3px solid var(--webstore-color-success);
}

.ws-checkout__reference {
	color: var(--webstore-color-ink-muted);
	display: block;
	font-size: var(--webstore-scale-xs);
	margin-top: var(--webstore-space-1);
}

.ws-payment {
	margin-top: var(--webstore-space-4);
	min-height: 3rem;
}

/* ------------------------------------------------------------------ Order */

.ws-order__header {
	border-radius: var(--webstore-radius-md);
	margin-bottom: var(--webstore-space-8);
	padding: var(--webstore-space-6);
}

.ws-order__header--success {
	background: var(--webstore-color-surface);
	border-left: 3px solid var(--webstore-color-success);
}

.ws-order__header--pending {
	background: var(--webstore-color-surface);
	border-left: 3px solid var(--webstore-color-warning);
}

.ws-order__header--failed {
	background: var(--webstore-color-surface);
	border-left: 3px solid var(--webstore-color-danger);
}

.ws-order__title {
	margin-bottom: var(--webstore-space-3);
}

.ws-order__lede {
	margin: 0 0 var(--webstore-space-2);
	max-width: 60ch;
}

.ws-order__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--webstore-space-8);
	margin: 0 0 var(--webstore-space-8);
}

.ws-order__meta-row dt {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-xs);
}

.ws-order__meta-row dd {
	font-weight: 500;
	margin: 0;
}

.ws-order__section {
	margin-bottom: var(--webstore-space-8);
}

.ws-order__section-title {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-lg);
	font-weight: var(--webstore-weight-heading);
	margin: 0 0 var(--webstore-space-3);
}

.ws-order__address {
	font-style: normal;
	line-height: 1.6;
}

/*
 * Downloads on the receipt (D-7).
 *
 * Every grant is listed, including the ones that will not work, so an
 * unavailable row has to read as *unavailable* rather than as a link somebody
 * has not noticed is dead. Fading it would not do that: at the contrast ratios
 * §1.4.3 requires, "faded" and "ordinary" are hard to tell apart, and a faded
 * row is also the one screen readers announce identically to a live one. So the
 * name loses its link styling and gains a stated reason instead.
 */
.ws-downloads {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--webstore-space-2);
}

.ws-download {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--webstore-space-2) var(--webstore-space-4);
	padding: var(--webstore-space-3) 0;
	border-bottom: var(--webstore-border-width) solid var(--webstore-color-border);
}

.ws-download__link {
	font-weight: var(--webstore-weight-heading);
	color: var(--webstore-color-accent);
}

.ws-download__name {
	font-weight: var(--webstore-weight-heading);
}

.ws-download__meta {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
}

.ws-download.is-unavailable .ws-download__meta {
	/*
	 * The reason is the important half of an unavailable row, so it is stated
	 * in full ink rather than muted. Muting it would put the one sentence the
	 * customer needs at the lowest contrast on the page.
	 */
	color: var(--webstore-color-ink);
	font-weight: var(--webstore-weight-heading);
}

.ws-download--refused,
.ws-download.is-unavailable .ws-download__name {
	color: var(--webstore-color-ink);
}

.ws-order__refund,
.ws-order__help {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
}

/* ----------------------------------------------------------------- Drawer */

.ws-drawer {
	inset: 0;
	position: fixed;
	z-index: 9998;
}

.ws-drawer__scrim {
	background: rgba(0, 0, 0, 0.4);
	inset: 0;
	position: absolute;
}

.ws-drawer__panel {
	background: var(--webstore-color-bg);
	border-radius: var(--webstore-radius-lg) 0 0 var(--webstore-radius-lg);
	bottom: 0;
	box-shadow: var(--webstore-shadow-lg);
	display: flex;
	flex-direction: column;
	max-width: 100%;
	overflow-y: auto;
	padding: var(--webstore-space-6);
	position: absolute;
	right: 0;
	top: 0;
	width: 24rem;
}

.ws-drawer__header {
	align-items: center;
	border-bottom: var(--webstore-border-width) solid var(--webstore-color-border);
	display: flex;
	justify-content: space-between;
	padding-bottom: var(--webstore-space-4);
}

.ws-drawer__title {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-lg);
	font-weight: var(--webstore-weight-heading);
	margin: 0;
}

.ws-drawer__close {
	background: none;
	border: 0;
	color: var(--webstore-color-ink);
	cursor: pointer;
	font-size: var(--webstore-scale-xl);
	line-height: 1;
	padding: var(--webstore-space-2);
}

.ws-drawer__lines {
	flex: 1 1 auto;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ws-drawer__empty {
	color: var(--webstore-color-ink-muted);
	padding: var(--webstore-space-8) 0;
	text-align: center;
}

.ws-drawer__footer {
	border-top: var(--webstore-border-width) solid var(--webstore-color-border);
	padding-top: var(--webstore-space-4);
}

.ws-drawer__total {
	font-size: var(--webstore-scale-lg);
	font-weight: var(--webstore-weight-heading);
	margin: 0 0 var(--webstore-space-4);
	text-align: right;
}

.ws-drawer__view {
	color: var(--webstore-color-ink-muted);
	display: block;
	font-size: var(--webstore-scale-sm);
	margin-top: var(--webstore-space-3);
	text-align: center;
}

/* Scroll is locked behind the drawer, or the page moves under the panel. */
body.ws-drawer-open {
	overflow: hidden;
}

.ws-listing__tagline {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-lg);
	margin: 0 0 var(--webstore-space-3);
	max-width: 60ch;
}

/* ----------------------------------------------------------- Announcement */

.ws-announcement {
	align-items: center;
	background: var(--webstore-color-accent);
	border-radius: var(--webstore-radius-md);
	color: var(--webstore-color-accent-ink);
	display: flex;
	gap: var(--webstore-space-3);
	justify-content: center;
	margin-bottom: var(--webstore-space-6);
	padding: var(--webstore-space-3) var(--webstore-space-4);
	text-align: center;
}

.ws-announcement__text {
	margin: 0;
}

.ws-announcement__link {
	color: inherit;
	text-underline-offset: 3px;
}

.ws-announcement__close {
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	font-size: var(--webstore-scale-lg);
	line-height: 1;
	margin-left: auto;
	padding: 0 var(--webstore-space-2);
}

/* ------------------------------------------------------------- Store home */

.ws-home__header {
	margin-bottom: var(--webstore-space-8);
}

.ws-home__title {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-3xl);
	font-weight: var(--webstore-weight-heading);
	letter-spacing: var(--webstore-tracking-heading);
	line-height: 1.15;
	margin: 0 0 var(--webstore-space-2);
}

.ws-home__tagline {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-lg);
	margin: 0;
	max-width: 60ch;
}

.ws-section {
	margin-bottom: var(--webstore-space-12);
}

/*
 * A grid rather than a wrapping flex row, and the reason is `max-width`.
 *
 * The intro used to ask for its own line with `flex-basis: 100%`, and never got
 * one: an item's hypothetical size is clamped by its own `max-width` before
 * lines are broken, so the 60-character measure below meant the browser found
 * room for it beside the heading and put it there. The declarations said one
 * thing and the page did another - which is why this reads as a deliberate
 * layout rather than a rule that quietly did nothing.
 */
.ws-section__header {
	align-items: baseline;
	column-gap: var(--webstore-space-3);
	display: grid;
	grid-template-columns: 1fr auto;
	margin-bottom: var(--webstore-space-5);
	row-gap: var(--webstore-space-2);
}

.ws-section__heading {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-2xl);
	font-weight: var(--webstore-weight-heading);
	letter-spacing: var(--webstore-tracking-heading);
	margin: 0;
}

.ws-section__intro {
	color: var(--webstore-color-ink-muted);
	grid-column: 1 / -1;
	margin: 0;

	/* A measure, so a long opening line does not run the width of the page. */
	max-width: 60ch;
}

.ws-section__more {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
	justify-self: end;
}

.ws-section--promoted {
	background: var(--webstore-color-surface);
	border-radius: var(--webstore-radius-lg);
	padding: var(--webstore-space-8);
}

/* --------------------------------------------------------------- The hero */

/*
 * Sized to its content, never to the viewport. A hero with `height: 100vh`
 * pushes the shop below the fold, which is the opposite of what a shop's front
 * page is for.
 */
.ws-hero {
	align-items: center;
	background: var(--webstore-color-surface);
	border-radius: var(--webstore-radius-lg);
	display: grid;
	gap: var(--webstore-space-8);
	grid-template-columns: 1fr;
	margin-bottom: var(--webstore-space-12);
	overflow: hidden;
}

@media (min-width: 760px) {
	.ws-hero--with-image {
		grid-template-columns: 1.2fr 1fr;
	}
}

.ws-hero__media {
	margin: 0;
}

.ws-hero__image {
	display: block;
	height: 100%;
	max-height: 420px;
	object-fit: cover;
	width: 100%;
}

.ws-hero__body {
	padding: var(--webstore-space-8);
}

.ws-hero--with-image .ws-hero__body {
	padding-left: var(--webstore-space-4);
}

@media (max-width: 759px) {
	.ws-hero--with-image .ws-hero__body {
		padding-left: var(--webstore-space-8);
	}
}

.ws-hero__heading {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-3xl);
	font-weight: var(--webstore-weight-heading);
	letter-spacing: var(--webstore-tracking-heading);
	line-height: 1.1;
	margin: 0 0 var(--webstore-space-3);
}

.ws-hero__text {
	color: var(--webstore-color-ink-muted);
	margin: 0 0 var(--webstore-space-6);
	max-width: 45ch;
}

/* --------------------------------------------------------- Collection tiles */

.ws-tiles {
	display: grid;
	gap: var(--webstore-grid-gap);
	grid-template-columns: repeat(auto-fill, minmax(min(var(--webstore-grid-min), 45%), 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.ws-tile {
	margin: 0;
}

.ws-tile__link {
	color: inherit;
	display: block;
	text-decoration: none;
}

.ws-tile__media {
	aspect-ratio: var(--webstore-card-ratio);
	background: var(--webstore-color-surface);
	border-radius: var(--webstore-radius-media);
	display: block;
	overflow: hidden;
}

.ws-tile__image {
	display: block;
	height: 100%;
	object-fit: var(--webstore-image-fit);
	transition: transform var(--webstore-transition);
	width: 100%;
}

.ws-tile__link:hover .ws-tile__image,
.ws-tile__link:focus-visible .ws-tile__image {
	transform: scale(1.03);
}

.ws-tile__body {
	display: block;
	padding-top: var(--webstore-space-3);
}

.ws-tile__name {
	display: block;
	font-weight: 500;
}

.ws-tile__count {
	color: var(--webstore-color-ink-muted);
	display: block;
	font-size: var(--webstore-scale-xs);
}

/* ------------------------------------------------------------ Testimonials */

.ws-quotes {
	display: grid;
	gap: var(--webstore-grid-gap);
	grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.ws-quote {
	margin: 0;
}

.ws-quote__figure {
	background: var(--webstore-color-surface);
	border-radius: var(--webstore-radius-md);
	height: 100%;
	margin: 0;
	padding: var(--webstore-space-6);
}

.ws-quote__text {
	font-size: var(--webstore-scale-lg);
	line-height: 1.5;
	margin: 0 0 var(--webstore-space-3);
	quotes: '"' '"';
}

.ws-quote__text::before {
	content: open-quote;
}

.ws-quote__text::after {
	content: close-quote;
}

.ws-quote__name {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
}

/* ---------------------------------------------------------------- Events */

/*
 * A list, not a grid of cards.
 *
 * Three markets is the normal case and four is a busy December, so a grid
 * spends the width of the page on three tiles and a gap. A list reads down in
 * date order, which is the order the question is asked in - "when can I come
 * and see you" - and it stays sensible whether there is one or eight.
 */
.ws-events {
	border-top: var(--webstore-border-width) solid var(--webstore-color-border);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ws-event {
	border-bottom: var(--webstore-border-width) solid var(--webstore-color-border);
	display: grid;
	gap: var(--webstore-space-1) var(--webstore-space-6);
	padding: var(--webstore-space-4) 0;
}

/*
 * The date gets its own column once there is room for one, so the dates line
 * up and the eye can run down them. Below that everything stacks, because a
 * date column on a phone is a column two words wide.
 */
@media (min-width: 40em) {
	.ws-event {
		grid-template-columns: minmax(9rem, max-content) 1fr;
	}

	.ws-event__when {
		grid-row: 1 / span 3;
	}
}

.ws-event__when {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
	margin: 0;
	font-variant-numeric: tabular-nums;
}

.ws-event__until {
	display: block;
}

.ws-event__name {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-lg);
	font-weight: 500;
	line-height: 1.3;
	margin: 0;
}

.ws-event__link {
	color: inherit;
}

.ws-event__place,
.ws-event__time {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
	margin: 0;
}

/* --------------------------------------------------------- Listing layout */

.ws-listing__layout {
	display: grid;
	gap: var(--webstore-space-8);
	grid-template-columns: 1fr;
}

/*
 * The rail earns its screen space only at a reasonable width. Below that the
 * panel becomes a sheet, which is what the toggle button is for.
 */
@media (min-width: 900px) {
	body.ws-has-filter-toggle .ws-listing__layout,
	.ws-listing__layout {
		align-items: start;
		grid-template-columns: 240px 1fr;
	}

	.ws-toolbar__filter {
		display: none;
	}
}

/*
 * A shop with nothing in it yet gets the whole width for saying so, rather than
 * a 240px column of filters beside an empty state. Declared after the media
 * query above, which would otherwise put the rail column back at 900px.
 */
.ws-listing__layout--bare {
	grid-template-columns: 1fr;
}

.ws-listing__results {
	min-width: 0;
}

/* --------------------------------------------------------------- Filters */

.ws-filters {
	border: var(--webstore-border-width) solid var(--webstore-color-border);
	border-radius: var(--webstore-radius-md);
	padding: var(--webstore-space-5);
}

.ws-filters__header {
	align-items: baseline;
	display: flex;
	gap: var(--webstore-space-3);
	margin-bottom: var(--webstore-space-4);
}

.ws-filters__title {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-lg);
	font-weight: var(--webstore-weight-heading);
	margin: 0;
}

.ws-filters__clear {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
	margin-left: auto;
}

.ws-filters__close {
	background: none;
	border: 0;
	color: var(--webstore-color-ink);
	cursor: pointer;
	display: none;
	font-size: var(--webstore-scale-xl);
	line-height: 1;
	padding: 0 var(--webstore-space-2);
}

.ws-facet {
	border: 0;
	border-top: var(--webstore-border-width) solid var(--webstore-color-border);
	margin: 0;
	padding: var(--webstore-space-4) 0 0;
}

.ws-facet:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.ws-facet__legend {
	font-size: var(--webstore-scale-sm);
	font-weight: 600;
	letter-spacing: 0.03em;
	margin-bottom: var(--webstore-space-2);
	padding: 0;
	text-transform: uppercase;
}

.ws-facet__options {
	list-style: none;
	margin: 0 0 var(--webstore-space-4);
	padding: 0;
}

.ws-facet__option {
	margin: 0;
}

.ws-facet__label {
	color: inherit;
	display: flex;
	gap: var(--webstore-space-2);
	justify-content: space-between;
	padding: var(--webstore-space-1) 0;
	text-decoration: none;
}

.ws-facet__label:hover .ws-facet__name,
.ws-facet__label:focus-visible .ws-facet__name {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ws-facet__label.is-selected .ws-facet__name {
	font-weight: 600;
}

.ws-facet__label.is-selected .ws-facet__name::before {
	content: "\2713\00a0";
}

.ws-facet__count {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-xs);
	font-variant-numeric: tabular-nums;
}

/* Muted, not faded. A facet showing "(0)" is telling the customer something
   about the catalogue, and at 40% opacity they could not read it. */
.ws-facet__option.is-disabled {
	color: var(--webstore-color-ink-muted);
	cursor: not-allowed;
}

.ws-facet__price {
	align-items: center;
	display: flex;
	gap: var(--webstore-space-2);
}

.ws-field__control--price {
	min-width: 0;
	padding: var(--webstore-space-2);
	text-align: center;
}

.ws-facet__price-sep {
	color: var(--webstore-color-ink-muted);
}

.ws-facet__hint {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-xs);
	margin: var(--webstore-space-2) 0 0;
}

/* The sheet, on narrow screens only. */
@media (max-width: 899px) {
	.ws-filters {
		background: var(--webstore-color-bg);
		border: 0;
		border-radius: 0;
		bottom: 0;
		display: none;
		left: 0;
		overflow-y: auto;
		padding: var(--webstore-space-6);
		position: fixed;
		right: 0;
		top: 0;
		z-index: 9997;
	}

	.ws-filters.is-open {
		display: block;
	}

	.ws-filters__close {
		display: block;
	}

	body.ws-filters-open {
		overflow: hidden;
	}

	/*
	 * Without JavaScript the toggle never binds, the body class is never added
	 * and the panel has to be visible - a filter panel that can only be opened
	 * by script is a filter panel that does not exist for some visitors.
	 */
	body:not(.ws-has-filter-toggle) .ws-filters {
		display: block;
		position: static;
	}

	body:not(.ws-has-filter-toggle) .ws-filters__close {
		display: none;
	}
}

/* ------------------------------------------------------------------ Chips */

.ws-chips {
	display: flex;
	flex-wrap: wrap;
	gap: var(--webstore-space-2);
	list-style: none;
	margin: 0 0 var(--webstore-space-5);
	padding: 0;
}

.ws-chip__remove {
	color: var(--webstore-color-ink-muted);
	margin-left: var(--webstore-space-1);
}

.ws-chip {
	align-items: center;
	display: inline-flex;
}

.ws-toolbar__badge {
	background: var(--webstore-color-accent);
	border-radius: 999px;
	color: var(--webstore-color-accent-ink);
	display: inline-block;
	font-size: var(--webstore-scale-xs);
	line-height: 1.6;
	margin-left: var(--webstore-space-2);
	min-width: 1.6em;
	text-align: center;
}

/* ----------------------------------------------------------------- Search */

.ws-search__header {
	margin-bottom: var(--webstore-space-8);
	max-width: 40rem;
}

.ws-search__title {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-2xl);
	font-weight: var(--webstore-weight-heading);
	letter-spacing: var(--webstore-tracking-heading);
	margin: 0 0 var(--webstore-space-4);
}

.ws-search__form {
	display: flex;
	gap: var(--webstore-space-2);
	position: relative;
}

.ws-search__help {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-xs);
	margin: var(--webstore-space-2) 0 var(--webstore-space-3);
}

.ws-search__suggestions {
	background: var(--webstore-color-bg);
	border: var(--webstore-border-width) solid var(--webstore-color-border);
	border-radius: var(--webstore-radius-md);
	box-shadow: var(--webstore-shadow-md);
	left: 0;
	list-style: none;
	margin: 0;
	padding: var(--webstore-space-2);
	position: absolute;
	right: 0;
	top: calc(100% + var(--webstore-space-1));
	z-index: 20;
}

.ws-search__suggestion a {
	border-radius: var(--webstore-radius-control);
	color: inherit;
	display: flex;
	gap: var(--webstore-space-3);
	justify-content: space-between;
	padding: var(--webstore-space-2) var(--webstore-space-3);
	text-decoration: none;
}

.ws-search__suggestion a:hover,
.ws-search__suggestion a:focus-visible {
	background: var(--webstore-color-surface);
}

.ws-search__suggestion-price {
	color: var(--webstore-color-ink-muted);
	white-space: nowrap;
}

/* ---------------------------------------------------------------- Quick view */

/*
 * The modal a multi-variant card opens instead of navigating (Â§7.5). Every
 * value here is a token, so a shop that has recoloured itself in the Customizer
 * gets a modal that matches without touching this file (ADR-0010).
 */

.ws-quickview {
	inset: 0;
	position: fixed;
	z-index: 9999;
}

.ws-quickview__scrim {
	background: rgba(0, 0, 0, 0.5);
	inset: 0;
	position: absolute;
}

.ws-quickview__panel {
	background: var(--webstore-color-bg);
	border-radius: var(--webstore-radius-lg);
	box-shadow: var(--webstore-shadow-lg);
	display: flex;
	gap: var(--webstore-space-6);
	left: 50%;
	max-height: 88vh;
	max-width: min(46rem, calc(100vw - 2rem));
	overflow-y: auto;
	padding: var(--webstore-space-6);
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
}

.ws-quickview__close {
	background: none;
	border: 0;
	color: var(--webstore-color-ink-muted);
	cursor: pointer;
	font-size: 1.75rem;
	line-height: 1;
	padding: var(--webstore-space-2);
	position: absolute;
	right: var(--webstore-space-3);
	top: var(--webstore-space-3);
}

.ws-quickview__close:hover,
.ws-quickview__close:focus-visible {
	color: var(--webstore-color-ink);
}

.ws-quickview__body {
	display: flex;
	gap: var(--webstore-space-6);
	width: 100%;
}

.ws-quickview__image {
	aspect-ratio: 1;
	border-radius: var(--webstore-radius-media);
	flex: 0 0 40%;
	object-fit: cover;
}

.ws-quickview__detail {
	flex: 1 1 auto;
	min-width: 0;
}

.ws-quickview__title {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-lg);
	font-weight: var(--webstore-weight-heading);
	margin: 0 0 var(--webstore-space-2);
}

.ws-quickview__excerpt {
	color: var(--webstore-color-ink-muted);
	margin: 0 0 var(--webstore-space-4);
}

.ws-quickview__options {
	display: flex;
	flex-wrap: wrap;
	gap: var(--webstore-space-2);
	margin-bottom: var(--webstore-space-4);
}

.ws-quickview__option {
	background: var(--webstore-color-bg);
	border: var(--webstore-field-border-width) solid var(--webstore-color-field-border);
	border-radius: var(--webstore-radius-sm);
	color: var(--webstore-color-ink);
	cursor: pointer;
	padding: var(--webstore-space-2) var(--webstore-space-3);
}

.ws-quickview__option[aria-pressed="true"] {
	border-color: var(--webstore-color-accent);
	box-shadow: inset 0 0 0 1px var(--webstore-color-accent);
}

/*
 * Disabled, not hidden (Â§7.6). A combination the shop sells but has run out of
 * is information; removing it makes the picker jump about and hides the fact
 * that the size exists at all.
 */
/* The struck-through label already says "not this one", so the colour does not
   also have to - and §7.6 keeps unavailable options visible precisely so the
   customer can see the size exists. Unreadable defeats that. */
.ws-quickview__option:disabled {
	background: var(--webstore-color-surface);
	border-color: var(--webstore-color-border);
	color: var(--webstore-color-ink-muted);
	cursor: not-allowed;
	text-decoration: line-through;
}

.ws-quickview__price {
	font-size: var(--webstore-scale-lg);
	margin: 0 0 var(--webstore-space-4);
}

.ws-quickview__was {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-base);
	margin-left: var(--webstore-space-2);
}

.ws-quickview__more {
	margin: var(--webstore-space-3) 0 0;
}

.ws-quickview__loading {
	color: var(--webstore-color-ink-muted);
	padding: var(--webstore-space-6);
	text-align: center;
	width: 100%;
}

body.ws-has-modal {
	overflow: hidden;
}

@media (max-width: 40rem) {
	.ws-quickview__body {
		flex-direction: column;
	}

	.ws-quickview__image {
		flex: 0 0 auto;
		max-height: 40vh;
	}
}

/* ------------------------------------------------------------- Notify me */

.ws-product__notify {
	background: var(--webstore-color-surface);
	border-radius: var(--webstore-radius-md);
	margin: var(--webstore-space-4) 0;
	padding: var(--webstore-space-4);
}

.ws-product__notify-row {
	display: flex;
	gap: var(--webstore-space-2);
	margin-top: var(--webstore-space-2);
}

.ws-product__notify-row .ws-field__control {
	flex: 1 1 auto;
	min-width: 0;
}

/*
 * The promise, in small print but present. This form asks for an address and
 * the reader's next thought is what else it will be used for; the answer is on
 * the page rather than in a policy nobody opens.
 */
.ws-product__notify-note {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
	margin: var(--webstore-space-2) 0 0;
}

.ws-product__notify-said {
	margin: var(--webstore-space-2) 0 0;
}

/* --------------------------------------------------------- Search as chrome */

/*
 * The search box sits above every store page (§7.2), so it has to read as
 * chrome rather than as the point of the page: one line, quiet, and out of the
 * way of the first product. On the search results page it is still the same
 * form - there is only ever one - and the heading below it does the announcing.
 */
.ws-search__form {
	align-items: center;
	display: flex;
	gap: var(--webstore-space-2);
	margin: 0 0 var(--webstore-space-6);
	max-width: 32rem;
	position: relative;
}

.ws-search__form .ws-field__control {
	flex: 1 1 auto;
	min-width: 0;
}

.ws-search__help {
	color: var(--webstore-color-ink-muted);
	font-size: var(--webstore-scale-sm);
	margin: 0 0 var(--webstore-space-6);
}

/* ------------------------------------------------------------- Filter rail */

/*
 * §7.4. The permanent rail is a setting rather than the default: it earns its
 * screen space at hundreds of SKUs, and below that it is a wide empty column
 * beside a short grid. When it is on, it is a two-column layout on a desktop
 * and stacks on a phone - a fixed sidebar on a 390px screen is the grid pushed
 * off the bottom.
 */
@media (min-width: 900px) {
	.ws-listing__layout--rail {
		align-items: start;
		display: grid;
		gap: var(--webstore-space-8);
		grid-template-columns: minmax(200px, 16rem) 1fr;
	}

	.ws-listing__layout--rail .ws-listing__filters {
		display: block;
		position: sticky;
		top: var(--webstore-space-4);
	}
}

/* ------------------------------------------------------------- Pagination */

/*
 * D-8. Numbered pages for a catalogue somebody navigates deliberately. The
 * current page is a `span`, not a disabled link: a link to where you already
 * are is a promise the browser cannot keep, and `aria-current` is what a screen
 * reader is listening for.
 */
.ws-pagination {
	margin-top: var(--webstore-space-8);
}

.ws-pagination__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--webstore-space-2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ws-pagination__page {
	border: var(--webstore-field-border-width) solid var(--webstore-color-field-border);
	border-radius: var(--webstore-radius-control);
	color: var(--webstore-color-ink);
	display: inline-block;
	/* 44px, so a page number can be hit with a thumb. */
	min-width: 44px;
	padding: var(--webstore-space-3);
	text-align: center;
	text-decoration: none;
}

.ws-pagination__page.is-current {
	background: var(--webstore-color-accent);
	border-color: var(--webstore-color-accent);
	color: var(--webstore-color-accent-ink);
}

/* ------------------------------------------------------- Cross-sell strip */

/*
 * "More in this collection" (§7.6). Separated from the product above it by
 * space and a rule rather than by a box: a bordered panel reads as an advert,
 * and this is meant to read as more of the shop.
 */
.ws-related {
	border-top: var(--webstore-border-width) solid var(--webstore-color-border);
	margin-top: var(--webstore-space-12);
	padding-top: var(--webstore-space-8);
}

.ws-related__heading {
	font-family: var(--webstore-font-display);
	font-size: var(--webstore-scale-xl);
	font-weight: var(--webstore-weight-heading);
	letter-spacing: var(--webstore-tracking-heading);
	margin: 0 0 var(--webstore-space-6);
}
