/*
 * J. Ottenheijm.com Product Grid – front end.
 *
 * Only design variables are used, never fixed colors or fonts:
 *   --jo-product-grid-color-primary (+ -hover), -text-on-primary, -color-secondary (+ -hover),
 *   -color-accent (+ -hover), -text-on-accent, -color-text, -color-background, -color-border,
 *   -color-surface, -font-headings, -weight-headings, -font-body, -radius.
 * Class prefix: .jo-pg- (short on purpose: the grid can contain hundreds of cards).
 * Specificity: theme/Elementor rules such as ".elementor-kit-5 button" win otherwise, so buttons
 * are always prefixed with a parent class.
 */

.jo-pg-grid,
.jo-pg-bar,
.jo-pg-quickview,
.jo-pg-filter,
.jo-pg-search,
.jo-pg-sort,
.jo-pg-status,
.jo-pg-toggle {
	--jopg-primary: var(--jo-product-grid-color-primary);
	--jopg-text: var(--jo-product-grid-color-text);
	--jopg-bg: var(--jo-product-grid-color-background);
	--jopg-border: var(--jo-product-grid-color-border);
	--jopg-surface: var(--jo-product-grid-color-surface);
	--jopg-secondary: var(--jo-product-grid-color-secondary);
	--jopg-accent: var(--jo-product-grid-color-accent);
	--jopg-radius: var(--jo-product-grid-radius);
	--jopg-badge: var(--jo-product-grid-color-badge);
	--jopg-on-badge: var(--jo-product-grid-text-on-badge);
	/* Plus and check icons as masks, colored with currentColor. */
	--jopg-icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7 1h2v6h6v2H9v6H7V9H1V7h6z'/%3E%3C/svg%3E");
	--jopg-icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.2 13.4 1 8.2l1.6-1.6 3.6 3.6 7.2-7.2L15 4.6z'/%3E%3C/svg%3E");
}

.jo-pg-placeholder {
	padding: 10px;
	border: 1px dashed currentColor;
}

/* ===== Grid ===== */
.jo-pg-grid .jo-pg-cards {
	--jopg-columns: var(--jopg-cols-desktop, 4);
	display: grid;
	grid-template-columns: repeat(var(--jopg-columns), minmax(0, 1fr));
	gap: 20px;
	padding-bottom: 10px;
}

@media (max-width: 1200px) {
	.jo-pg-grid .jo-pg-cards { --jopg-columns: var(--jopg-cols-laptop, 4); }
}

@media (max-width: 1024px) {
	.jo-pg-grid .jo-pg-cards { --jopg-columns: var(--jopg-cols-tablet, 3); }
}

@media (max-width: 767px) {
	.jo-pg-grid .jo-pg-cards { --jopg-columns: var(--jopg-cols-mobile, 2); }
}

.jo-pg-grid--series .jo-pg-cards { padding-top: 10px; }

.jo-pg-grid .jo-pg-cards > .jo-pg-heading {
	grid-column: 1 / -1;
	margin: 20px 0 -10px;
	padding: 0;
}

.jo-pg-grid .jo-pg-cards > .jo-pg-heading:first-child,
.jo-pg-grid .jo-pg-cards > .jo-pg-heading.is-first { margin-top: 0; }

.jo-pg-grid .jo-pg-heading h2 {
	margin: 0;
	/* Own color and font (1.11.2): some themes give h2 a light color (white on a light page). */
	color: var(--jo-product-grid-color-primary);
	font-family: var(--jo-product-grid-font-headings);
	font-weight: var(--jo-product-grid-weight-headings);
}

.jo-pg-grid .jo-pg-cards > .jo-pg-card[hidden],
.jo-pg-grid .jo-pg-cards > .jo-pg-heading[hidden],
.jo-pg-grid .jo-pg-cards[hidden],
.jo-pg-grid .jo-pg-empty[hidden] { display: none; }

/* ===== Card ===== */
.jo-pg-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-content: start;
	min-width: 0;
}

.jo-pg-card__photo {
	display: block;
	grid-area: 1 / 1;
}

.jo-pg-card__photo img {
	display: block;
	width: 100%;
	height: auto; /* Square photos, no rounding: a swatch shows its full surface. */
	aspect-ratio: var(--jopg-ratio, auto); /* Setting "Aspect ratio" of the grid; "auto" = as the photo. */
	object-fit: cover;
}

.jo-pg-card__photo img:not(.is-loaded) {
	background-color: var(--jopg-surface);
	animation: jo-pg-pulse 1.8s ease-in-out infinite;
}

.jo-pg-card__photo img.is-loaded { animation: jo-pg-fade-in 0.35s ease-out; }

@keyframes jo-pg-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.45; }
}

@keyframes jo-pg-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.jo-pg-card__name {
	margin-top: 10px;
	color: var(--jopg-primary);
	font-family: var(--jo-product-grid-font-headings);
	font-size: 1.25em; /* Relative to the site's text size: 20px with 16px text. */
	font-weight: var(--jo-product-grid-weight-headings);
	line-height: 1.2;
}

.jo-pg-card__detail {
	margin-top: 5px;
	color: var(--jopg-primary);
	font-family: var(--jo-product-grid-font-body);
	font-size: 1em; /* Same size as the site's running text. */
	font-weight: 500;
	line-height: 1.2;
}

