/**
 * Product listings: shop, categories and product search (Figma: Products
 * 2578:3847, Products - Mobile 2873:2987), without the filters for now.
 * Also the search field (pill) of the search pages and the 404.
 */

/* ---- Search field (404, search pages) ------------------------------------- */

/* A white pill, the Search button inside it (Figma 3046:1759, 3030:1642). */
.search-pill {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	width: 100%;
	max-width: 680px;
	min-height: 64px;
	box-sizing: border-box;
	padding: 4px 4px 4px 20px;
	border: 1px solid var(--color-pale-sage);
	border-radius: var(--radius-pill);
	background: var(--color-warm-off-white);
	color: var(--color-deep-slate);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-pill:hover {
	border-color: var(--color-input-border);
}

.search-pill:focus-within {
	border-color: var(--color-dark-sage);
	box-shadow: 0 0 0 3px rgba(80, 102, 83, 0.12);
}

.search-pill .icon {
	flex: none;
}

.search-pill input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 48px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--color-deep-slate);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 24px;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.search-pill input[type="search"]::placeholder {
	color: var(--color-body-gray);
	opacity: 1;
}

.search-pill input[type="search"]::-webkit-search-cancel-button,
.search-pill input[type="search"]::-webkit-search-decoration {
	display: none;
	-webkit-appearance: none;
}

.search-pill .button {
	flex: none;
	min-height: 56px;
	padding: 0 28px;
}

@media (max-width: 479px) {
	.search-pill {
		min-height: 56px;
		padding-left: 16px;
	}

	.search-pill .button {
		min-height: 48px;
		padding: 0 20px;
	}
}

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

/* A search: breadcrumb, title and the search field, centred as on the
   no-results page. The shop and the categories have the photo header below. */
.listing-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-4);
	padding-top: 40px;
	padding-bottom: 32px;
	text-align: center;
}

.listing-head .breadcrumbs,
.listing-head__breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 var(--space-2);
	margin: 0;
	padding: 0;
	list-style: none;
	color: var(--color-body-gray);
	font-size: 14px;
	line-height: 20px;
}

.listing-head__breadcrumbs li + li::before {
	content: "/";
	margin-right: var(--space-2);
}

.listing-head .breadcrumbs a,
.listing-head__breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.listing-head .breadcrumbs a:hover,
.listing-head__breadcrumbs a:hover {
	color: var(--color-deep-slate);
	text-decoration: underline;
}

.listing-head__title {
	max-width: 100%;
	margin: 0;
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: var(--text-h1);
	line-height: var(--leading-h1);
	overflow-wrap: anywhere;
}

.listing-head__intro,
.listing-head .term-description,
.listing-head .page-description {
	max-width: 680px;
	margin: 0;
	color: var(--color-body-gray);
	font-size: 16px;
	line-height: 24px;
}

.listing-head .term-description > :first-child,
.listing-head .page-description > :first-child {
	margin-top: 0;
}

.listing-head .term-description > :last-child,
.listing-head .page-description > :last-child {
	margin-bottom: 0;
}

.listing-head .search-pill {
	margin-top: var(--space-2);
}

@media (min-width: 1024px) {
	.listing-head {
		padding-top: 64px;
		padding-bottom: 48px;
	}
}

/* ---- Header: photo, breadcrumb, title, intro, certificates (Figma) -------- */

.listing-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 460px;
	overflow: hidden;
	isolation: isolate;
	color: var(--color-warm-off-white);
}

.listing-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(rgba(34, 51, 60, 0.15), rgba(34, 51, 60, 0.6));
}

/* Stronger than WooCommerce's `.woocommerce img { height: auto }`. */
.listing-hero .listing-hero__image {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.listing-hero__inner {
	display: flex;
	flex: 1;
	flex-direction: column;
	justify-content: flex-end;
	gap: var(--space-4);
	padding-top: 40px;
	padding-bottom: 32px;
}

.listing-hero__breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--space-2);
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: 14px;
	line-height: 24px;
	text-transform: uppercase;
}

