/*
 * UGP Shop — front-end styles.
 *
 * Every colour, radius, gap and duration here comes from a CSS custom property
 * that the plugin prints from the settings screen (see UGP_Shop_Settings::
 * css_variables). Nothing below hard-codes a brand colour, so a shop owner can
 * re-skin the whole catalogue without editing this file, and a child theme can
 * override a single property instead of having to out-specify a selector.
 *
 * The fallbacks in var() are only there so the grid still looks deliberate if
 * the inline style block is stripped by an aggressive optimisation plugin.
 */

/* -------------------------------------------------------------------------
 * Shell
 * ---------------------------------------------------------------------- */

.ugp-shop {
	--ugp-focus: 0 0 0 3px var(--ugp-filter-ring, rgba(37, 99, 235, 0.35));

	box-sizing: border-box;
	background: var(--ugp-page-bg, #f6f7f9);
	color: var(--ugp-text, #3c4655);
	font-size: 15px;
	line-height: 1.5;
}

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

/*
 * `hidden` has to actually hide.
 *
 * The UA rule is `[hidden] { display: none }` at specificity 0,1,0 — the same
 * as any of our own single-class display rules, and ours load later, so they
 * silently won. The visible symptoms were a search "clear" cross that never
 * went away and a filter badge permanently reading 0. This is one of the rare
 * places !important is the correct tool: the attribute is a contract, not a
 * suggestion, and every element that carries it is one we hide deliberately.
 */
.ugp-shop [hidden] {
	display: none !important;
}

/*
 * Defensive reset for the controls themes style most aggressively.
 *
 * Everything above is scoped under .ugp-shop so a theme cannot out-specify it,
 * but inherited properties need saying out loud: uppercase button text, letter
 * spacing, full-width buttons and inherited text shadows are all common in
 * commercial themes and all of them visibly break these components.
 */
.ugp-shop .ugp-btn,
.ugp-shop .ugp-reset,
.ugp-shop .ugp-more,
.ugp-shop .ugp-chip,
.ugp-shop .ugp-facet__head,
.ugp-shop .ugp-search__field,
.ugp-shop .ugp-sort__select,
.ugp-shop .ugp-price__field input {
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
	text-shadow: none;
	width: auto;
	min-width: 0;
	max-width: none;
	margin: 0;
}

.ugp-shop .ugp-search__field,
.ugp-shop .ugp-sort__select,
.ugp-shop .ugp-price__field,
.ugp-shop .ugp-price__field input {
	box-shadow: none;
	outline-offset: 0;
}

.ugp-shop__heading {
	margin: 0 0 20px;
	color: var(--ugp-title, #14181f);
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
	line-height: 1.2;
}

.ugp-shop__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--ugp-gap, 24px);
}

.ugp-shop--has-filters .ugp-shop__body {
	grid-template-columns: 272px minmax(0, 1fr);
}

.ugp-shop--filters-right.ugp-shop--has-filters .ugp-shop__body {
	grid-template-columns: minmax(0, 1fr) 272px;
}

.ugp-shop--filters-right .ugp-filters {
	order: 2;
}

/*
 * The container context lives here, not on .ugp-shop. `container-type` implies
 * layout containment, which would make its element the containing block for
 * every position:fixed descendant — quietly breaking the mobile filter drawer,
 * the scrim and the toast. .ugp-shop__main holds the grid and none of those.
 */
.ugp-shop__main {
	position: relative;
	min-width: 0;
	container-type: inline-size;
}

/* The wrapper the shop template renders around the grid. */
.ugp-page {
	width: 100%;
	max-width: var(--ugp-page-width, 1320px);
	margin-inline: auto;
	padding: 24px 20px 64px;
}

.ugp-page__head {
	margin-bottom: 24px;
}

.ugp-page__title {
	margin: 8px 0 0;
	color: var(--ugp-title, #14181f);
	font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem);
	line-height: 1.15;
}

.ugp-page__intro {
	max-width: 68ch;
	margin-top: 10px;
	color: var(--ugp-muted, #7a8697);
}

/* -------------------------------------------------------------------------
 * Toolbar
 * ---------------------------------------------------------------------- */

.ugp-shop__bar {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: var(--ugp-gap, 24px);
}

.ugp-shop__bar-end {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-inline-start: auto;
}

.ugp-shop .ugp-count {
	margin: 0;
	color: var(--ugp-muted, #7a8697);
	font-size: 0.875rem;
	font-variant-numeric: tabular-nums;
}

.ugp-shop .ugp-filter-toggle {
	display: none;
}

.ugp-shop .ugp-filter-toggle__count {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--ugp-filter, #2563eb);
	color: var(--ugp-filter-text, #fff);
	font-size: 0.75rem;
	font-weight: 700;
}

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

.ugp-shop .ugp-search {
	position: relative;
	display: flex;
	align-items: center;
}

.ugp-shop .ugp-search .ugp-icon--search {
	position: absolute;
	inset-inline-start: 13px;
	width: 17px;
	height: 17px;
	stroke-width: 1.9;
	color: var(--ugp-muted, #7a8697);
	pointer-events: none;
}

.ugp-shop .ugp-search__field {
	width: 220px;
	max-width: 100%;
	padding: 9px 34px 9px 36px;
	border: 1px solid var(--ugp-border, #e6e9ef);
	border-radius: var(--ugp-input-radius, 8px);
	background: var(--ugp-card-bg, #fff);
	color: var(--ugp-title, #14181f);
	font: inherit;
	font-size: 0.9rem;
	transition: border-color var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		box-shadow var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		width var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-search__field:focus {
	outline: none;
	border-color: var(--ugp-filter, #2563eb);
	box-shadow: var(--ugp-focus);
}

.ugp-shop .ugp-search__field::-webkit-search-cancel-button {
	display: none;
}

.ugp-shop .ugp-search__clear {
	position: absolute;
	inset-inline-end: 8px;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ugp-muted, #7a8697);
	cursor: pointer;
	transition: background var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		color var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-search__clear:hover {
	background: var(--ugp-filter-soft, rgba(37, 99, 235, 0.1));
	color: var(--ugp-title, #14181f);
}

.ugp-shop .ugp-search__clear .ugp-icon {
	width: 13px;
	height: 13px;
}

/* Sort ----------------------------------------------------------------- */

.ugp-shop .ugp-sort {
	position: relative;
	display: flex;
	align-items: center;
}

.ugp-shop .ugp-sort__select {
	appearance: none;
	padding: 9px 34px 9px 12px;
	border: 1px solid var(--ugp-border, #e6e9ef);
	border-radius: var(--ugp-input-radius, 8px);
	background: var(--ugp-card-bg, #fff);
	color: var(--ugp-title, #14181f);
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
	transition: border-color var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		box-shadow var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-sort__select:focus-visible {
	outline: none;
	border-color: var(--ugp-filter, #2563eb);
	box-shadow: var(--ugp-focus);
}

.ugp-shop .ugp-sort .ugp-icon--chevron {
	position: absolute;
	inset-inline-end: 11px;
	width: 15px;
	height: 15px;
	color: var(--ugp-muted, #7a8697);
	pointer-events: none;
}

/* -------------------------------------------------------------------------
 * Filter sidebar
 * ---------------------------------------------------------------------- */

.ugp-shop .ugp-filters {
	align-self: start;
	position: sticky;
	top: 20px;
	max-height: calc(100vh - 40px);
	padding: 20px;
	border: 1px solid var(--ugp-border, #e6e9ef);
	border-radius: var(--ugp-panel-radius, 18px);
	background: var(--ugp-panel-bg, #fff);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.ugp-shop .ugp-filters__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}

.ugp-shop .ugp-filters__title {
	margin: 0;
	margin-inline-end: auto;
	color: var(--ugp-title, #14181f);
	font-size: 1.2rem;
	font-style: italic;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.ugp-shop .ugp-reset {
	padding: 6px 12px;
	border: 1px solid var(--ugp-border-strong, #d4d9e3);
	border-radius: var(--ugp-btn-radius, 8px);
	background: transparent;
	color: var(--ugp-title, #14181f);
	font: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		border-color var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		transform var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-reset:hover {
	border-color: var(--ugp-filter, #2563eb);
	background: var(--ugp-filter-soft, rgba(37, 99, 235, 0.1));
	color: var(--ugp-filter, #2563eb);
}

.ugp-shop .ugp-reset:active {
	transform: scale(0.96);
}

.ugp-shop .ugp-filters__close {
	display: none;
	place-items: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ugp-muted, #7a8697);
	cursor: pointer;
}

/* Facet ---------------------------------------------------------------- */

.ugp-shop .ugp-facet {
	border-top: 1px solid var(--ugp-border, #e6e9ef);
}

.ugp-shop .ugp-facet:first-of-type {
	border-top: 0;
}

.ugp-shop .ugp-facet__heading {
	margin: 0;
	font-size: 1rem;
}

.ugp-shop .ugp-facet__head {
	display: flex;
	align-items: center;
	gap: 7px;
	width: 100%;
	padding: 11px 0;
	border: 0;
	background: transparent;
	color: var(--ugp-title, #14181f);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: -0.005em;
	text-align: start;
	cursor: pointer;
}

.ugp-shop .ugp-facet__head:focus-visible {
	outline: none;
	box-shadow: var(--ugp-focus);
	border-radius: 6px;
}

.ugp-shop .ugp-facet__head .ugp-icon--chevron {
	width: 14px;
	height: 14px;
	color: var(--ugp-muted, #7a8697);
	transition: transform var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-facet[data-open="1"] .ugp-facet__head .ugp-icon--chevron {
	transform: rotate(180deg);
}

/*
 * The 0fr → 1fr grid trick animates to the panel's natural height without
 * anyone having to measure it in JavaScript, so a facet whose options change
 * (counts updating, terms disappearing) still opens and closes smoothly.
 */
.ugp-shop .ugp-facet__panel {
	display: grid;
	grid-template-rows: 1fr;
	transition: grid-template-rows var(--ugp-dur-slow, 420ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-facet[data-open="0"] .ugp-facet__panel {
	grid-template-rows: 0fr;
}

.ugp-shop .ugp-facet__inner {
	overflow: hidden;
	min-height: 0;
}

.ugp-shop .ugp-facet[data-open="0"] .ugp-facet__inner > * {
	opacity: 0;
	transition: opacity calc(var(--ugp-dur, 200ms) / 2) var(--ugp-ease, ease);
}

.ugp-shop .ugp-facet__inner > * {
	opacity: 1;
	transition: opacity var(--ugp-dur-slow, 420ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-opts {
	margin: 0 0 4px;
	padding: 0;
	list-style: none;
}

.ugp-shop .ugp-opt {
	margin: 0;
	padding: 0;
}

.ugp-shop .ugp-opt[data-depth="1"] { padding-inline-start: 16px; }
.ugp-shop .ugp-opt[data-depth="2"] { padding-inline-start: 32px; }
.ugp-shop .ugp-opt[data-depth="3"] { padding-inline-start: 48px; }

/* Checkbox row ---------------------------------------------------------
 *
 * A native checkbox, tinted with accent-color. The control this replaced was
 * a visually-hidden input plus a styled span plus an SVG tick drawn on with
 * stroke-dashoffset — three separate things a theme's own input styling could
 * break independently, which is exactly what happened in the wild: the tick
 * showed on unticked rows. One native element cannot come apart that way.
 * ------------------------------------------------------------------- */

.ugp-shop .ugp-check {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 4px 8px;
	margin-inline: -8px;
	border-radius: 6px;
	color: var(--ugp-text, #3c4655);
	cursor: pointer;
	transition: background var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-check:hover {
	background: var(--ugp-filter-soft, rgba(37, 99, 235, 0.1));
}

.ugp-shop .ugp-check.is-empty {
	opacity: 0.45;
}

.ugp-shop .ugp-check__input {
	/* `auto` puts the native control back if the theme switched it off. */
	appearance: auto;
	-webkit-appearance: checkbox;
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	position: static;
	accent-color: var(--ugp-filter, #2563eb);
	background: none;
	border: 0;
	border-radius: 3px;
	box-shadow: none;
	opacity: 1;
	clip: auto;
	clip-path: none;
	cursor: pointer;
}

.ugp-shop .ugp-check__input:focus-visible {
	outline: 2px solid var(--ugp-filter, #2563eb);
	outline-offset: 2px;
}

.ugp-shop .ugp-check__label {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 0.8125rem;
	line-height: 1.35;
}

.ugp-shop .ugp-check__input:checked ~ .ugp-check__label {
	color: var(--ugp-title, #14181f);
	font-weight: 600;
}

.ugp-shop .ugp-check__count {
	flex: 0 0 auto;
	color: var(--ugp-muted, #7a8697);
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
}

/* Show more ------------------------------------------------------------ */

.ugp-shop .ugp-more {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0 12px;
	border: 0;
	background: transparent;
	color: var(--ugp-filter, #2563eb);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
}

.ugp-shop .ugp-more:hover .ugp-more__label {
	text-decoration: underline;
}

.ugp-shop .ugp-more:focus-visible {
	outline: none;
	box-shadow: var(--ugp-focus);
	border-radius: 6px;
}

.ugp-shop .ugp-more__icon {
	display: grid;
	place-items: center;
	width: 18px;
	height: 18px;
	font-size: 1rem;
	line-height: 1;
	transition: transform var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-more[aria-expanded="true"] .ugp-more__icon {
	transform: rotate(45deg);
}

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

.ugp-shop .ugp-price {
	padding: 2px 0 14px;
}

.ugp-shop .ugp-price__fields {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
}

.ugp-shop .ugp-price__field {
	display: flex;
	align-items: baseline;
	flex: 1 1 0;
	min-width: 0;
	gap: 3px;
	padding: 7px 9px;
	border: 1px solid var(--ugp-border, #e6e9ef);
	border-radius: var(--ugp-input-radius, 8px);
	background: var(--ugp-card-bg, #fff);
	color: var(--ugp-title, #14181f);
	transition: border-color var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		box-shadow var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-price__field:hover {
	border-color: var(--ugp-border-strong, #d4d9e3);
}

.ugp-shop .ugp-price__field:focus-within {
	border-color: var(--ugp-filter, #2563eb);
	box-shadow: 0 0 0 3px var(--ugp-filter-ring, rgba(37, 99, 235, 0.35));
}

.ugp-shop .ugp-price__symbol {
	flex: 0 0 auto;
	color: var(--ugp-muted, #7a8697);
	font-size: 0.75rem;
	line-height: 1;
}

.ugp-shop .ugp-price__field input {
	width: 100%;
	min-width: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

.ugp-shop .ugp-price__field input:focus {
	outline: none;
}

/* A short rule reads as a range separator; an em dash at this size looked
   like a stray character between two boxes. */
.ugp-shop .ugp-price__dash {
	flex: 0 0 auto;
	width: 8px;
	height: 1px;
	overflow: hidden;
	background: var(--ugp-border-strong, #d4d9e3);
	text-indent: 100%;
	white-space: nowrap;
}

/*
 * Two native range inputs stacked on one track. Native inputs mean the slider
 * is keyboard operable and announced by screen readers without any of it being
 * reimplemented; pointer-events are handed to whichever thumb is nearest.
 */
.ugp-shop .ugp-range {
	position: relative;
	height: 18px;
}

.ugp-shop .ugp-range__track {
	position: absolute;
	top: 50%;
	inset-inline: 0;
	height: 3px;
	transform: translateY(-50%);
	border-radius: 999px;
	background: var(--ugp-filter-track, rgba(37, 99, 235, 0.18));
}

.ugp-shop .ugp-range__fill {
	position: absolute;
	inset-block: 0;
	border-radius: 999px;
	background: var(--ugp-filter, #2563eb);
	transition: inset-inline-start var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		inset-inline-end var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-range.is-dragging .ugp-range__fill {
	transition: none;
}

.ugp-shop .ugp-range__input {
	position: absolute;
	inset-inline: 0;
	top: 0;
	width: 100%;
	height: 18px;
	margin: 0;
	padding: 0;
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	box-shadow: none;
	pointer-events: none;
}

.ugp-shop .ugp-range__input:focus {
	outline: none;
}

.ugp-shop .ugp-range__input::-webkit-slider-runnable-track {
	height: 18px;
	background: transparent;
	border: 0;
}

.ugp-shop .ugp-range__input::-moz-range-track {
	height: 18px;
	background: transparent;
	border: 0;
}

.ugp-shop .ugp-range__input::-webkit-slider-thumb {
	appearance: none;
	-webkit-appearance: none;
	width: 15px;
	height: 15px;
	border: 2px solid var(--ugp-card-bg, #fff);
	border-radius: 50%;
	background: var(--ugp-filter, #2563eb);
	box-shadow: 0 1px 3px rgba(20, 24, 31, 0.28);
	cursor: grab;
	pointer-events: auto;
	transition: transform var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		box-shadow var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-range__input::-moz-range-thumb {
	width: 15px;
	height: 15px;
	border: 2px solid var(--ugp-card-bg, #fff);
	border-radius: 50%;
	background: var(--ugp-filter, #2563eb);
	box-shadow: 0 1px 3px rgba(20, 24, 31, 0.28);
	cursor: grab;
	pointer-events: auto;
	transition: transform var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		box-shadow var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-range__input:hover::-webkit-slider-thumb { transform: scale(1.15); }
.ugp-shop .ugp-range__input:hover::-moz-range-thumb { transform: scale(1.15); }

.ugp-shop .ugp-range__input:focus-visible::-webkit-slider-thumb {
	box-shadow: 0 0 0 3px var(--ugp-filter-ring, rgba(37, 99, 235, 0.35));
}
.ugp-shop .ugp-range__input:focus-visible::-moz-range-thumb {
	box-shadow: 0 0 0 3px var(--ugp-filter-ring, rgba(37, 99, 235, 0.35));
}

.ugp-shop .ugp-range__input:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.22); }
.ugp-shop .ugp-range__input:active::-moz-range-thumb { cursor: grabbing; transform: scale(1.22); }

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

.ugp-shop .ugp-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ugp-shop .ugp-chips:not(:empty) {
	margin-bottom: 16px;
}

.ugp-shop .ugp-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 8px 5px 12px;
	border: 1px solid var(--ugp-filter, #2563eb);
	border-radius: 999px;
	background: var(--ugp-filter-soft, rgba(37, 99, 235, 0.1));
	color: var(--ugp-filter, #2563eb);
	font: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	animation: ugp-chip-in var(--ugp-dur, 200ms) var(--ugp-ease-out, ease-out) both;
	transition: background var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		transform var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-chip:hover {
	background: var(--ugp-filter, #2563eb);
	color: var(--ugp-filter-text, #fff);
}

.ugp-shop .ugp-chip:active {
	transform: scale(0.95);
}

.ugp-shop .ugp-chip:focus-visible {
	outline: none;
	box-shadow: var(--ugp-focus);
}

.ugp-shop .ugp-chip .ugp-icon {
	width: 13px;
	height: 13px;
}

.ugp-shop .ugp-chip.is-leaving {
	animation: ugp-chip-out var(--ugp-dur, 200ms) var(--ugp-ease, ease) both;
}

@keyframes ugp-chip-in {
	from { opacity: 0; transform: scale(0.86); }
	to   { opacity: 1; transform: scale(1); }
}

@keyframes ugp-chip-out {
	from { opacity: 1; transform: scale(1); }
	to   { opacity: 0; transform: scale(0.86); }
}

/* -------------------------------------------------------------------------
 * Grid and cards
 * ---------------------------------------------------------------------- */

.ugp-shop .ugp-grid {
	display: grid;
	grid-template-columns: repeat(var(--ugp-cols, 4), minmax(0, 1fr));
	gap: var(--ugp-gap, 24px);
	position: relative;
}

.ugp-shop .ugp-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--ugp-card-radius, 16px);
	background: var(--ugp-card-bg, #fff);
	box-shadow: var(--ugp-card-shadow, 0 6px 20px rgba(20, 24, 31, 0.06));
	text-align: var(--ugp-card-align, center);
	transition: transform var(--ugp-dur-slow, 420ms) var(--ugp-ease, ease),
		box-shadow var(--ugp-dur-slow, 420ms) var(--ugp-ease, ease);
}

.ugp-shop--animated .ugp-card {
	animation: ugp-rise var(--ugp-dur-slow, 420ms) var(--ugp-ease-out, ease-out) both;
	animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes ugp-rise {
	from { opacity: 0; transform: translateY(var(--ugp-rise, 26px)); }
	to   { opacity: 1; transform: translateY(0); }
}

.ugp-shop .ugp-card:hover {
	transform: translateY(var(--ugp-lift, -4px));
	box-shadow: 0 12px 34px rgba(20, 24, 31, 0.12);
}

/* Media ---------------------------------------------------------------- */

.ugp-shop .ugp-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: var(--ugp-ratio, 1 / 1);
	background: var(--ugp-media-bg, #fbfbfc);
}

.ugp-shop .ugp-card__img,
.ugp-shop .ugp-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: var(--ugp-fit, contain);
	padding: 8%;
	transition: transform var(--ugp-dur-slow, 420ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-card:hover .ugp-card__img,
.ugp-shop .ugp-card:hover .ugp-card__media img {
	transform: scale(var(--ugp-zoom, 1.06));
}

.ugp-shop .ugp-badge {
	position: absolute;
	top: 10px;
	inset-inline-start: 10px;
	padding: 4px 9px;
	border-radius: 999px;
	background: var(--ugp-sale, #16a34a);
	color: var(--ugp-sale-text, #fff);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.ugp-shop .ugp-badge--oos {
	inset-inline-start: auto;
	inset-inline-end: 10px;
	background: var(--ugp-muted, #7a8697);
	color: #fff;
}

/* Body ----------------------------------------------------------------- */

.ugp-shop .ugp-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: var(--ugp-card-items, center);
	gap: 8px;
	padding: 16px 16px 8px;
}

.ugp-shop .ugp-card__title {
	display: -webkit-box;
	-webkit-line-clamp: var(--ugp-title-lines, 3);
	line-clamp: var(--ugp-title-lines, 3);
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
	color: var(--ugp-title, #14181f);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.35;
}

.ugp-shop .ugp-card__title a {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0% 1px;
	transition: background-size var(--ugp-dur-slow, 420ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-card__title a:hover {
	background-size: 100% 1px;
}

.ugp-shop .ugp-card__title a:focus-visible {
	outline: none;
	box-shadow: var(--ugp-focus);
	border-radius: 4px;
}

.ugp-shop .ugp-card__price {
	margin-top: auto;
	color: var(--ugp-price, #e8622c);
	font-size: 1rem;
	font-weight: 600;
}

/* WooCommerce prints prices with its own markup; align it to our palette. */
.ugp-shop .ugp-card__price .woocommerce-Price-amount,
.ugp-shop .ugp-card__price ins {
	color: var(--ugp-price, #e8622c);
	text-decoration: none;
}

.ugp-shop .ugp-card__price del {
	margin-inline-end: 6px;
	color: var(--ugp-muted, #7a8697);
	font-size: 0.85em;
	font-weight: 400;
	opacity: 0.8;
}

.ugp-shop .ugp-card__price del .woocommerce-Price-amount {
	color: inherit;
}

/* Rating --------------------------------------------------------------- */

.ugp-shop .ugp-card__rating {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8rem;
}

.ugp-shop .ugp-stars {
	position: relative;
	display: inline-block;
	width: 76px;
	height: 14px;
	background: linear-gradient(
		90deg,
		#f5a623 var(--rating, 0%),
		var(--ugp-border, #e6e9ef) var(--rating, 0%)
	);
	-webkit-mask: repeating-linear-gradient(90deg, #000 0 12px, transparent 12px 15.2px);
	mask: repeating-linear-gradient(90deg, #000 0 12px, transparent 12px 15.2px);
}

.ugp-shop .ugp-card__reviews {
	color: var(--ugp-muted, #7a8697);
}

/* Foot ----------------------------------------------------------------- */

.ugp-shop .ugp-card__foot {
	display: flex;
	justify-content: var(--ugp-card-items, center);
	padding: 8px 16px 18px;
}

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

.ugp-shop .ugp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	position: relative;
	min-height: 40px;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: var(--ugp-btn-radius, 8px);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		color var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		border-color var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		transform 120ms var(--ugp-ease, ease),
		box-shadow var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-btn:focus-visible {
	outline: none;
	box-shadow: var(--ugp-focus);
}

.ugp-shop .ugp-btn:active {
	transform: scale(0.97);
}

.ugp-shop .ugp-btn--accent {
	background: var(--ugp-accent, #ffd100);
	color: var(--ugp-accent-text, #14181f);
}

.ugp-shop .ugp-btn--accent:hover {
	background: var(--ugp-accent-hover, #e6bc00);
}

.ugp-shop .ugp-btn--accent:focus-visible {
	box-shadow: 0 0 0 3px var(--ugp-accent-ring, rgba(255, 209, 0, 0.45));
}

.ugp-shop .ugp-btn--outline {
	border-color: var(--ugp-border-strong, #d4d9e3);
	background: var(--ugp-card-bg, #fff);
	color: var(--ugp-title, #14181f);
}

.ugp-shop .ugp-btn--outline:hover {
	border-color: var(--ugp-filter, #2563eb);
	color: var(--ugp-filter, #2563eb);
}

.ugp-shop .ugp-btn--ghost {
	border-color: var(--ugp-border, #e6e9ef);
	background: var(--ugp-card-bg, #fff);
	color: var(--ugp-title, #14181f);
}

.ugp-shop .ugp-btn--muted {
	background: var(--ugp-border, #e6e9ef);
	color: var(--ugp-muted, #7a8697);
	cursor: not-allowed;
}

.ugp-shop .ugp-btn .ugp-icon {
	width: 16px;
	height: 16px;
}

/* Add to cart states --------------------------------------------------- */

.ugp-shop .ugp-add {
	min-width: 130px;
}

.ugp-shop .ugp-add__spinner,
.ugp-shop .ugp-add__check {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	opacity: 0;
	transform: scale(0.7);
	transition: opacity var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		transform var(--ugp-dur, 200ms) var(--ugp-ease-out, ease-out);
}

.ugp-shop .ugp-add__spinner::after {
	content: "";
	width: 17px;
	height: 17px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: ugp-spin 720ms linear infinite;
}

.ugp-shop .ugp-add__label {
	transition: opacity var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		transform var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-add[data-state="loading"] .ugp-add__label,
.ugp-shop .ugp-add[data-state="done"] .ugp-add__label {
	opacity: 0;
	transform: translateY(-4px);
}

.ugp-shop .ugp-add[data-state="loading"] .ugp-add__spinner,
.ugp-shop .ugp-add[data-state="done"] .ugp-add__check {
	opacity: 1;
	transform: scale(1);
}

.ugp-shop .ugp-add[data-state="done"] {
	background: var(--ugp-accent-active, #cca700);
	color: var(--ugp-accent-text, #14181f);
}

.ugp-shop .ugp-add[data-state="error"] {
	animation: ugp-shake 400ms var(--ugp-ease, ease);
}

.ugp-shop .ugp-add[disabled] {
	cursor: wait;
}

@keyframes ugp-spin {
	to { transform: rotate(360deg); }
}

@keyframes ugp-shake {
	0%, 100% { transform: translateX(0); }
	20%      { transform: translateX(-5px); }
	40%      { transform: translateX(5px); }
	60%      { transform: translateX(-3px); }
	80%      { transform: translateX(3px); }
}

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

.ugp-pager {
	display: flex;
	justify-content: center;
	margin-top: var(--ugp-gap, 24px);
}

.ugp-pager:empty {
	margin-top: 0;
}

.ugp-shop .ugp-loadmore {
	min-width: 200px;
}

.ugp-shop .ugp-loadmore__spinner {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	opacity: 0;
	transition: opacity var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-loadmore__spinner::after {
	content: "";
	width: 17px;
	height: 17px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: ugp-spin 720ms linear infinite;
}

.ugp-shop .ugp-loadmore.is-loading .ugp-loadmore__label { opacity: 0; }
.ugp-shop .ugp-loadmore.is-loading .ugp-loadmore__spinner { opacity: 1; }

.ugp-pages {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: center;
}

.ugp-shop .ugp-page {
	display: grid;
	place-items: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--ugp-border, #e6e9ef);
	border-radius: var(--ugp-btn-radius, 8px);
	background: var(--ugp-card-bg, #fff);
	color: var(--ugp-title, #14181f);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	transition: background var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		border-color var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		color var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop a.ugp-page:hover {
	border-color: var(--ugp-filter, #2563eb);
	color: var(--ugp-filter, #2563eb);
}

.ugp-shop .ugp-page.current {
	border-color: var(--ugp-filter, #2563eb);
	background: var(--ugp-filter, #2563eb);
	color: var(--ugp-filter-text, #fff);
}

.ugp-shop .ugp-page.dots {
	border-color: transparent;
	background: transparent;
	color: var(--ugp-muted, #7a8697);
}

.ugp-page .ugp-icon--chevron {
	width: 16px;
	height: 16px;
}

.ugp-page.prev .ugp-icon--chevron { transform: rotate(90deg); }
.ugp-page.next .ugp-icon--chevron { transform: rotate(-90deg); }

/* -------------------------------------------------------------------------
 * Loading, empty and error states
 * ---------------------------------------------------------------------- */

/*
 * A filter change refreshes in place: the grid keeps its height and its
 * scroll position, dims slightly, and a thin indeterminate bar runs along the
 * top. Swapping the whole grid for a spinner would throw the page back to the
 * top and lose the shopper's place — only the very first load does that.
 */
.ugp-shop .ugp-grid.is-refreshing {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-progress {
	position: absolute;
	top: -6px;
	inset-inline: 0;
	height: 3px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--ugp-filter-track, rgba(37, 99, 235, 0.18));
}

.ugp-shop .ugp-progress::after {
	content: "";
	position: absolute;
	inset-block: 0;
	width: 40%;
	border-radius: 999px;
	background: var(--ugp-filter, #2563eb);
	animation: ugp-indeterminate 1.1s var(--ugp-ease, ease) infinite;
}

@keyframes ugp-indeterminate {
	0%   { transform: translateX(-100%); }
	100% { transform: translateX(350%); }
}

/* Skeletons ------------------------------------------------------------ */

.ugp-shop .ugp-skeleton {
	border-radius: var(--ugp-card-radius, 16px);
	background: var(--ugp-card-bg, #fff);
	box-shadow: var(--ugp-card-shadow, none);
	overflow: hidden;
}

.ugp-shop .ugp-skeleton__media {
	aspect-ratio: var(--ugp-ratio, 1 / 1);
}

.ugp-shop .ugp-skeleton__line {
	height: 12px;
	margin: 12px 16px;
	border-radius: 6px;
}

.ugp-shop .ugp-skeleton__line--short { width: 45%; }
.ugp-shop .ugp-skeleton__btn {
	height: 40px;
	margin: 16px;
	border-radius: var(--ugp-btn-radius, 8px);
}

.ugp-shop .ugp-skeleton__media,
.ugp-shop .ugp-skeleton__line,
.ugp-shop .ugp-skeleton__btn {
	background: var(--ugp-skeleton, #eef0f3);
	background-image: linear-gradient(
		90deg,
		transparent 0%,
		var(--ugp-skeleton-sheen, rgba(255, 255, 255, 0.65)) 50%,
		transparent 100%
	);
	background-size: 200% 100%;
	background-repeat: no-repeat;
	animation: ugp-shimmer 1.4s ease-in-out infinite;
}

@keyframes ugp-shimmer {
	from { background-position: -150% 0; }
	to   { background-position: 250% 0; }
}

/* Empty and error ------------------------------------------------------ */

.ugp-shop .ugp-empty,
.ugp-shop .ugp-error {
	margin: 40px auto;
	max-width: 42ch;
	color: var(--ugp-muted, #7a8697);
	font-size: 1rem;
	text-align: center;
	animation: ugp-rise var(--ugp-dur-slow, 420ms) var(--ugp-ease-out, ease-out) both;
}

.ugp-shop .ugp-error {
	color: var(--ugp-title, #14181f);
}

.ugp-shop .ugp-error .ugp-btn {
	margin-top: 14px;
}

/* -------------------------------------------------------------------------
 * Toast
 *
 * The confirmation carries the store's own accent rather than a generic
 * success green, and the two actions sit on their own row: side by side with
 * the message they ran together into one unreadable string, and "Checkout" —
 * the thing a shopper who just added something is most likely to want — was
 * indistinguishable from the link beside it.
 * ---------------------------------------------------------------------- */

.ugp-shop .ugp-toast {
	position: fixed;
	inset-block-end: 24px;
	inset-inline-end: 24px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
}

.ugp-shop .ugp-toast__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	max-width: min(380px, calc(100vw - 40px));
	padding: 14px;
	border: 1px solid var(--ugp-border, #e6e9ef);
	border-radius: 14px;
	background: var(--ugp-card-bg, #fff);
	box-shadow: 0 6px 16px rgba(20, 24, 31, 0.08), 0 16px 48px rgba(20, 24, 31, 0.16);
	color: var(--ugp-title, #14181f);
	pointer-events: auto;
	animation: ugp-toast-in var(--ugp-dur-slow, 420ms) var(--ugp-ease-out, ease-out) both;
}

.ugp-shop .ugp-toast__item.is-leaving {
	animation: ugp-toast-out var(--ugp-dur, 200ms) var(--ugp-ease, ease) both;
}

.ugp-shop .ugp-toast__icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--ugp-accent, #ffd100);
	color: var(--ugp-accent-text, #14181f);
}

.ugp-shop .ugp-toast__item.is-error .ugp-toast__icon {
	background: #d63638;
	color: #fff;
}

.ugp-shop .ugp-toast__icon .ugp-icon {
	width: 16px;
	height: 16px;
}

.ugp-shop .ugp-toast__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	flex: 1 1 auto;
	padding-top: 2px;
}

.ugp-shop .ugp-toast__text {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.45;
}

.ugp-shop .ugp-toast__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	/* Pull the first link's padding back so its text lines up with the
	   message above rather than sitting 10px to the right of it. */
	margin-inline-start: -10px;
}

.ugp-shop .ugp-toast__link,
.ugp-shop .ugp-toast__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8125rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background var(--ugp-dur, 200ms) var(--ugp-ease, ease),
		color var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-toast__link {
	padding: 6px 10px;
	border-radius: var(--ugp-btn-radius, 8px);
	color: var(--ugp-muted, #7a8697);
}

.ugp-shop .ugp-toast__link:hover {
	background: var(--ugp-filter-soft, rgba(37, 99, 235, 0.1));
	color: var(--ugp-title, #14181f);
}

.ugp-shop .ugp-toast__cta {
	padding: 7px 14px;
	border-radius: var(--ugp-btn-radius, 8px);
	background: var(--ugp-accent, #ffd100);
	color: var(--ugp-accent-text, #14181f);
	font-weight: 700;
}

.ugp-shop .ugp-toast__cta:hover {
	background: var(--ugp-accent-hover, #e6bc00);
	color: var(--ugp-accent-text, #14181f);
}

@keyframes ugp-toast-in {
	from { opacity: 0; transform: translateY(16px) scale(0.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ugp-toast-out {
	from { opacity: 1; transform: translateY(0); }
	to   { opacity: 0; transform: translateY(8px); }
}

/* -------------------------------------------------------------------------
 * Utilities
 * ---------------------------------------------------------------------- */

.ugp-shop .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.ugp-shop .ugp-scrim {
	position: fixed;
	inset: 0;
	z-index: 998;
	background: var(--ugp-overlay, rgba(20, 24, 31, 0.45));
	opacity: 0;
	transition: opacity var(--ugp-dur, 200ms) var(--ugp-ease, ease);
}

.ugp-shop .ugp-scrim.is-open {
	opacity: 1;
}

/* -------------------------------------------------------------------------
 * Responsive
 *
 * Container queries where the grid's own width is what matters (it can sit in
 * a narrow Elementor column on a wide screen), viewport queries for the
 * drawer, which is inherently about the device.
 * ---------------------------------------------------------------------- */

@container (max-width: 900px) {
	.ugp-shop .ugp-grid {
		grid-template-columns: repeat(var(--ugp-cols-tablet, 3), minmax(0, 1fr));
	}
}

@container (max-width: 560px) {
	.ugp-shop .ugp-grid {
		grid-template-columns: repeat(var(--ugp-cols-mobile, 2), minmax(0, 1fr));
	}
}

/* Browsers without container query support still get a sensible ladder. */
@supports not (container-type: inline-size) {
	@media (max-width: 1100px) {
		.ugp-shop .ugp-grid { grid-template-columns: repeat(var(--ugp-cols-tablet, 3), minmax(0, 1fr)); }
	}
	@media (max-width: 700px) {
		.ugp-shop .ugp-grid { grid-template-columns: repeat(var(--ugp-cols-mobile, 2), minmax(0, 1fr)); }
	}
}

@media (max-width: 900px) {
	.ugp-shop--has-filters .ugp-shop__body,
	.ugp-shop--filters-right.ugp-shop--has-filters .ugp-shop__body {
		grid-template-columns: minmax(0, 1fr);
	}

	.ugp-shop .ugp-filter-toggle {
		display: inline-flex;
	}

	.ugp-shop__bar-end {
		width: 100%;
		margin-inline-start: 0;
	}

	.ugp-shop .ugp-search__field {
		width: 100%;
	}

	.ugp-shop .ugp-search {
		flex: 1 1 auto;
	}

	/* The sidebar becomes a drawer: off-canvas, focus-trapped, scrim behind. */
	.ugp-shop .ugp-filters {
		position: fixed;
		inset-block: 0;
		inset-inline-start: 0;
		z-index: 999;
		width: min(340px, 88vw);
		max-height: none;
		border: 0;
		border-radius: 0;
		transform: translateX(-102%);
		transition: transform var(--ugp-dur-slow, 420ms) var(--ugp-ease, ease),
			visibility var(--ugp-dur-slow, 420ms);
		visibility: hidden;
	}

	.ugp-shop--filters-right .ugp-filters {
		inset-inline-start: auto;
		inset-inline-end: 0;
		transform: translateX(102%);
	}

	.ugp-shop .ugp-filters.is-open {
		transform: translateX(0);
		visibility: visible;
		box-shadow: 0 0 60px rgba(20, 24, 31, 0.3);
	}

	.ugp-shop .ugp-filters__close {
		display: grid;
	}
}

@media (max-width: 480px) {
	.ugp-shop .ugp-toast {
		inset-inline: 12px;
		inset-block-end: 12px;
	}

	.ugp-shop .ugp-card__body { padding: 12px 12px 6px; }
	.ugp-shop .ugp-card__foot { padding: 6px 12px 14px; }
	.ugp-shop .ugp-add { min-width: 0; width: 100%; }
}

/* -------------------------------------------------------------------------
 * Reduced motion
 *
 * This is not a downgrade path — it is the correct rendering for anyone whose
 * device asks for it, and it overrides the shop owner's animation settings.
 * ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.ugp-shop *,
	.ugp-shop *::before,
	.ugp-shop *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}

	.ugp-shop .ugp-card:hover {
		transform: none;
	}

	.ugp-shop .ugp-card:hover .ugp-card__img {
		transform: none;
	}

	/* The one exception: a loading indicator that never moves reads as frozen,
	   so the spinner and the progress bar keep animating, just calmly. */
	.ugp-shop .ugp-add__spinner::after,
	.ugp-shop .ugp-loadmore__spinner::after {
		animation: ugp-spin 1.4s linear infinite !important;
	}

	.ugp-shop .ugp-progress::after {
		animation: ugp-indeterminate 2s ease infinite !important;
	}
}

/* Forced colours (Windows high contrast) ------------------------------- */

@media (forced-colors: active) {
	.ugp-shop .ugp-card,
	.ugp-shop .ugp-filters {
		border: 1px solid CanvasText;
	}
}

/* -------------------------------------------------------------------------
 * Theme armour — the only !important in this file
 *
 * Everything above is scoped under .ugp-shop, which beats the class-based
 * rules most themes use. It does NOT beat two things that are common in
 * commercial themes:
 *
 *   #content button { ... }      an ID is specificity 1,0,1 and outranks any
 *                                number of classes
 *   .button { ... !important }   !important outranks specificity entirely
 *
 * Either one silently strips the add-to-cart button back to no background —
 * which is exactly what was reported from a live store, on a theme where the
 * card, price and title all styled correctly and only the button did not.
 * Buttons, inputs and svg are the elements themes target most bluntly, so the
 * few properties that define each control's identity are re-asserted here.
 *
 * This block is deliberately narrow (background, colour, border, fill), uses
 * compound selectors for extra specificity, and is last in the file so that
 * ordering among these rules is predictable. Resist widening it: anything that
 * does not visibly break under a hostile theme does not belong here.
 * ---------------------------------------------------------------------- */

/*
 * A theme rule as ordinary as `svg { fill: currentColor }` beats the fill="none"
 * presentation attribute on our icons — CSS always outranks a presentation
 * attribute — and every outline icon fills in as a solid blob.
 */
.ugp-shop .ugp-icon {
	fill: none !important;
	stroke: currentColor !important;
}

.ugp-shop .ugp-btn.ugp-btn--accent {
	background: var(--ugp-accent, #ffd100) !important;
	color: var(--ugp-accent-text, #14181f) !important;
	border-color: transparent !important;
}

.ugp-shop .ugp-btn.ugp-btn--accent:hover,
.ugp-shop .ugp-btn.ugp-btn--accent:focus {
	background: var(--ugp-accent-hover, #e6bc00) !important;
	color: var(--ugp-accent-text, #14181f) !important;
}

.ugp-shop .ugp-add.ugp-btn[data-state="done"] {
	background: var(--ugp-accent-active, #cca700) !important;
	color: var(--ugp-accent-text, #14181f) !important;
}

.ugp-shop .ugp-btn.ugp-btn--outline,
.ugp-shop .ugp-btn.ugp-btn--ghost {
	background: var(--ugp-card-bg, #fff) !important;
	color: var(--ugp-title, #14181f) !important;
}

.ugp-shop .ugp-btn.ugp-btn--muted {
	background: var(--ugp-border, #e6e9ef) !important;
	color: var(--ugp-muted, #7a8697) !important;
	border-color: transparent !important;
}

.ugp-shop .ugp-chip {
	background: var(--ugp-filter-soft, rgba(37, 99, 235, 0.1)) !important;
	color: var(--ugp-filter, #2563eb) !important;
	border-color: var(--ugp-filter, #2563eb) !important;
}

.ugp-shop .ugp-chip:hover {
	background: var(--ugp-filter, #2563eb) !important;
	color: var(--ugp-filter-text, #fff) !important;
}

.ugp-shop .ugp-toast__cta {
	background: var(--ugp-accent, #ffd100) !important;
	color: var(--ugp-accent-text, #14181f) !important;
}

.ugp-shop .ugp-search__field,
.ugp-shop .ugp-sort__select,
.ugp-shop .ugp-price__field {
	background: var(--ugp-card-bg, #fff) !important;
	color: var(--ugp-title, #14181f) !important;
	border-color: var(--ugp-border, #e6e9ef) !important;
}

.ugp-shop .ugp-price__field:focus-within,
.ugp-shop .ugp-search__field:focus {
	border-color: var(--ugp-filter, #2563eb) !important;
}

.ugp-shop .ugp-check__input {
	accent-color: var(--ugp-filter, #2563eb) !important;
	appearance: auto !important;
	-webkit-appearance: checkbox !important;
}

.ugp-shop .ugp-card {
	background: var(--ugp-card-bg, #fff) !important;
}

/*
 * Controls that must stay chromeless. A theme styling every `button` or
 * `input` with a border draws a box around each facet heading and a dashed
 * outline inside the price fields — the heading is a button and the price
 * field's inner element is an input, even though neither should look like one.
 */
.ugp-shop .ugp-facet__head,
.ugp-shop .ugp-more,
.ugp-shop .ugp-search__clear,
.ugp-shop .ugp-filters__close,
.ugp-shop .ugp-price__field input,
.ugp-shop .ugp-range__input {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

.ugp-shop .ugp-facet__head {
	color: var(--ugp-title, #14181f) !important;
}

.ugp-shop .ugp-more {
	color: var(--ugp-filter, #2563eb) !important;
}

.ugp-shop .ugp-price__field input {
	color: var(--ugp-title, #14181f) !important;
}

.ugp-shop .ugp-reset {
	background: transparent !important;
	border: 1px solid var(--ugp-border-strong, #d4d9e3) !important;
	color: var(--ugp-title, #14181f) !important;
}

.ugp-shop .ugp-reset:hover {
	background: var(--ugp-filter-soft, rgba(37, 99, 235, 0.1)) !important;
	border-color: var(--ugp-filter, #2563eb) !important;
	color: var(--ugp-filter, #2563eb) !important;
}

.ugp-shop .ugp-btn.ugp-btn--ghost,
.ugp-shop .ugp-btn.ugp-btn--outline {
	border: 1px solid var(--ugp-border, #e6e9ef) !important;
}