.jo-pg-card__price {
	margin-top: 5px;
	color: var(--jopg-text);
	font-family: var(--jo-product-grid-font-body);
	font-size: 1em;
	line-height: 1.4;
}

.jo-pg-card__price del { opacity: 0.6; }

.jo-pg-card__price ins { text-decoration: none; }

/* ===== Card of a post grid: one link, rounded photo with border, badge, hover text, logo ===== */
.jo-pg-grid a.jo-pg-card--post,
.jo-pg-grid a.jo-pg-card--post:is(:hover, :focus, :visited) {
	color: inherit;
	text-decoration: none;
}

.jo-pg-grid a.jo-pg-card--post:focus-visible {
	outline: 2px solid var(--jopg-primary);
	outline-offset: 4px;
	border-radius: var(--jopg-radius);
}

.jo-pg-card--post .jo-pg-card__photo {
	position: relative;
	overflow: hidden;
	border: 1px solid var(--jopg-border);
	border-radius: var(--jopg-radius);
	background-color: var(--jopg-surface);
}

.jo-pg-card--post .jo-pg-card__photo img {
	object-fit: cover;
	transition: transform 0.4s ease;
}

.jo-pg-card__badge {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	padding: 4px 12px;
	border-radius: 999px;
	background-color: var(--jopg-badge);
	color: var(--jopg-on-badge);
	font-family: var(--jo-product-grid-font-body);
	font-size: 0.8125em;
	line-height: 1.4;
}

.jo-pg-card__hover {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: color-mix(in srgb, var(--jopg-primary) 45%, transparent);
	color: var(--jo-product-grid-text-on-primary);
	font-family: var(--jo-product-grid-font-headings);
	font-size: 1.125em;
	font-weight: var(--jo-product-grid-weight-headings);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.jo-pg-card__hover > span {
	padding: 8px 20px;
	border: 1px solid currentColor;
	border-radius: 999px;
}

@media (hover: hover) {
	.jo-pg-grid a.jo-pg-card--post:hover .jo-pg-card__hover,
	.jo-pg-grid a.jo-pg-card--post:focus-visible .jo-pg-card__hover { opacity: 1; }

	.jo-pg-grid a.jo-pg-card--post:hover .jo-pg-card__photo img { transform: scale(1.03); }
}

.jo-pg-card__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 10px;
}

.jo-pg-card__text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.jo-pg-card--post .jo-pg-card__name,
.jo-pg-card--post .jo-pg-card__detail { display: block; }

.jo-pg-card--post .jo-pg-card__name { margin-top: 0; }

/* Logo: every logo gets the same box (height and maximum width, adjustable in the Elementor
 * widget), scaled to fit and aligned right, so logos of different shapes look alike. */
.jo-pg-card__logo {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: flex-end;
	width: var(--jopg-logo-width, 110px);
	max-width: 35%;
	height: var(--jopg-logo-height, 36px);
}

.jo-pg-card__logo img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: right center;
}

@media (prefers-reduced-motion: reduce) {
	.jo-pg-card--post .jo-pg-card__photo img,
	.jo-pg-card__hover { transition: none; }
}

/* Sort choice for visitors */
.jo-pg-sort {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--jo-product-grid-font-body);
}

.jo-pg-sort .jo-pg-sort__label {
	color: var(--jopg-text);
	font-size: 0.875em;
	white-space: nowrap;
}

.jo-pg-sort select.jo-pg-sort__select {
	min-height: 40px;
	padding: 6px 30px 6px 12px;
	border: 1px solid var(--jopg-border);
	border-radius: var(--jopg-radius);
	background-color: var(--jopg-bg);
	color: var(--jopg-text);
	font-family: inherit;
	font-size: 0.9375em;
}

.jo-pg-sort select.jo-pg-sort__select:focus-visible {
	outline: 2px solid var(--jopg-primary);
	outline-offset: 2px;
}

/* Date line and short text (both card styles). */
.jo-pg-card__date,
.jo-pg-card__excerpt {
	display: block;
	margin-top: 5px;
	color: var(--jopg-text);
	font-family: var(--jo-product-grid-font-body);
	font-size: 0.875em;
	line-height: 1.4;
}

.jo-pg-card__date { opacity: 0.8; }

/* ===== Load more ===== */
.jo-pg-grid .jo-pg-more {
	display: flex;
	justify-content: center;
	margin-top: 30px;
}

.jo-pg-grid .jo-pg-more[hidden] { display: none; }

.jo-pg-grid .jo-pg-more button.jo-pg-more__button,
.jo-pg-grid .jo-pg-more button.jo-pg-more__button:is(:hover, :focus, :active) {
	padding: 12px 30px;
	border: 1px solid var(--jopg-primary);
	border-radius: var(--jopg-radius);
	background-color: transparent;
	color: var(--jopg-primary);
	font-family: var(--jo-product-grid-font-body);
	font-size: 1em;
	line-height: 1.2;
	cursor: pointer;
}

.jo-pg-grid .jo-pg-more button.jo-pg-more__button:is(:hover, :focus-visible) {
	background-color: var(--jopg-primary);
	color: var(--jo-product-grid-text-on-primary);
}