.listing-hero__breadcrumbs li + li::before {
	content: "/";
	margin-right: var(--space-2);
}

.listing-hero__breadcrumbs a {
	color: inherit;
	text-decoration: none;
}

.listing-hero__breadcrumbs a:hover {
	text-decoration: underline;
}

.listing-hero__title {
	max-width: 900px;
	margin: 0;
	color: inherit;
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: var(--text-h1);
	line-height: var(--leading-h1);
}

.listing-hero__intro {
	max-width: 581px;
	margin: 0;
	font-size: 16px;
	line-height: 24px;
}

/* GOTS · OEKO-TEX · Woolmark on a band across the bottom of the photo. */
.listing-certs {
	background: rgba(34, 51, 60, 0.4);
	backdrop-filter: blur(6px);
}

.listing-certs__list {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	margin-top: 0;
	margin-bottom: 0;
	padding-top: 14px;
	padding-bottom: 14px;
	list-style: none;
}

.listing-certs__list li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: 14px;
	line-height: 20px;
}

.listing-certs__list img {
	width: 36px;
	height: 36px;
	object-fit: contain;
}

@media (min-width: 1024px) {
	.listing-hero {
		min-height: min(758px, calc(100vh - 140px));
	}

	.listing-hero::after {
		background: linear-gradient(90deg, rgba(34, 51, 60, 0.3), rgba(34, 51, 60, 0));
	}

	.listing-hero__inner {
		justify-content: center;
		padding-top: 60px;
		padding-bottom: 60px;
	}

	.listing-hero__breadcrumbs ol {
		font-size: 16px;
	}

	.listing-certs__list {
		padding-top: 30px;
		padding-bottom: 30px;
	}

	.listing-certs__list li {
		gap: 16px;
		font-size: 22px;
		line-height: 34px;
	}

	.listing-certs__list img {
		width: 56px;
		height: 56px;
	}
}

/* ---- Filters (Figma "Filter products") ------------------------------------- */

.listing-filters__title {
	margin: 0;
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: var(--text-h5);
	line-height: var(--leading-h5);
}

.listing-filters__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
}

.listing-filters__form {
	display: flex;
	flex-direction: column;
	gap: var(--space-6);
	margin-top: var(--space-6);
}

.listing-filter {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.listing-filter__legend {
	margin: 0 0 var(--space-3);
	padding: 0;
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-regular);
	font-size: 18px;
	line-height: 34px;
	text-transform: uppercase;
}

