/* Matjari shop: the listing pages. The shop, a category, a product search and
   the wishlist view are one template, woocommerce/archive-product.php.
   The contract is docs/DESIGN-SYSTEM.md: 2.12 and 3.1 (the grid per range),
   4.7 (the category row is the catnav of chrome.css, in its shop form), 4.10
   (the filter: one element in four modes, every group a disclosure; whole
   rows), 5.5 (what this file owns) and section 7 (the browser floor and
   hygiene). What a mode adds is its own file, opt/filter-<id>.css: `side`
   (a panel beside the grid from 1200), `bar` (a row of buttons above it from
   900), `chips` (the quick row). `sheet` is this file alone.

   What is NOT here: the product grid (base.css, on the Look's column tokens),
   the product card, the buttons, the checkbox, the empty state and the rail
   (components.css), the category navigation, the search field and every scrim
   (chrome.css). This file lays those out on a listing page and owns the rest:
   the page and its head, the category hero, the toolbar, the sort, the
   filters in force, the filter in both its shapes, the page numbers.

   Every value is a token or a role, read through the current layer, and this
   file declares no custom property. Ranges are min-width only: 600, and 900,
   1200 and 1600 for the next-page cell alone (section 8b).
   Hover lives behind (hover: hover) and (pointer: fine); everything a finger
   can press has an :active state outside it, on the Look's press tokens.
   ::after is this file's (the 44px hit areas); ::before is used on the sort's
   face only, for its focus ring. */

/* ==========================================================================
   1. The page and its head. A calm head: the title, then ONE row under it
   (the categories; on a search, what was searched for), then the listing.
   The space above and below the page is the Look's section rhythm.
   ========================================================================== */
.m-shop { padding-block: calc(var(--m-section-y) / 2) var(--m-section-y); }
.m-shop__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--m-sp-4);
	margin-block-end: var(--m-sp-3);
}
.m-shop__head h1 { margin: 0; }

/* A search that found something says what was searched for, close under the
   title: the search glyph and her words, which may be long. */
.m-shop__query {
	display: flex;
	align-items: center;
	gap: var(--m-sp-2);
	margin-block: calc(var(--m-sp-3) * -1) 0;
	margin-inline: 0;
	color: var(--m-c-ink-2);
	font-size: var(--m-fs-lead);
	line-height: var(--m-lh-ui);
	overflow-wrap: anywhere;
}
.m-shop__query svg { flex: none; }

/* The category's own page opens with the category: her picture in the Look's
   category frame, the title, her words. One block. A title alone is centred
   on the picture; a title with a paragraph under it starts level with the
   picture's top, so the picture never floats half way down her words. With
   no picture it is the title over the words. */
.m-cathero {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: start;
	gap: var(--m-sp-4);
}
.m-cathero--text { grid-template-columns: minmax(0, 1fr); }
.m-cathero__media {
	display: block;
	inline-size: var(--m-sp-11);
	block-size: var(--m-sp-11);
	overflow: hidden;
	border-radius: var(--m-frame-tile);
	background-color: var(--m-img-bg);
}
.m-cathero__img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.m-cathero__body { display: grid; align-self: center; gap: var(--m-sp-1); min-inline-size: 0; }
.m-cathero__text {
	max-inline-size: var(--m-measure);
	color: var(--m-c-ink-2);
	font-size: var(--m-fs-ui);
	line-height: var(--m-lh-ui);
}
.m-cathero__text p { margin: 0; }
.m-cathero__text p + p { margin-block-start: var(--m-sp-2); }

/* ==========================================================================
   2. The toolbar: ONE row at every width. The count at the start; the sort
   and the filter at the end. It never wraps: on the narrowest phone the
   sort's value gives way, with an ellipsis, before anything else does.

   The two tools are not twins. The filter is the button of the row (it opens
   something), in the Look's own quiet button; the sort is a value she can
   change, so it reads as text with a chevron. Neither is a chip: the row of
   chips above them is the categories, and two rows of pills is one too many.
   ========================================================================== */