/* ===== Pick button: below the photo on tablet/mobile, circle on the photo on desktop ===== */
.jo-pg-grid .jo-pg-card button.jo-pg-pick,
.jo-pg-grid .jo-pg-card button.jo-pg-pick:is(:hover, :focus, :active) {
	position: relative;
	display: flex;
	align-items: center;
	justify-self: start;
	min-height: 32px;
	margin: 10px 0 0;
	padding: 0 12px;
	border: 0;
	border-radius: 50px;
	background-color: var(--jopg-accent);
	color: var(--jo-product-grid-text-on-accent);
	font-family: var(--jo-product-grid-font-body);
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.jo-pg-grid .jo-pg-card button.jo-pg-pick::before {
	content: "";
	position: absolute;
	inset: -6px -4px;
}

.jo-pg-grid .jo-pg-card.is-selected button.jo-pg-pick {
	background-color: var(--jopg-secondary);
	color: var(--jopg-primary);
}

.jo-pg-pick > span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	white-space: nowrap;
}

.jo-pg-pick > span::before {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	background-color: currentColor;
	-webkit-mask: var(--jopg-icon-plus) center / contain no-repeat;
	mask: var(--jopg-icon-plus) center / contain no-repeat;
}

.jo-pg-pick > .jo-pg-pick__added::before {
	-webkit-mask-image: var(--jopg-icon-check);
	mask-image: var(--jopg-icon-check);
}

.jo-pg-card:not(.is-selected) .jo-pg-pick__added,
.jo-pg-card.is-selected .jo-pg-pick__add { display: none; }

.jo-pg-grid .jo-pg-card button.jo-pg-pick:focus-visible {
	outline: 2px solid var(--jopg-primary);
	outline-offset: 2px;
}

.jo-pg-grid .jo-pg-card.is-locked button.jo-pg-pick {
	opacity: 0.45;
	cursor: not-allowed;
}

@media (min-width: 1025px) {
	.jo-pg-grid .jo-pg-card button.jo-pg-pick,
	.jo-pg-grid .jo-pg-card button.jo-pg-pick:is(:hover, :focus, :active) {
		grid-area: 1 / 1;
		align-self: end;
		justify-self: end;
		z-index: 2;
		justify-content: center;
		width: 30px;
		height: 30px;
		min-height: 0;
		margin: 0 10px 18px 0;
		padding: 0;
		border-radius: 50%;
		background-color: var(--jopg-bg);
		color: var(--jopg-primary);
	}

	.jo-pg-grid .jo-pg-card.is-selected button.jo-pg-pick {
		background-color: var(--jopg-primary);
		color: var(--jo-product-grid-text-on-primary);
	}

	/* Text only for screen readers; the circle shows the icon. */
	.jo-pg-grid .jo-pg-card button.jo-pg-pick > span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.jo-pg-grid .jo-pg-card button.jo-pg-pick::before {
		position: static;
		inset: auto;
		width: 12px;
		height: 12px;
		background-color: currentColor;
		-webkit-mask: var(--jopg-icon-plus) center / contain no-repeat;
		mask: var(--jopg-icon-plus) center / contain no-repeat;
	}

	.jo-pg-grid .jo-pg-card.is-selected button.jo-pg-pick::before {
		-webkit-mask-image: var(--jopg-icon-check);
		mask-image: var(--jopg-icon-check);
	}

	.jo-pg-grid .jo-pg-card.is-locked button.jo-pg-pick { opacity: 1; }

	.jo-pg-grid .jo-pg-card.is-locked button.jo-pg-pick::before { opacity: 0.4; }
}

/* Desktop with a mouse: the circle only appears on hover, focus or when selected. */
@media (hover: hover) and (min-width: 1025px) {
	.jo-pg-card.is-pickable:not(.jo-pg-card--pick-name):not(.jo-pg-quickview__pick):not(.is-selected):not(.is-loading):not(:hover):not(:focus-within) .jo-pg-pick { opacity: 0; }
}

/* ===== Pick button next to the name (setting "Place of the choose button"): a round icon on all screens.
   Photo opens the product, the icon only chooses. Visible 32 px, touch area 44 px. ===== */
.jo-pg-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	margin-top: 10px;
}

.jo-pg-card__lines { min-width: 0; }

.jo-pg-card__head .jo-pg-card__name {
	margin-top: 0;
	overflow-wrap: anywhere;
}

.jo-pg-grid .jo-pg-card.jo-pg-card--pick-name button.jo-pg-pick,
.jo-pg-grid .jo-pg-card.jo-pg-card--pick-name button.jo-pg-pick:is(:hover, :focus, :active) {
	position: relative;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	width: 32px;
	height: 32px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--jopg-accent);
	color: var(--jo-product-grid-text-on-accent);
	opacity: 1;
}

.jo-pg-grid .jo-pg-card.jo-pg-card--pick-name button.jo-pg-pick:hover {
	background-color: var(--jo-product-grid-color-accent-hover, var(--jopg-accent));
}

/* Text only for screen readers; the circle shows the icon. */
.jo-pg-grid .jo-pg-card.jo-pg-card--pick-name button.jo-pg-pick > span {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.jo-pg-grid .jo-pg-card.jo-pg-card--pick-name button.jo-pg-pick::before {
	content: "";
	position: static;
	inset: auto;
	width: 14px;
	height: 14px;
	background-color: currentColor;
	-webkit-mask: var(--jopg-icon-plus) center / contain no-repeat;
	mask: var(--jopg-icon-plus) center / contain no-repeat;
}

/* Larger touch area around the visible circle. */
.jo-pg-grid .jo-pg-card.jo-pg-card--pick-name button.jo-pg-pick::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
}