.listing-filter__options {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.listing-filter__option {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: var(--color-body-gray);
	font-size: 14px;
	line-height: 20px;
	cursor: pointer;
}

/* Our own boxes: Natural Oat outline; on hover Dark Sage on Pale Sage;
   ticked Dark Sage with a white tick. */
.listing-filter__option input {
	flex: none;
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	border: 1px solid var(--color-natural-oat);
	border-radius: 4px;
	background: var(--color-warm-off-white);
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.listing-filter__option input::after {
	content: "";
	width: 12px;
	height: 12px;
	background: var(--color-warm-off-white);
	transform: scale(0);
	transition: transform 0.15s ease;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain;
}

.listing-filter__option:hover input {
	border-color: var(--color-dark-sage);
	background: var(--color-pale-sage);
}

.listing-filter__option input:checked {
	border-color: var(--color-dark-sage);
	background: var(--color-dark-sage);
}

.listing-filter__option input:checked::after {
	transform: scale(1);
}

.listing-filter__option input:focus-visible {
	outline: var(--focus-ring);
	outline-offset: 2px;
}

.listing-filter__option:hover {
	color: var(--color-deep-slate);
}

.listing-filter__prices {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.listing-filter__prices input {
	box-sizing: border-box;
	width: 100%;
	min-height: 40px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid var(--color-pale-oat);
	border-radius: 0;
	background: var(--color-warm-off-white);
	color: var(--color-deep-slate);
	font-family: var(--font-body);
	font-size: 16px; /* no zoom on iOS */
	line-height: 22px;
	-moz-appearance: textfield;
	appearance: textfield;
}

.listing-filter__prices input::-webkit-inner-spin-button,
.listing-filter__prices input::-webkit-outer-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.listing-filter__prices input:focus {
	border-color: var(--color-dark-sage);
	outline: none;
}

/* "Apply price filter", "Clear all filters": Dark Sage text links. */
.listing-filters__link {
	display: inline-block;
	margin-top: var(--space-3);
	padding: 0;
	border: 0;
	background: none;
	color: var(--color-dark-sage);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: 16px;
	line-height: 24px;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.listing-filters__link:hover {
	color: var(--color-deep-slate);
	text-decoration: underline;
}

.listing-filters__actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--space-3);
}

.listing-filters__clear {
	margin-top: 0;
	text-align: center;
}

/* Phones and tablets: a sheet from the bottom, opened by "Filters" (as on
   iOS: it slides up on a soft curve over a darkening page, and back down;
   the grabber and the title row can pull it down). Without the script the
   filters simply stand above the products. */
.listing-filters__close,
.listing-filters__grabber {
	display: none;
}

@media (max-width: 1023px) {
	.listing-filters {
		margin-bottom: var(--space-6);
	}

	.listing-filters.is-ready {
		position: fixed;
		inset: 0;
		z-index: 1100;
		margin: 0;
		visibility: hidden;
		background: rgba(34, 51, 60, 0);
		pointer-events: none;
		transition: background-color 0.35s ease, visibility 0s linear 0.5s;
	}

	.listing-filters.is-ready.is-open {
		visibility: visible;
		background: rgba(34, 51, 60, 0.5);
		pointer-events: auto;
		transition: background-color 0.35s ease, visibility 0s;
	}

	.listing-filters.is-ready .listing-filters__panel {
		position: absolute;
		right: 0;
		bottom: 0;
		left: 0;
		box-sizing: border-box;
		max-height: 85vh;
		overflow-y: auto;
		padding: 8px var(--gutter) 0;
		border-radius: 20px 20px 0 0;
		background: var(--color-warm-off-white);
		box-shadow: 0 -8px 30px rgba(34, 51, 60, 0.12);
		transform: translateY(100%);
		transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
		overscroll-behavior: contain;
	}

	.listing-filters.is-ready.is-open .listing-filters__panel {
		transform: none;
	}

	.listing-filters.is-ready .listing-filters__grabber {
		display: block;
		width: 40px;
		height: 5px;
		margin: 0 auto 12px;
		border-radius: 3px;
		background: var(--color-natural-oat);
	}

	.listing-filters.is-ready .listing-filters__head {
		touch-action: none;
	}

	.listing-filters.is-ready .listing-filters__close {
		display: inline-flex;
	}

	.listing-filters.is-ready .listing-filters__actions {
		position: sticky;
		bottom: 0;
		margin: 0 calc(-1 * var(--gutter));
		padding: 16px var(--gutter) max(20px, env(safe-area-inset-bottom));
		border-top: 1px solid var(--color-pale-oat);
		background: var(--color-warm-off-white);
	}

	html.has-filters-open {
		overflow: hidden;
	}
}

@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
	.listing-filters.is-ready,
	.listing-filters.is-ready .listing-filters__panel {
		transition: none;
	}
}

@media (min-width: 1024px) {
	/* The column: the categories, then the filters, in one panel that stays
	   in view while the products scroll (scrolling itself when taller). */
	.listing-side {
		box-sizing: border-box;
		position: sticky;
		top: calc(var(--sticky-header) + 24px);
		align-self: start;
		max-height: calc(100vh - var(--sticky-header) - 48px);
		padding: 24px 31px;
		overflow-y: auto;
		overscroll-behavior: contain;
		background: var(--color-soft-ivory);
		scrollbar-width: thin;
	}

	/* No "Filter products" title beside the products: the filters speak for
	   themselves (it still names them for screen readers, and titles the
	   sheet on phones). */
	.listing-filters__head {
		display: none;
	}

	.listing-filters__head + .listing-filters__form {
		margin-top: 0;
	}

	.listing-filters__form {
		gap: 28px;
	}

	/* Desktop: a ticked box applies at once (listing.js). */
	.listing-filters__form.is-auto .listing-filters__apply {
		display: none;
	}

	/* Nothing left in the actions (no filter on): no gap for them below Price. */
	.listing-filters__form.is-auto .listing-filters__actions:not(:has(.listing-filters__clear)) {
		display: none;
	}

	.listing-filters__clear {
		text-align: left;
	}
}

/* ---- Categories to browse (inc/listing.php how_theme_listing_categories) -- */

/* At the top of the filters (under the sheet's title on phones and tablets),
   a line between them and the filters. */
.listing-filters .listing-nav {
	margin-top: var(--space-6);
}

@media (min-width: 1024px) {
	.listing-filters .listing-nav {
		margin-top: 0;
	}
}

.listing-filters .listing-nav + .listing-filters__form {
	margin-top: 28px;
	padding-top: 28px;
	border-top: 1px solid var(--color-natural-oat);
}

.listing-nav__list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0 -12px;
	padding: 0;
	list-style: none;
}