.m-toolbar {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: var(--m-sp-3);
	min-block-size: var(--m-touch);
	margin-block-end: var(--m-sp-4);
}
/* The auto margin pushes everything after the count to the end edge. */
.m-toolbar__count {
	flex: none;
	margin-block: 0;
	margin-inline: 0 auto;
	color: var(--m-c-ink-2);
	font-size: var(--m-fs-small);
	font-weight: var(--m-fw-small);
	line-height: var(--m-lh-control);
	font-variant-numeric: var(--m-fvn);
	white-space: nowrap;
}

/* ---- The sort. The NATIVE select is laid over a painted face, invisible:
   the picker, the auto-submit and the label are the browser's own, and what
   is painted is the current label and an SVG chevron, which has no direction
   to get wrong. The select is the hit box, 44px tall. ---- */
.m-sort {
	display: flex;
	flex: 0 1 auto;
	align-items: center;
	gap: var(--m-sp-2);
	min-width: 0;
	margin: 0;
}
/* «الترتيب» is read to a screen reader at every width and shown from 600,
   where the row has the room to say what the value is. */
.m-sort__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	color: var(--m-c-ink-2);
	font-size: var(--m-fs-small);
	font-weight: var(--m-fw-small);
	line-height: var(--m-lh-control);
	white-space: nowrap;
}
.m-sortchip {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-width: 0;
	min-height: var(--m-touch);
	color: var(--m-c-ink);
	font-family: var(--m-font-ui);
	font-size: var(--m-fs-small);
	font-weight: var(--m-fw-strong);
	line-height: var(--m-lh-control);
	transition: color var(--m-dur-press) var(--m-ease), opacity var(--m-dur-press) var(--m-ease);
}
/* 16px, although nothing of it is seen: a phone zooms the page when a
   smaller control takes the focus, invisible or not. */