.jo-pg-grid .jo-pg-card.jo-pg-card--pick-name.is-selected button.jo-pg-pick {
	background-color: var(--jopg-primary);
	color: var(--jo-product-grid-text-on-primary);
}

.jo-pg-grid .jo-pg-card.jo-pg-card--pick-name.is-selected button.jo-pg-pick::before {
	-webkit-mask-image: var(--jopg-icon-check);
	mask-image: var(--jopg-icon-check);
}

.jo-pg-grid .jo-pg-card.jo-pg-card--pick-name.is-locked button.jo-pg-pick {
	opacity: 0.45;
	cursor: not-allowed;
}

@media (max-width: 767px) {
	.jo-pg-card--pick-name .jo-pg-card__head { gap: 8px; }

	.jo-pg-card--pick-name .jo-pg-card__head .jo-pg-card__name { font-size: 1.1em; }
}

/* ===== Filters ===== */
.jo-pg-filter {
	position: relative;
	color: var(--jopg-text);
	font-family: var(--jo-product-grid-font-body);
	font-size: 15px;
	line-height: 1.5;
}

.jo-pg-filter button.jo-pg-filter__button,
.jo-pg-filter button.jo-pg-filter__button:is(:hover, :focus, :active) {
	display: flex;
	align-items: center;
	width: 100%;
	margin: 0;
	padding: 12px 44px 12px 20px;
	border: 1px solid var(--jopg-border);
	border-radius: 10px;
	background-color: var(--jopg-bg);
	color: var(--jopg-text);
	font: inherit;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	transition: border-color 0.2s;
}

.jo-pg-filter button.jo-pg-filter__button:hover,
.jo-pg-filter.is-open button.jo-pg-filter__button { border-color: var(--jopg-secondary); }

.jo-pg-filter.is-active button.jo-pg-filter__button {
	border-color: var(--jopg-primary);
	color: var(--jopg-primary);
	font-weight: 500;
}

.jo-pg-filter button.jo-pg-filter__button:focus-visible {
	outline: 2px solid var(--jopg-primary);
	outline-offset: 2px;
}

.jo-pg-filter__label {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.jo-pg-filter .jo-pg-filter__button::after,
.jo-pg-toggle::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 20px;
	width: 8px;
	height: 8px;
	margin-top: -6px;
	border-right: 1.5px solid var(--jopg-primary);
	border-bottom: 1.5px solid var(--jopg-primary);
	transform: rotate(45deg);
	transition: transform 0.2s, margin-top 0.2s;
}

.jo-pg-filter.is-open .jo-pg-filter__button::after,
.jo-pg-filters-open .jo-pg-toggle::after {
	margin-top: -2px;
	transform: rotate(-135deg);
}

.jo-pg-filter__list {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 1000;
	min-width: 100%;
	max-height: 340px;
	overflow-y: auto;
	padding: 8px;
	border: 1px solid var(--jopg-border);
	border-radius: 10px;
	background-color: var(--jopg-bg);
	box-shadow: 0 10px 30px color-mix(in srgb, var(--jopg-primary) 10%, transparent);
}

.jo-pg-filter__option {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 8px 12px;
	border-radius: 6px;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s;
}

.jo-pg-filter__option:hover { background-color: var(--jopg-surface); }

.jo-pg-filter__option input {
	flex: none;
	width: 16px;
	height: 16px;
	margin: 0;
	accent-color: var(--jopg-primary);
	cursor: pointer;
}

.jo-pg-filter__option:has(input:checked) .jo-pg-filter__name {
	color: var(--jopg-primary);
	font-weight: 500;
}

.jo-pg-filter__count {
	margin-left: auto;
	padding-left: 12px;
	color: color-mix(in srgb, var(--jopg-text) 70%, transparent);
	font-size: 0.875em;
}

.jo-pg-filter__list[hidden],
.jo-pg-filter__option[hidden],
.jo-pg-reset[hidden],
.jo-pg-toggle__count[hidden],
.jo-pg-status[hidden] { display: none; }

/* Filter as buttons (setting "Display: Buttons"): every option is a button, one choice at a time.
 * Colors: base design (surface / text, active primary / text on primary); the Elementor widget can
 * override them per placement. */
.jo-pg-filter--buttons .jo-pg-filter__list {
	position: static;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	max-height: none;
	overflow: visible;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
}