.listing-nav__link {
	display: block;
	padding: 6px 12px;
	border-radius: 8px;
	color: var(--color-body-gray);
	font-size: 16px;
	line-height: 24px;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.listing-nav__link:hover {
	background: var(--color-light-oat);
	color: var(--color-deep-slate);
}

.listing-nav__link[aria-current] {
	background: var(--color-pale-oat);
	color: var(--color-deep-slate);
	font-weight: var(--weight-gilroy-medium);
}

/* The tree (all categories, as in the header's Shop panel): main categories
   in the menu's green capitals, the open one's links indented under it. */
.listing-tree,
.listing-tree__links {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.listing-tree {
	margin: 0 -12px;
}

.listing-tree__main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 8px;
	color: var(--color-dark-sage);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: 14px;
	line-height: 20px;
	text-transform: uppercase;
	text-decoration: none;
	list-style: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.listing-tree__main::-webkit-details-marker {
	display: none;
}

.listing-tree__main .icon {
	flex: none;
	transition: transform 0.2s ease;
}

.listing-tree__group[open] > .listing-tree__main .icon {
	transform: rotate(180deg);
}

.listing-tree__links {
	margin: 4px 0 10px 12px;
	padding-left: 8px;
	border-left: 1px solid var(--color-natural-oat);
}

.listing-tree__link {
	display: block;
	padding: 6px 12px;
	border-radius: 8px;
	color: var(--color-body-gray);
	font-size: 15px;
	line-height: 22px;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.listing-tree__main:hover,
.listing-tree__link:hover {
	background: var(--color-light-oat);
	color: var(--color-deep-slate);
}

.listing-tree__main[aria-current],
.listing-tree__link[aria-current] {
	background: var(--color-pale-oat);
	color: var(--color-deep-slate);
}

.listing-tree__link[aria-current] {
	font-weight: var(--weight-gilroy-medium);
}

@media (prefers-reduced-motion: reduce) {
	.listing-tree__main .icon {
		transition: none;
	}
}

/* ---- Toolbar: count, filters and sort ------------------------------------- */

/* Mobile (Figma): "Filters" and the sort as pills side by side, the count
   under them. Tablet: the count left, the pills right. Desktop: count left,
   "Sort by: Featured" right (the filters are the column beside). */
.listing-toolbar {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-4) 12px;
	margin-bottom: var(--space-6);
}

.listing-toolbar > * {
	grid-column: 1 / -1;
}

.listing-toolbar__count {
	grid-row: 2;
}

.listing-toolbar__filters:has(+ .listing-sort) {
	grid-column: 1;
}

.listing-toolbar__filters + .listing-sort {
	grid-column: 2;
}

.listing-toolbar__filters {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 50px;
	box-sizing: border-box;
	padding: 0 20px;
	border: 1px solid var(--color-pale-sage);
	border-radius: var(--radius-pill);
	background: none;
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: 16px;
	line-height: 24px;
	cursor: pointer;
}

.listing-toolbar__filters:hover {
	border-color: var(--color-dark-sage);
}

/* Two pills side by side on small phones: a size smaller. */
@media (max-width: 767px) {
	.listing-toolbar__filters,
	.listing-toolbar__filters + .listing-sort {
		padding-right: 36px;
		padding-left: 16px;
		font-size: 14px;
	}

	.listing-toolbar__filters {
		padding-right: 16px;
	}

	.listing-toolbar__filters + .listing-sort .icon {
		right: 14px;
	}
}

.listing-toolbar__count {
	margin: 0;
	color: var(--color-deep-slate);
	font-size: 14px;
	line-height: 20px;
}

.listing-sort {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	box-sizing: border-box;
	padding: 0 44px 0 20px;
	border: 1px solid var(--color-pale-sage);
	border-radius: var(--radius-pill);
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: 16px;
	line-height: 24px;
}

.listing-sort:focus-within {
	border-color: var(--color-dark-sage);
}

.listing-sort label {
	color: inherit;
	font: inherit;
	white-space: nowrap;
}

/* "Sort by: Featured": the current choice as text; the select lies invisible
   over the whole pill, so any click opens it (its own width would follow the
   longest option). */
.listing-sort__value {
	white-space: nowrap;
}

.listing-sort select {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	font-size: 16px; /* no zoom on iOS */
}

.listing-sort .icon {
	position: absolute;
	top: 50%;
	right: 18px;
	transform: translateY(-50%);
	transition: transform 0.2s ease;
	pointer-events: none;
}

/* Our sort list (listing.js): a button over the pill, the choices in a card
   under it. WooCommerce's select stays, hidden, with the value. */
.listing-sort.is-custom select {
	display: none;
}

.listing-sort__button {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	border-radius: inherit;
	background: none;
	cursor: pointer;
}

.listing-sort__button:focus-visible {
	outline: var(--focus-ring);
	outline-offset: 2px;
}

.listing-sort.is-open .icon {
	transform: translateY(-50%) rotate(180deg);
}

.listing-sort__menu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 20;
	min-width: 220px;
	max-height: 320px;
	margin: 0;
	padding: 8px;
	overflow-y: auto;
	border: 1px solid var(--color-pale-oat);
	border-radius: var(--radius-option);
	background: var(--color-warm-off-white);
	box-shadow: 0 12px 28px rgba(34, 51, 60, 0.12);
	list-style: none;
}

.listing-sort__menu:focus {
	outline: none;
}

.listing-sort__menu [role="option"] {
	position: relative;
	padding: 10px 36px 10px 14px;
	border-radius: 8px;
	color: var(--color-body-gray);
	font-family: var(--font-body);
	font-weight: var(--weight-gilroy-regular);
	font-size: 16px;
	line-height: 22px;
	white-space: nowrap;
	cursor: pointer;
}

.listing-sort__menu [role="option"].is-active {
	background: var(--color-soft-ivory);
	color: var(--color-deep-slate);
}

/* The current choice: Dark Sage with a tick. */
.listing-sort__menu [aria-selected="true"] {
	color: var(--color-dark-sage);
	font-weight: var(--weight-gilroy-medium);
}

.listing-sort__menu [aria-selected="true"]::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 12px;
	width: 16px;
	height: 16px;
	background: currentColor;
	transform: translateY(-50%);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Phones: the list a little wider than the pill, from its right edge. */
@media (max-width: 767px) {
	.listing-sort__menu {
		min-width: 230px;
	}
}

@media (min-width: 768px) {
	.listing-toolbar {
		display: flex;
		align-items: center;
		gap: 24px;
		margin-bottom: 32px;
	}

	.listing-toolbar__count {
		margin-right: auto;
	}

	.listing-sort {
		justify-content: flex-start;
		min-height: 0;
		padding: 0 26px 0 0;
		border: 0;
	}

	.listing-sort .icon {
		right: 0;
	}
}

@media (min-width: 1024px) {
	.listing-toolbar__filters {
		display: none;
	}
}

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

/* Two cards per row on phones (client, 2026-11-26: first on the gift guide,
   now on every listing), 2 on tablet and beside the filter column, 3 beside
   it from 1280px (Figma). */
.product-grid {
	display: grid;
	gap: 40px var(--space-6);
	margin: 0;
	padding: 0;
	list-style: none;
}

.product-grid > li {
	display: flex;
	min-width: 0;
}

.product-grid .product-card {
	flex: 1 1 auto;
}

@media (min-width: 600px) {
	.product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.product-grid {
		row-gap: 45px;
	}
}

@media (min-width: 1280px) {
	.product-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Phones: two smaller cards in a row. */
@media (max-width: 599px) {
	.listing-page .product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 12px;
	}

	.listing-page .product-card__labels {
		top: 8px;
		left: 8px;
		gap: 4px;
	}

	.listing-page .how-badge-discount {
		height: 26px;
		padding: 0 8px;
		font-size: 13px;
	}

	.listing-page .how-tag {
		font-size: 10px;
	}

	.listing-page .product-card__brand {
		overflow: hidden;
		margin-bottom: 8px;
		padding: 2px 8px;
		font-size: 12px;
		line-height: 22px;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	.listing-page .product-card__title {
		font-size: 16px;
		line-height: 22px;
	}

	.listing-page .product-card__price {
		font-size: 16px;
		line-height: 24px;
	}

	.listing-page .product-card__price del {
		font-size: 13px;
	}

	.listing-page .product-card .rating {
		font-size: 12px;
	}
}

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

/* Figma: "1  2  3  …  Next page", Mont Bold. */
.listing-pagination {
	margin-top: 48px;
}

.listing-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: var(--space-1);
	margin: 0;
	padding: 0;
	list-style: none;
}

.listing-pagination .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	box-sizing: border-box;
	padding: 0 var(--space-2);
	border-radius: var(--radius-pill);
	color: var(--color-deep-slate);
	font-family: var(--font-heading);
	font-weight: var(--weight-mont-bold);
	font-size: 16px;
	line-height: 24px;
	text-decoration: none;
}

.listing-pagination a.page-numbers:hover {
	background: var(--color-light-oat);
	color: var(--color-deep-slate);
}

.listing-pagination .page-numbers.current {
	background: var(--color-dark-sage);
	color: var(--color-warm-off-white);
}

.listing-pagination .prev,
.listing-pagination .next {
	padding: 0 var(--space-4);
}

@media (min-width: 1024px) {
	.listing-pagination {
		margin-top: 45px;
	}
}

/* ---- Page ------------------------------------------------------------------ */

.listing-page__body {
	padding-top: 24px;
	padding-bottom: var(--section-space, 64px);
}

.listing-results {
	min-width: 0;
	transition: opacity 0.2s ease;
}

/* While other products load (listing.js). */
.listing-results.is-loading {
	opacity: 0.45;
	pointer-events: none;
}

/* The filter column beside the products (Figma: 281px). */
@media (min-width: 1024px) {
	.listing-layout {
		display: grid;
		grid-template-columns: 281px minmax(0, 1fr);
		gap: 32px;
		padding-top: 79px;
	}
}

.listing-page {
	--section-space: 48px;
}

@media (min-width: 1024px) {
	.listing-page {
		--section-space: 120px;
	}
}