.m-sort select {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	opacity: 0;
	font-size: var(--m-fs-input);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.m-sortchip__face {
	display: inline-flex;
	align-items: center;
	gap: var(--m-sp-1);
	min-width: 0;
	pointer-events: none;
}
.m-sortchip__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-sortchip__face svg { flex: none; }
/* The ring is drawn on the face, because the focused element is invisible
   (an opacity-0 outline paints nothing). A sibling combinator, not :has():
   the face follows the select, and its pseudo-element is placed against the
   chip. */
.m-sort select:focus-visible ~ .m-sortchip__face::before {
	content: "";
	position: absolute;
	inset-block: var(--m-sp-2);
	inset-inline: calc(var(--m-sp-1) * -1);
	border-radius: var(--m-r-thumb);
	outline: var(--m-bw-focus) solid var(--m-c-focus);
	pointer-events: none;
}
.m-sortchip:active { opacity: .7; }

/* ---- The filter trigger: the Look's quiet button at the size of a tool,
   the same anatomy as the share control that takes its place on a wishlist.
   It says how many filters are in force, so a closed sheet never hides
   state. It is a link to the sheet, so it opens it with no script (section
   4). Where the filter is in the page it is not shown (`side` from 1200,
   `bar` from 900: their files). ---- */
.m-toolbar__filter {
	position: relative;
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: var(--m-btn-gap);
	min-height: var(--m-touch);
	margin: 0;
	padding-block: 0;
	padding-inline: var(--m-btn-px-sm);
	border: var(--m-btn-bw) solid var(--m-btn2-edge);
	border-radius: var(--m-btn-r);
	background-color: var(--m-btn2-bg);
	color: var(--m-btn2-ink);
	font-family: var(--m-btn-font);
	font-size: var(--m-fs-small);
	font-weight: var(--m-btn-fw);
	line-height: var(--m-lh-control);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color var(--m-dur-press) var(--m-ease), border-color var(--m-dur-press) var(--m-ease), transform var(--m-dur-press) var(--m-ease);
}
.m-toolbar__filter svg { flex: none; }
.m-toolbar__filter.has-active { border-color: var(--m-c-ink); }
.m-toolbar__filter:active { transform: var(--m-btn-press); opacity: var(--m-press-opacity); }
.m-toolbar__fcount {
	display: grid;
	place-content: center;
	min-inline-size: 20px;
	block-size: 20px;
	padding-inline: var(--m-sp-1);
	border-radius: var(--m-r-badge);
	background-color: var(--m-c-fill);
	color: var(--m-c-on-fill);
	font-family: var(--m-font-text);
	font-size: var(--m-fs-micro);
	font-weight: var(--m-fw-strong);
	line-height: var(--m-lh-control);
	font-variant-numeric: var(--m-fvn);
}

/* ==========================================================================
   3. The filters in force, above the grid: one chip each, and pressing a
   chip takes that filter off. This row is also what keeps a filter that left
   nothing from being a dead end (audit U2): what emptied the page is named,
   where she is looking, and each can be undone on its own.
   ========================================================================== */
.m-shop__active {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--m-sp-2);
	margin: 0 0 var(--m-sp-4);
	padding: 0;
	list-style: none;
}
.m-shop__chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: var(--m-sp-2);
	min-height: calc(var(--m-touch) - var(--m-sp-2));
	padding-inline: var(--m-sp-3) var(--m-sp-2);
	border-radius: var(--m-r-chip);
	background-color: var(--m-surface-3);
	color: var(--m-c-ink);
	font-family: var(--m-font-ui);
	font-size: var(--m-fs-small);
	font-weight: var(--m-fw-ui);
	line-height: var(--m-lh-control);
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	transition: background-color var(--m-dur-press) var(--m-ease), transform var(--m-dur-press) var(--m-ease);
}
.m-shop__chip svg { flex: none; color: var(--m-c-ink-2); }
.m-shop__chip .m-swatchchip__dot { inline-size: 14px; block-size: 14px; }
.m-shop__chip:active { transform: var(--m-btn-press); opacity: var(--m-press-opacity); }
.m-shop__clear, .m-filter__clear {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: calc(var(--m-touch) - var(--m-sp-2));
	padding-inline: var(--m-sp-2);
	color: var(--m-c-ink-2);
	font-size: var(--m-fs-small);
	font-weight: var(--m-fw-ui);
	line-height: var(--m-lh-control);
	text-decoration: underline;
	text-underline-offset: .22em;
	transition: color var(--m-dur-press) var(--m-ease);
}
.m-shop__clear:active, .m-filter__clear:active { color: var(--m-c-ink); }
/* The chips and the two links are 36px to the eye and 44px to a finger: a hit
   area as wide as the control, centred on it, sized by the touch token. A
   wrapped row sits 8px under the last, so two hit areas never overlap. The
   quick row's chips (opt/filter-chips.css) take the same area. */
.m-shop__chip::after, .m-shop__clear::after, .m-filter__clear::after, .m-shop__quick::after {
	content: "";
	position: absolute;
	inset-block-start: 50%;
	inset-inline-start: 0;
	width: 100%;
	height: var(--m-touch);
	margin-block-start: calc(var(--m-touch) / -2);
}

/* ==========================================================================
   4. The filter, as a sheet (4.10). One element, two shapes: this is the
   sheet, on the shared overlay primitive (overlay.js): from the bottom edge
   on a phone, from the end edge (where its trigger is) from 600. Section 6
   makes the same element a panel in the page. A page context: PHP prints the
   class, and the sheet paints the layer's own surface.

   Closed is a state of this stylesheet, never the [hidden] attribute: the
   panel beside the grid and the bar have to be there without a script. And
   without one the sheet still opens: the trigger is a link to it, so it is
   the page's target, and its close is a link back to the results. Once
   ui.js has taken the sheet over (`is-sheet`) only `is-open` opens it.
   ========================================================================== */