.jo-pg-filter--buttons .jo-pg-filter__pill,
.jo-pg-filter--buttons button.jo-pg-filter__pill:is(:hover, :focus, :active) {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0;
	margin: 0;
	padding: 10px 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	background-color: var(--jopg-surface);
	color: var(--jopg-text);
	font: inherit;
	line-height: 1.3;
	text-transform: none;
	letter-spacing: normal;
	white-space: nowrap;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.jo-pg-filter--buttons .jo-pg-filter__pill:hover,
.jo-pg-filter--buttons button.jo-pg-filter__pill:hover {
	border-color: var(--jopg-primary);
	background-color: var(--jopg-surface);
	color: var(--jopg-primary);
}

.jo-pg-filter--buttons .jo-pg-filter__pill.is-on,
.jo-pg-filter--buttons button.jo-pg-filter__pill.is-on,
.jo-pg-filter--buttons button.jo-pg-filter__pill.is-on:is(:hover, :focus, :active) {
	border-color: var(--jopg-primary);
	background-color: var(--jopg-primary);
	color: var(--jo-product-grid-text-on-primary);
}

/* The checkbox stays for keyboard and screen readers, but is not shown. */
.jo-pg-filter--buttons .jo-pg-filter__option input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.jo-pg-filter--buttons .jo-pg-filter__pill:has(input:focus-visible),
.jo-pg-filter--buttons button.jo-pg-filter__pill:focus-visible {
	outline: 2px solid var(--jopg-primary);
	outline-offset: 2px;
}

.jo-pg-filter--buttons .jo-pg-filter__option:has(input:checked) .jo-pg-filter__name {
	color: inherit;
	font-weight: inherit;
}

.jo-pg-filter--buttons .jo-pg-filter__count { display: none; }

/* Search */
.jo-pg-search { position: relative; }

.jo-pg-search input.jo-pg-search__field {
	width: 100%;
	height: auto;
	margin: 0;
	padding: 12px 20px 12px 46px;
	border: 1px solid var(--jopg-border);
	border-radius: 10px;
	background-color: var(--jopg-bg);
	color: var(--jopg-text);
	font-family: var(--jo-product-grid-font-body);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	box-shadow: none;
	transition: border-color 0.2s;
}

.jo-pg-search input.jo-pg-search__field:hover,
.jo-pg-search input.jo-pg-search__field:focus {
	border-color: var(--jopg-secondary);
	outline: none;
}

.jo-pg-search input.jo-pg-search__field:focus-visible {
	outline: 2px solid var(--jopg-primary);
	outline-offset: 2px;
}

.jo-pg-search.is-active input.jo-pg-search__field {
	border-color: var(--jopg-primary);
	color: var(--jopg-primary);
	font-weight: 500;
}

.jo-pg-search input.jo-pg-search__field::placeholder {
	color: var(--jopg-text);
	opacity: 1;
}

.jo-pg-search::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 20px;
	width: 12px;
	height: 12px;
	margin-top: -8px;
	border: 1.5px solid var(--jopg-primary);
	border-radius: 50%;
	pointer-events: none;
}

.jo-pg-search::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 30px;
	width: 6px;
	height: 1.5px;
	margin-top: 4px;
	background-color: var(--jopg-primary);
	transform: rotate(45deg);
	pointer-events: none;
}

/* Status line with result count and chips */
.jo-pg-status {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 20px;
	margin: 0 0 20px;
}

.jo-pg-status__count {
	margin: 0;
	color: var(--jopg-primary);
	font-family: var(--jo-product-grid-font-body);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
}

.jo-pg-status__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.jo-pg-status__chips:empty { display: none; }

.jo-pg-status button.jo-pg-chip,
.jo-pg-status button.jo-pg-chip:is(:hover, :focus, :active) {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 6px 12px 6px 14px;
	border: 0;
	border-radius: 50px;
	background-color: var(--jopg-surface);
	color: var(--jopg-primary);
	font-family: var(--jo-product-grid-font-body);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.15s;
}

.jo-pg-status button.jo-pg-chip:hover { background-color: var(--jopg-secondary); }

.jo-pg-status button.jo-pg-chip:focus-visible {
	outline: 2px solid var(--jopg-primary);
	outline-offset: 2px;
}

.jo-pg-chip::after {
	content: "×";
	font-size: 1.2em;
	line-height: 1;
}

/* Mobile toggle for the filters */
.elementor-widget button.jo-pg-toggle,
.elementor-widget button.jo-pg-toggle:is(:hover, :focus, :active),
button.jo-pg-toggle {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	margin: 0;
	padding: 12px 44px 12px 20px;
	border: 1px solid var(--jopg-border);
	border-radius: 10px;
	background-color: var(--jopg-bg);
	color: var(--jopg-primary);
	font-family: var(--jo-product-grid-font-body);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
	text-align: left;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
}

button.jo-pg-toggle.is-active { border-color: var(--jopg-primary); }

button.jo-pg-toggle:focus-visible {
	outline: 2px solid var(--jopg-primary);
	outline-offset: 2px;
}

@media (max-width: 767px) {
	.e-con:has(> .elementor-widget .jo-pg-toggle):not(.jo-pg-filters-open) > .elementor-widget:has(.jo-pg-filter, .jo-pg-reset) { display: none; }
}

/* Empty state */
.jo-pg-grid .jo-pg-empty {
	margin: 0;
	padding: 40px 20px;
	border-radius: 10px;
	background-color: var(--jopg-surface);
	text-align: center;
}

.jo-pg-grid .jo-pg-empty .jo-pg-empty__title {
	margin: 0 0 5px;
	color: var(--jopg-primary);
	font-family: var(--jo-product-grid-font-headings);
	font-size: 18px;
	font-weight: var(--jo-product-grid-weight-headings);
	line-height: 1.2;
}

.jo-pg-grid .jo-pg-empty .jo-pg-empty__text { margin: 0; }

.jo-pg-grid .jo-pg-empty .jo-pg-empty__button { margin-top: 20px; }

/* ===== Bottom bar ===== */
.jo-pg-bar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99;
	display: none;
	background-color: var(--jopg-surface);
}

.jo-pg-bar.is-visible { display: block; }

.jo-pg-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	max-width: 1440px;
	margin: 0 auto;
	padding: 15px 40px;
}

.jo-pg-bar__info {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
}