.m-filtersheet {
	position: fixed;
	inset-block-end: 0;
	inset-inline: 0;
	z-index: var(--m-z-drawer);
	display: flex;
	flex-direction: column;
	max-block-size: 88vh;
	border-block-start: var(--m-overlay-bw) solid var(--m-overlay-edge);
	border-radius: var(--m-r-sheet) var(--m-r-sheet) 0 0;
	background-color: var(--m-c-bg);
	box-shadow: var(--m-elev-3);
	transform: translateY(100%);
	visibility: hidden;
	transition: transform var(--m-dur-panel) var(--m-ease-exit), visibility 0s var(--m-dur-panel);
}
.m-filtersheet.is-open, .m-filtersheet:target:not(.is-sheet) { transform: none; visibility: visible; transition: transform var(--m-dur-panel) var(--m-ease), visibility 0s; }
.m-filtersheet__head {
	display: flex;
	flex: none;
	align-items: center;
	gap: var(--m-sp-2);
	min-block-size: var(--m-sp-10);
	padding-inline: var(--m-pad-sheet) var(--m-sp-2);
	border-block-end: var(--m-bw-hair) solid var(--m-c-line);
}
.m-filtersheet__heading {
	margin: 0;
	font-family: var(--m-font-subhead);
	font-size: var(--m-fs-h3);
	font-weight: var(--m-fw-subhead);
	line-height: var(--m-lh-heading);
}
.m-filtersheet__close {
	display: grid;
	place-items: center;
	flex: none;
	inline-size: var(--m-touch);
	block-size: var(--m-touch);
	margin-inline-start: auto;
	padding: 0;
	border: 0;
	border-radius: var(--m-r-control);
	background-color: transparent;
	color: var(--m-c-ink);
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--m-dur-press) var(--m-ease);
}
.m-filtersheet__close:active { background-color: rgba(var(--m-c-ink-rgb), .08); }
/* The groups scroll between the head and the foot, which both stay. */
.m-filtersheet__body {
	flex: 1 1 auto;
	min-block-size: 0;
	padding-inline: var(--m-pad-sheet);
	overflow-y: auto;
	overscroll-behavior: contain;
}
.m-filter { display: block; margin: 0; }
/* Every group is a disclosure (4.10.2): its title is its summary, one row a
   finger can hit, so a long sheet folds group by group, by finger, by
   keyboard and with no script. It starts open in every mode but `bar`. The
   mark is the store's one accordion sign (the FAQ's): a plus that closes
   into a minus, two bars and nothing to mirror. */
.m-filtersheet__group { padding-block: var(--m-sp-2); border-block-end: var(--m-bw-hair) solid var(--m-c-line); }
/* Only the body's LAST group drops its hairline (the foot draws one). In the
   form, the last group is the last <details>: the form's own button comes
   after it (`m-filter__go`). */
.m-filtersheet__body > .m-filtersheet__group:last-child,
.m-filtersheet__body > .m-filter:last-child > .m-filtersheet__group:last-of-type { border-block-end: 0; }
.m-filtersheet__sum {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--m-sp-2);
	min-block-size: var(--m-touch);
	color: var(--m-c-ink);
	list-style: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.m-filtersheet__sum::-webkit-details-marker { display: none; }
.m-filtersheet__title {
	margin: 0;
	font-family: var(--m-font-ui);
	font-size: var(--m-fs-ui);
	font-weight: var(--m-fw-strong);
	line-height: var(--m-lh-control);
}
/* A group with a filter in force says so: folded, by what is on (its value,
   below); open, by a dot in the link colour after its name (`is-on`, printed
   by PHP), its fields saying which. A mode that keeps the value said when
   open (the bar's capsule) hides the dot: one mark for one state, by a
   selector that outranks this one (0,3,1), not by its place in the page. */
.is-on[open] .m-filtersheet__title::after {
	content: "";
	display: inline-block;
	inline-size: 6px;
	block-size: 6px;
	margin-inline-start: var(--m-sp-2);
	border-radius: var(--m-r-round);
	background-color: var(--m-c-link);
	vertical-align: middle;
}
/* What of a group is in force (matjari_shop_group_value()): said on a
   folded group, where its fields cannot be seen, after its name. */
.m-filtersheet__val { display: none; min-inline-size: 0; overflow: hidden; color: var(--m-c-link); font-size: var(--m-fs-small); font-weight: var(--m-fw-strong); line-height: var(--m-lh-control); text-overflow: ellipsis; white-space: nowrap; }
.m-filtersheet__group:not([open]) .m-filtersheet__val { display: block; }
.m-filtersheet__mark { position: relative; flex: none; inline-size: 16px; block-size: 16px; margin-inline-start: auto; color: var(--m-c-ink-2); }
.m-filtersheet__mark::before, .m-filtersheet__mark::after {
	content: "";
	position: absolute;
	inset: 0;
	inline-size: 12px;
	block-size: 2px;
	margin: auto;
	border-radius: var(--m-r-pill);
	background-color: currentColor;
	transition: transform var(--m-dur-panel) var(--m-ease);
}
.m-filtersheet__mark::after { transform: rotate(90deg); }
.m-filtersheet__group[open] .m-filtersheet__mark::after { transform: rotate(0deg); }
.m-filtersheet__panel { padding-block: var(--m-sp-2) var(--m-sp-3); }
.m-filtersheet__group[open] > .m-filtersheet__panel { animation: m-reveal var(--m-dur-panel) var(--m-ease); }
/* The foot stays: the button that shows the results, and the way to clear. */
.m-filtersheet__foot {
	display: flex;
	flex: none;
	align-items: center;
	gap: var(--m-sp-3);
	padding: var(--m-sp-3) var(--m-pad-sheet) calc(var(--m-sp-3) + var(--m-safe-b));
	border-block-start: var(--m-bw-hair) solid var(--m-c-line);
}
.m-filtersheet__foot .m-btn { flex: 1 1 auto; min-inline-size: 0; }
.m-filtersheet__n { font-weight: var(--m-fw-body); font-variant-numeric: var(--m-fvn); }
@supports (height: 100svh) {
	.m-filtersheet { max-block-size: 88svh; }
}

/* ==========================================================================
   5. What is in the filter. The fields are the one input anatomy of base.css
   and the two checkboxes are the .m-check atom of components.css, so both
   take the focus ring like any control (audit U19). The attribute axes are
   links: a value needs no Apply.
   ========================================================================== */
/* The price: two fields and a dash, on one line at any width of the panel.
   A price is typed left to right in either language. */
.m-filter__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: var(--m-sp-2);
}
.m-filter__row input { direction: ltr; text-align: center; -moz-appearance: textfield; appearance: textfield; }
.m-filter__row input::-webkit-outer-spin-button, .m-filter__row input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.m-filter__dash { color: var(--m-c-ink-3); }
/* Each checkbox is a row of its own, the whole width a target. */
.m-filter .m-check { display: grid; }
/* The form's own buttons, shown by the mode that needs them: the sheet's is
   in its foot, where a thumb is; a bar's panel shows its group's
   (`m-filter__apply`), the panel beside the results the form's one
   (`m-filter__go`), after its fields (opt/filter-*.css). */
.m-filter__apply, .m-filter__go { display: none; }

/* A plain axis: wrapping chips. The chosen one is an ink block, the same
   "this one" as the current category and the current page. A one-letter
   size («L») is still a 44px square (N2 of P2's verification). */