.jo-pg-bar__count {
	margin: 0;
	color: var(--jopg-primary);
	font-family: var(--jo-product-grid-font-body);
	font-size: 16px;
	line-height: 1.75;
}

.jo-pg-bar.is-hint .jo-pg-bar__count {
	color: var(--jo-product-grid-color-secondary-hover);
	animation: jo-pg-hint 0.45s ease-in-out 2;
}

@keyframes jo-pg-hint {
	50% { transform: scale(1.06); }
}

.jo-pg-bar__thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.jo-pg-bar__thumb {
	position: relative;
	width: 44px;
	height: 44px;
}

.jo-pg-bar__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 5px;
}

.jo-pg-bar button.jo-pg-bar__remove,
.jo-pg-bar button.jo-pg-bar__remove:is(:hover, :focus, :active) {
	position: absolute;
	top: -6px;
	right: -6px;
	width: 20px;
	height: 20px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--jopg-primary);
	color: var(--jo-product-grid-text-on-primary);
	font-size: 12px;
	line-height: 20px;
	text-align: center;
	cursor: pointer;
}

.jo-pg-bar button.jo-pg-bar__remove:focus-visible {
	outline: 2px solid var(--jopg-primary);
	outline-offset: 2px;
}

.jo-pg-bar a.jo-pg-bar__button,
.jo-pg-bar a.jo-pg-bar__button:visited {
	flex: none;
	display: inline-flex;
	align-items: center;
	padding: 12px 24px;
	border: 1px solid var(--jopg-accent);
	border-radius: var(--jopg-radius);
	background-color: var(--jopg-accent);
	color: var(--jo-product-grid-text-on-accent);
	font-family: var(--jo-product-grid-font-body);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s, border-color 0.15s;
}

.jo-pg-bar a.jo-pg-bar__button:hover,
.jo-pg-bar a.jo-pg-bar__button:focus {
	border-color: var(--jo-product-grid-color-accent-hover);
	background-color: var(--jo-product-grid-color-accent-hover);
	color: var(--jo-product-grid-text-on-accent);
}

.jo-pg-bar a.jo-pg-bar__button:focus-visible {
	outline: 2px solid var(--jopg-primary);
	outline-offset: 2px;
}

@media (max-width: 1024px) {
	.jo-pg-bar__inner { padding: 15px 20px; }
}

@media (max-width: 767px) {
	.jo-pg-bar__inner {
		flex-wrap: wrap;
		gap: 10px;
		padding: 12px 20px;
	}
}

/* ===== Product product page: the main button ===== */
form.cart .single_add_to_cart_button.is-selected {
	border-color: var(--jo-product-grid-color-secondary) !important;
	background-color: var(--jo-product-grid-color-secondary) !important;
}

form.cart .single_add_to_cart_button.is-selected:hover {
	border-color: var(--jo-product-grid-color-secondary-hover) !important;
	background-color: var(--jo-product-grid-color-secondary-hover) !important;
}

form.cart .single_add_to_cart_button .jo-pg-check {
	width: 0.9em;
	height: 0.9em;
	margin-left: 8px;
	fill: currentColor;
	vertical-align: -0.08em;
}

form.cart .single_add_to_cart_button.is-locked {
	opacity: 0.45;
	cursor: not-allowed;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
	.jo-pg-card__photo img,
	.jo-pg-bar.is-hint .jo-pg-bar__count { animation: none; }

	.jo-pg-pick,
	.jo-pg-filter button.jo-pg-filter__button,
	.jo-pg-filter .jo-pg-filter__button::after,
	.jo-pg-toggle::after,
	.jo-pg-filter__option,
	.jo-pg-search input.jo-pg-search__field,
	.jo-pg-status button.jo-pg-chip { transition: none; }
}

/* Shared filter link: cards stay hidden until filters.js has applied the filters (no flash of all products).
   Revealed after 3 s anyway, in case the script does not run. */
.jo-pg-grid.is-pending .jo-pg-cards {
	visibility: hidden;
	animation: jo-pg-reveal 0s 3s forwards;
}

@keyframes jo-pg-reveal {
	to {
		visibility: visible;
	}
}

/* Filter toggle: only on small screens. Elsewhere the filters are always visible. */
@media (min-width: 768px) {
	.elementor-widget button.jo-pg-toggle,
	button.jo-pg-toggle {
		display: none;
	}
}

/* Small screens: filters inside the toggle's row stay hidden until the toggle opens them (also without Elementor). */
@media (max-width: 767px) {
	.jo-pg-toggle-scope:not(.jo-pg-filters-open) .jo-pg-filter,
	.jo-pg-toggle-scope:not(.jo-pg-filters-open) .jo-pg-reset:not(.jo-pg-empty__button) {
		display: none;
	}
}

/* Small screens: product name slightly smaller (18px with 15px text, as on the original site). */
@media (max-width: 767px) {
	.jo-pg-card__name { font-size: 1.2em; }
}


/* ===== Short product view in a pop-up (setting "Click on the photo" = pop-up, 1.11.0; layout 1.11.1) =====
 * A <dialog>: on screens from 768 px a box of at most 960 px with the photo left and the text right
 * (the text column scrolls), on phones full width from the bottom. Colors and fonts only from the
 * design variables. */
html.jo-pg-quickview-open { overflow: hidden; }