.m-axes__chips { display: flex; flex-wrap: wrap; gap: var(--m-sp-2); }
.m-swatchchip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--m-sp-2);
	min-inline-size: var(--m-touch);
	min-height: var(--m-touch);
	padding-inline: var(--m-sp-4);
	border: var(--m-bw-control) solid var(--m-c-line-strong);
	border-radius: var(--m-r-chip);
	background-color: transparent;
	color: var(--m-c-ink);
	font-family: var(--m-font-ui);
	font-size: var(--m-fs-ui);
	font-weight: var(--m-fw-ui);
	line-height: var(--m-lh-control);
	text-decoration: none;
	white-space: nowrap;
	-webkit-tap-highlight-color: transparent;
	transition: background-color var(--m-dur-press) var(--m-ease), border-color var(--m-dur-press) var(--m-ease), color var(--m-dur-press) var(--m-ease), transform var(--m-dur-press) var(--m-ease);
}
.m-swatchchip.is-active {
	border-color: var(--m-inverse);
	background-color: var(--m-inverse);
	color: var(--m-on-inverse);
	font-weight: var(--m-fw-strong);
}
.m-swatchchip:active { transform: var(--m-btn-press); opacity: var(--m-press-opacity); }
.m-swatchchip__dot {
	flex: none;
	inline-size: 26px;
	block-size: 26px;
	border-radius: var(--m-r-round);
	background-color: var(--dot);
	box-shadow: inset 0 0 0 1px rgba(var(--m-c-ink-rgb), .34);
	transition: box-shadow var(--m-dur-press) var(--m-ease);
}
/* Every dot carries the inner ring of the current ink (2.6, H34): on a light
   page it bounds the pale shades, on a dark one the dark ones, so nothing is
   decided from the colour (the `is-light` class stays in the markup and
   styles nothing). A value with NO colour is a hollow dot, so a colour axis
   stays a set of swatches. */
.m-swatchchip__dot.is-none { background-color: var(--m-c-bg); box-shadow: inset 0 0 0 1px var(--m-c-line-strong); }
/* A COLOUR axis (any value resolved to a colour) is real swatches: a dot
   beside its name, no box, in two columns so the dots line up. A long name
   wraps inside its 44px row instead of being cut: «كحلي مائل للأخضر» is
   exactly the name a dot cannot say, so its corners are the box radius
   (H33): a pill Look would make a two-line row a lozenge. The chosen one is
   ringed in the ink over a gap of the panel's own surface. */
.m-axes__chips--swatch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--m-sp-4); }
.m-axes__chips--swatch .m-swatchchip {
	justify-content: flex-start;
	gap: var(--m-sp-3);
	padding-inline: 0;
	border-color: transparent;
	border-radius: var(--m-r-box);
	white-space: normal;
}
.m-axes__chips--swatch .m-swatchchip.is-active { background-color: transparent; color: var(--m-c-ink); }
.m-axes__chips--swatch .m-swatchchip__name { min-width: 0; line-height: var(--m-lh-ui); }
.m-axes__chips--swatch .is-active .m-swatchchip__dot { box-shadow: 0 0 0 2px var(--m-c-bg), 0 0 0 4px var(--m-c-ink), inset 0 0 0 1px rgba(var(--m-c-ink-rgb), .34); }

/* ==========================================================================
   6. The two ranges this file writes. From 600 the head has more air, the
   sort says what it is, and the filter is a sheet from the end edge. From
   1200, on a Look whose treatment is `side`, the filter is a panel in the
   page (4.10). The grid's own steps (3 across from 600, 4 from 900 and so
   on) are the Look's column tokens in base.css, not rules here.
   ========================================================================== */
@media (min-width: 600px) {
	.m-shop__head { gap: var(--m-sp-5); margin-block-end: var(--m-sp-4); }
	.m-cathero { gap: var(--m-sp-6); }
	.m-cathero__media { inline-size: var(--m-sp-13); block-size: var(--m-sp-13); }
	.m-cathero__text { font-size: var(--m-fs-body); }
	.m-toolbar { gap: var(--m-sp-4); margin-block-end: var(--m-sp-5); }
	.m-sort__label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }

	/* The side sheet. Only its free corners are round, and the free side
	   follows the direction: --m-dir is 1 or -1, so each corner is the sheet
	   radius or nothing, with no direction selector to out-specify later. */
	.m-filtersheet {
		inset-block: 0;
		inset-inline: auto 0;
		inline-size: var(--m-drawer-w);
		max-block-size: none;
		border-block-start: 0;
		border-inline-start: var(--m-overlay-bw) solid var(--m-overlay-edge);
		border-radius: calc(var(--m-r-sheet) * (1 + var(--m-dir)) / 2) calc(var(--m-r-sheet) * (1 - var(--m-dir)) / 2) calc(var(--m-r-sheet) * (1 - var(--m-dir)) / 2) calc(var(--m-r-sheet) * (1 + var(--m-dir)) / 2);
		transform: translateX(calc(var(--m-dir) * 100%));
	}
	.has-adminbar .m-filtersheet { inset-block-start: var(--m-header-top); }
	.woocommerce-pagination ul { gap: var(--m-sp-2); }
}