/* Photo of a card as a button (pop-up without link to the product page): no button look. */
.jo-pg-grid button.jo-pg-card__photo--button,
.jo-pg-grid button.jo-pg-card__photo--button:is(:hover, :focus, :active) {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: inherit;
	box-shadow: none;
	cursor: pointer;
}

.jo-pg-grid button.jo-pg-card__photo--button:focus-visible {
	outline: 2px solid var(--jopg-primary);
	outline-offset: 2px;
}

.jo-pg-quickview {
	width: min(960px, calc(100vw - 48px));
	max-width: none;
	max-height: 90vh;
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: var(--jopg-radius);
	background-color: var(--jopg-bg);
	color: var(--jopg-text);
	font-family: var(--jo-product-grid-font-body);
	box-shadow: 0 24px 70px color-mix(in srgb, var(--jopg-primary) 28%, transparent);
}

.jo-pg-quickview::backdrop {
	background-color: color-mix(in srgb, var(--jopg-primary) 55%, transparent);
}

.jo-pg-quickview[open] { animation: jo-pg-quickview-in 0.25s ease-out; }

@keyframes jo-pg-quickview-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

/* Close button: round, top right, 44 px touch area. */
.jo-pg-quickview button.jo-pg-quickview__close,
.jo-pg-quickview button.jo-pg-quickview__close:is(:hover, :focus, :active) {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--jopg-border);
	border-radius: 50%;
	background-color: var(--jopg-bg);
	color: var(--jopg-primary);
	font: inherit;
	font-size: 26px;
	line-height: 1;
	box-shadow: 0 2px 8px color-mix(in srgb, var(--jopg-primary) 12%, transparent);
	cursor: pointer;
	transition: background-color 0.2s;
}

.jo-pg-quickview button.jo-pg-quickview__close:hover { background-color: var(--jopg-surface); }

.jo-pg-quickview button.jo-pg-quickview__close:focus-visible {
	outline: 2px solid var(--jopg-primary);
	outline-offset: 2px;
}

.jo-pg-quickview__content { height: 100%; }

.jo-pg-quickview__body {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	max-height: 90vh;
}

/* Photo at its own size (never enlarged, so small swatch photos stay sharp), centered in the column,
 * without a fill behind it (1.11.3). */
.jo-pg-quickview__photo {
	display: flex;
	align-self: start;
	justify-content: center;
	padding: 28px 0 28px 28px;
}

.jo-pg-quickview__photo img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	border-radius: var(--jopg-radius);
}

/* Grid setting "Photo in the pop-up" = "Fill the column" (1.11.3): as wide as the column. */
.jo-pg-quickview--fill .jo-pg-quickview__photo img { width: 100%; }

.jo-pg-quickview__info {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	max-height: 90vh;
	overflow-y: auto;
	padding: 44px 36px 32px;
	overscroll-behavior: contain;
}

.jo-pg-quickview__group {
	margin: 0;
	padding-right: 48px;
	color: color-mix(in srgb, var(--jopg-text) 75%, transparent);
	font-size: 0.8125em;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.jo-pg-quickview__group:empty { display: none; }

.jo-pg-quickview .jo-pg-quickview__title {
	margin: 0;
	padding-right: 48px;
	color: var(--jopg-primary);
	font-family: var(--jo-product-grid-font-headings);
	font-size: 1.6em;
	font-weight: var(--jo-product-grid-weight-headings);
	line-height: 1.2;
}

.jo-pg-quickview__detail {
	margin: -4px 0 4px;
	font-size: 1em;
}

.jo-pg-quickview__detail:empty { display: none; }

.jo-pg-quickview__more {
	max-width: 62ch;
	font-size: 0.9em;
	line-height: 1.6;
}

.jo-pg-quickview__text > :first-child,
.jo-pg-quickview__details > :first-child { margin-top: 0; }

.jo-pg-quickview__text > :last-child,
.jo-pg-quickview__details > :last-child { margin-bottom: 0; }

.jo-pg-quickview__text + .jo-pg-quickview__details { margin-top: 16px; }

/* Lists in the details (for example features): check marks instead of bullets. */
.jo-pg-quickview__details ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.jo-pg-quickview__details ul li {
	position: relative;
	margin: 0 0 8px;
	padding-left: 28px;
}

.jo-pg-quickview__details ul li::before {
	content: "";
	position: absolute;
	top: 0.35em;
	left: 0;
	width: 16px;
	height: 16px;
	background-color: var(--jopg-accent);
	-webkit-mask: var(--jopg-icon-check) center / contain no-repeat;
	mask: var(--jopg-icon-check) center / contain no-repeat;
}

/* Loading the description: a calm placeholder in the text column. */
.jo-pg-quickview__loading {
	position: relative;
	margin: 0;
	padding-top: 52px;
	color: color-mix(in srgb, var(--jopg-text) 70%, transparent);
	font-size: 0.875em;
}

.jo-pg-quickview__loading::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 40px;
	border-radius: var(--jopg-radius);
	background: linear-gradient(var(--jopg-surface) 0 12px, transparent 12px 20px, var(--jopg-surface) 20px 32px, transparent 32px) top left / 85% 100% no-repeat;
	animation: jo-pg-pulse 1.8s ease-in-out infinite;
}

.jo-pg-quickview__message { margin: 0; }

.jo-pg-quickview a.jo-pg-quickview__link {
	align-self: flex-start;
	margin-top: 4px;
	color: var(--jopg-primary);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.jo-pg-quickview .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Choose button in the pop-up: always visible, full width, primary color. */
.jo-pg-quickview .jo-pg-card { display: block; margin: 8px 0 0; }

.jo-pg-quickview .jo-pg-card button.jo-pg-pick,
.jo-pg-quickview .jo-pg-card button.jo-pg-pick:is(:hover, :focus, :active) {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0 24px;
	border: 0;
	border-radius: var(--jopg-radius);
	background-color: var(--jopg-primary);
	color: var(--jo-product-grid-text-on-primary);
	font-family: var(--jo-product-grid-font-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 20px;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	opacity: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.jo-pg-quickview .jo-pg-card button.jo-pg-pick:hover { background-color: var(--jo-product-grid-color-primary-hover, var(--jopg-primary)); }

.jo-pg-quickview .jo-pg-pick > span::before {
	width: 14px;
	height: 14px;
}

.jo-pg-quickview .jo-pg-card.is-selected button.jo-pg-pick,
.jo-pg-quickview .jo-pg-card.is-selected button.jo-pg-pick:hover {
	background-color: var(--jopg-secondary);
	color: var(--jopg-primary);
}

.jo-pg-quickview .jo-pg-card.is-locked button.jo-pg-pick {
	opacity: 0.45;
	cursor: not-allowed;
}

.jo-pg-quickview .jo-pg-card button.jo-pg-pick:focus-visible {
	outline: 2px solid var(--jopg-primary);
	outline-offset: 3px;
}

/* Explanation at the maximum, only while the button is locked. */
.jo-pg-quickview__limit {
	display: none;
	margin: 0;
	font-size: 0.875em;
}

.jo-pg-quickview__pick.is-locked + .jo-pg-quickview__limit { display: block; }

/* Compact layout (grid setting "Photo in the pop-up" = "Compact", default since 1.12.0): a narrow
 * pop-up in one column. Head row: small square photo, next to it group, title, second line and the
 * choose button. Below: the details as labels side by side, then the description. */
.jo-pg-quickview.jo-pg-quickview--compact { width: min(560px, calc(100vw - 48px)); }

.jo-pg-quickview--compact .jo-pg-quickview__body { display: block; }

.jo-pg-quickview--compact .jo-pg-quickview__info {
	gap: 20px;
	padding: 28px;
}

.jo-pg-quickview__head {
	display: grid;
	grid-template-columns: 132px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

.jo-pg-quickview__top {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.jo-pg-quickview--compact .jo-pg-quickview__photo { display: block; padding: 0; }

.jo-pg-quickview--compact .jo-pg-quickview__photo img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.jo-pg-quickview--compact .jo-pg-quickview__group,
.jo-pg-quickview--compact .jo-pg-quickview__title { padding-right: 44px; }

.jo-pg-quickview--compact .jo-pg-quickview__title { font-size: 1.4em; }

.jo-pg-quickview--compact .jo-pg-quickview__detail { margin: 0 0 4px; }

.jo-pg-quickview--compact .jo-pg-card { margin-top: 6px; }

.jo-pg-quickview--compact .jo-pg-quickview__more { max-width: none; }

.jo-pg-quickview__details + .jo-pg-quickview__text { margin-top: 16px; }

/* Details as labels: one row that wraps, check mark inside each label. */
.jo-pg-quickview--compact .jo-pg-quickview__details ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.jo-pg-quickview--compact .jo-pg-quickview__details ul li {
	margin: 0;
	padding: 6px 12px 6px 32px;
	border-radius: 999px;
	background-color: var(--jopg-surface);
	font-size: 0.9em;
	line-height: 1.4;
}

.jo-pg-quickview--compact .jo-pg-quickview__details ul li::before {
	top: 50%;
	left: 12px;
	width: 14px;
	height: 14px;
	transform: translateY(-50%);
}

/* Phones: full width, sliding up from the bottom, photo above the text, one scroll area. */
@media (max-width: 767px) {
	.jo-pg-quickview {
		width: 100vw;
		max-height: 92vh;
		margin: auto 0 0;
		overflow-y: auto;
		border-radius: var(--jopg-radius) var(--jopg-radius) 0 0;
	}

	.jo-pg-quickview[open] { animation-name: jo-pg-quickview-up; }

	.jo-pg-quickview button.jo-pg-quickview__close { position: sticky; float: right; margin: 12px 12px -56px 0; top: 12px; right: auto; }

	.jo-pg-quickview__body {
		grid-template-columns: 1fr;
		max-height: none;
	}

	.jo-pg-quickview__photo { padding: 20px 20px 0; }

	.jo-pg-quickview__info {
		max-height: none;
		overflow: visible;
		padding: 16px 20px 24px;
	}

	.jo-pg-quickview .jo-pg-quickview__title { font-size: 1.35em; }

	.jo-pg-quickview.jo-pg-quickview--compact { width: 100vw; }

	.jo-pg-quickview--compact .jo-pg-quickview__info { padding: 20px 20px 24px; }

	.jo-pg-quickview__head {
		grid-template-columns: 96px minmax(0, 1fr);
		gap: 16px;
	}

	.jo-pg-quickview--compact .jo-pg-quickview__title { font-size: 1.25em; }
}

@keyframes jo-pg-quickview-up {
	from { transform: translateY(100%); }
	to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.jo-pg-quickview[open] { animation: none; }
	.jo-pg-quickview__loading::before { animation: none; }
}