/* ==========================================================================
   7. Nothing to list: the empty state of components.css with a mark over it
   in the Look's category frame, and under a search that found nothing, a few
   products to look at.
   ========================================================================== */
.m-shop__mark {
	display: grid;
	place-items: center;
	inline-size: var(--m-sp-10);
	block-size: var(--m-sp-10);
	margin-block-end: var(--m-sp-2);
	border-radius: var(--m-frame-tile);
	background-color: var(--m-primary-soft);
	color: var(--m-c-link);
}
/* A search that found nothing offers the search again, inside the empty
   state: the header's own field (chrome.css) holding the word that failed. */
.m-shop__search {
	inline-size: 100%;
	max-inline-size: calc(var(--m-container-form) * .7);
	margin-block-start: var(--m-sp-4);
}
.m-shop__more { margin-block-start: var(--m-sp-4); }
.m-shop__moretitle {
	margin: 0 0 var(--m-sp-4);
	font-family: var(--m-font-subhead);
	font-size: var(--m-fs-h3);
	font-weight: var(--m-fw-subhead);
	line-height: var(--m-lh-heading);
}

/* ==========================================================================
   8. The page numbers. WooCommerce's own list: an arrow, the numbers, an
   arrow. Every item is a 44px target. The numbers are bare; the current page
   is the ink block; the two arrows are outlined, so they read as the
   controls. Nine items at most: on the narrowest phone they share the row
   (each may give a pixel or two) instead of wrapping.
   ========================================================================== */
.woocommerce-pagination { margin-block-start: var(--m-sp-9); }
.woocommerce-pagination ul {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}
.woocommerce-pagination li { flex: 0 1 var(--m-touch); min-width: 0; }
/* li-SCOPED on purpose: WooCommerce's <ul> carries class="page-numbers" too,
   so an unscoped rule would match the LIST itself and stack the numbers. */
.woocommerce-pagination li .page-numbers {
	display: grid;
	place-items: center;
	min-height: var(--m-touch);
	border: var(--m-bw-control) solid transparent;
	border-radius: var(--m-r-control);
	color: var(--m-c-ink);
	font-family: var(--m-font-ui);
	font-size: var(--m-fs-ui);
	font-weight: var(--m-fw-ui);
	line-height: var(--m-lh-control);
	font-variant-numeric: var(--m-fvn);
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	transition: background-color var(--m-dur-press) var(--m-ease), border-color var(--m-dur-press) var(--m-ease), transform var(--m-dur-press) var(--m-ease);
}
.woocommerce-pagination li .current {
	border-color: var(--m-inverse);
	background-color: var(--m-inverse);
	color: var(--m-on-inverse);
	font-weight: var(--m-fw-strong);
}
.woocommerce-pagination li .dots { color: var(--m-c-ink-3); }
.woocommerce-pagination li .prev, .woocommerce-pagination li .next { border-color: var(--m-c-line-strong); }
.woocommerce-pagination li a.page-numbers:active { transform: var(--m-btn-press); opacity: var(--m-press-opacity); }
/* Both arrows carry the same forward chevron; the direction turns each. */
.m-page-arrow { display: grid; place-items: center; }
.m-page-arrow--next svg, .m-shop__nextarrow svg { transform: scaleX(var(--m-dir)); }
.m-page-arrow--prev svg { transform: scaleX(calc(var(--m-dir) * -1)); }

/* ==========================================================================
   8b. Whole rows (4.10.3). A full page holds a number of cards that every
   column count of the listing divides, where one exists between 20 and 36.
   Where none does (five across beside two, three, four and six) the page
   holds 24 and would end one card short in the range that is five across:
   there, and only there, the hole is the way on, a cell of the grid that
   opens the next page. PHP marks the ranges (matjari_shop_next_cell()); one
   range at a time shows it, by min-width alone. A quiet panel the height of
   the row, in the Look's card corners, edge and shadow (so it is a sibling of
   jari's inked cards, not a hole in them): the arrow and two words.
   ========================================================================== */
.m-shop__next { display: none; }
.m-shop__next--ph { display: flex; }
.m-shop__nextlink {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--m-sp-3);
	padding: var(--m-sp-5);
	border: var(--m-card-bw) solid var(--m-card-edge);
	border-radius: var(--m-r-card);
	background-color: var(--m-surface-2);
	box-shadow: var(--m-card-shadow);
	color: var(--m-c-ink);
	font-family: var(--m-font-subhead);
	font-size: var(--m-fs-lead);
	font-weight: var(--m-fw-subhead);
	line-height: var(--m-lh-heading);
	text-align: center;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	transition: background-color var(--m-dur-press) var(--m-ease);
}
.m-shop__nextarrow {
	display: grid;
	place-items: center;
	inline-size: var(--m-touch);
	block-size: var(--m-touch);
	border-radius: var(--m-r-round);
	background-color: var(--m-c-fill);
	color: var(--m-c-on-fill);
	transition: transform var(--m-dur-press) var(--m-ease);
}
.m-shop__nextlink:active .m-shop__nextarrow { transform: var(--m-btn-press); }
.m-shop__nextcount { color: var(--m-c-ink-2); font-family: var(--m-font-ui); font-size: var(--m-fs-small); font-weight: var(--m-fw-ui); line-height: var(--m-lh-control); font-variant-numeric: var(--m-fvn); }
/* Each range's pair stands after the one before it, so a range's own mark is
   the one that shows there (P2-R2: the 600 pair once stood above the base
   pair and lost to it). */
@media (min-width: 600px) {
	.m-shop__next { display: none; }
	.m-shop__next--t1 { display: flex; }
}
@media (min-width: 900px) {
	.m-shop__next { display: none; }
	.m-shop__next--t2 { display: flex; }
}
@media (min-width: 1200px) {
	.m-shop__next { display: none; }
	.m-shop__next--dk { display: flex; }
}
@media (min-width: 1600px) {
	.m-shop__next { display: none; }
	.m-shop__next--wd { display: flex; }
}

/* ==========================================================================
   9. Hover, on devices that have it.
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
	.m-sortchip:hover { color: var(--m-c-link); }
	.m-toolbar__filter:hover { background-color: var(--m-btn2-bg-hover); }
	.m-shop__chip:hover { background-color: rgba(var(--m-c-ink-rgb), .14); }
	.m-shop__clear:hover, .m-filter__clear:hover { color: var(--m-c-ink); }
	.m-filtersheet__close:hover { background-color: rgba(var(--m-c-ink-rgb), .06); }
	.m-swatchchip:hover { border-color: var(--m-c-ink); }
	.m-axes__chips--swatch .m-swatchchip:hover { border-color: transparent; }
	.m-axes__chips--swatch .m-swatchchip:not(.is-active):hover .m-swatchchip__dot { box-shadow: 0 0 0 2px var(--m-c-bg), 0 0 0 3px var(--m-c-line-strong), inset 0 0 0 1px rgba(var(--m-c-ink-rgb), .34); }
	.woocommerce-pagination li a.page-numbers:hover, .m-shop__nextlink:hover { background-color: var(--m-surface-3); }
}
