/* PX Category Toggle: segmented switch, photo cards, or chips in a bar with Filtrer. */
.pxct {
	--pxct-h: 44px;
	--pxct-r: 8px;
	--pxct-gap: 8px;
	--pxct-on-bg: #161519;
	--pxct-on-fg: #fff;
	--pxct-track: #F2F1F3;
	--pxct-chip-on: #FFE7E2;
	--pxct-chip-line: #FF8873;
	--pxct-line: #D8D8D8;
	--pxct-ink: #161519;
	--pxct-muted: #6B6870;
	--pxct-card-h: 76px;
	--pxct-align: stretch;
	--pxct-top: 0px;
	display: block;
	width: 100%;
	color: var(--pxct-ink);
}
.pxct a { text-decoration: none !important; color: inherit; -webkit-tap-highlight-color: transparent; }
.pxct-in { display: flex; flex-direction: column; gap: 10px; }
.pxct .pxct-n { font-size: .78em; color: var(--pxct-muted); font-weight: 400; }
.pxct .is-empty { opacity: .45; }
.pxct-ck { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* A. segmented switch */
.pxct-track {
	display: flex;
	gap: 4px;
	padding: 4px;
	background: var(--pxct-track);
	border-radius: calc(var(--pxct-r) + 2px);
	align-self: var(--pxct-align);
}
.pxct-opt {
	flex: 1 1 0;
	min-width: 0;
	min-height: calc(var(--pxct-h) - 4px);
	padding: 0 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border-radius: var(--pxct-r);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.1;
	white-space: nowrap;
	transition: background-color .2s ease, color .2s ease;
}
.pxct-opt.is-on { background: var(--pxct-on-bg); color: var(--pxct-on-fg); }
.pxct-opt.is-on .pxct-n { color: inherit; opacity: .75; }
.pxct-opt:not(.is-on):hover { background: rgb(0 0 0 / .05); }

/* B. photo cards */
.pxct-cards {
	display: grid;
	/* fixed count per row (setting), each card at least --pxct-card-w wide so a narrow container cannot squash them */
	grid-template-columns: repeat(var(--pxct-cols, 2), minmax(min(var(--pxct-card-w, 160px), 100%), 1fr));
	gap: var(--pxct-gap);
	align-self: var(--pxct-align);
}
/* picture on the left (default) or on top: the "Picture position" setting sets these variables per device */
.pxct-card {
	position: relative;
	display: flex;
	flex-direction: var(--pxct-dir, row);
	align-items: var(--pxct-ai, center);
	gap: var(--pxct-cg, 10px);
	height: var(--pxct-cardh, var(--pxct-card-h));
	padding-right: var(--pxct-pr, 12px);
	border: 1px solid var(--pxct-line);
	border-radius: var(--pxct-r);
	background: #fff;
	/* no overflow: hidden here: it would clip the chosen ring; the picture rounds its own corners instead */
}
.pxct-card:focus { outline: none; }
.pxct-card:focus-visible { outline: 2px solid var(--pxct-on-bg); outline-offset: 3px; }
.pxct-card .pxct-img { width: var(--pxct-iw, calc(var(--pxct-card-h) * .85)); height: var(--pxct-ih, 100%); aspect-ratio: var(--pxct-ar, 1 / 1); flex: none; object-fit: cover; object-position: center 22%; display: block; margin: 0; max-width: none; border-radius: var(--pxct-imr, calc(var(--pxct-r) - 1px) 0 0 calc(var(--pxct-r) - 1px)); }
.pxct-img--none { background: var(--pxct-track); }
.pxct-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; padding: var(--pxct-tp, 0); text-align: var(--pxct-ta, left); align-items: var(--pxct-tai, flex-start); }
.pxct-txt > span { max-width: 100%; }
.pxct-card .pxct-l { font-family: var(--wd-title-font, inherit); font-size: 17px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pxct-sub { font-size: 12px; color: var(--pxct-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* picture left: the check has its own place at the end of the row (kept when hidden), so it never covers the label;
   picture on top: it sits on the photo's corner */
.pxct-card .pxct-ck {
	position: var(--pxct-ckp, static);
	top: 8px;
	right: 8px;
	z-index: 1;
	align-self: flex-start;
	margin: var(--pxct-ckm, 8px -4px 0 auto);
	width: 20px;
	height: 20px;
	padding: 4px;
	border-radius: 50%;
	background: var(--pxct-on-bg);
	color: #fff;
	stroke-width: 3;
	opacity: 0;
	transform: scale(.6);
	transition: opacity .2s ease, transform .2s ease;
}
/* chosen: dark border + 1px ring outside it = an even 2px edge that the picture cannot cover, without moving anything */
.pxct-card.is-on { border-color: var(--pxct-on-bg); box-shadow: 0 0 0 1px var(--pxct-on-bg); }
.pxct-card.is-on .pxct-ck { opacity: 1; transform: none; }
.pxct-all { align-self: flex-start; font-size: 13px; text-decoration: underline !important; text-underline-offset: 3px; min-height: 32px; display: inline-flex; align-items: center; }

/* C. chips in a bar */
.pxct--chips .pxct-in { flex-direction: row; align-items: center; gap: var(--pxct-gap); justify-content: var(--pxct-align); }
.pxct-chips {
	display: flex;
	gap: var(--pxct-gap);
	overflow-x: auto;
	scrollbar-width: none;
	min-width: 0;
	flex: 0 1 auto;
}
.pxct-chips::-webkit-scrollbar { display: none; }
.pxct-chip {
	flex: none;
	min-height: var(--pxct-h);
	padding: 0 14px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid var(--pxct-line);
	border-radius: calc(var(--pxct-h) / 2);
	background: #fff;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	transition: background-color .2s ease, border-color .2s ease;
}
.pxct-chip.is-on { background: var(--pxct-chip-on); border-color: var(--pxct-chip-line); box-shadow: inset 0 0 0 .5px var(--pxct-chip-line); }
.pxct .pxct-filter {
	flex: none;
	min-height: var(--pxct-h);
	padding: 0 14px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 0;
	border-radius: var(--pxct-r);
	background: var(--pxct-on-bg);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .5px;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: none;
}
.pxct .pxct-filter:hover, .pxct .pxct-filter:focus { background: var(--pxct-on-bg); color: #fff; }
.pxct-filter svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.pxct-sep { flex: none; width: 1px; height: 24px; background: var(--pxct-line); }
/* the bar has its own Filtrer button: hide the theme's one */
body:has(.pxct-own-filter) .elementor-widget-wd_builder_off_canvas_column_btn,
body:has(.pxct-own-filter) .e-con:has(> .elementor-widget-wd_builder_off_canvas_column_btn):not(:has(> :not(.elementor-widget-wd_builder_off_canvas_column_btn))) { display: none !important; }

/* pinned while scrolling */
.pxct.is-stuck {
	position: fixed;
	top: var(--pxct-top);
	left: 0;
	right: 0;
	z-index: 350;
	padding: 8px 16px;
	background: #fff;
	box-shadow: 0 1px 0 rgb(0 0 0 / .08), 0 6px 16px -10px rgb(0 0 0 / .25);
	animation: pxct-in .2s ease;
}
.admin-bar .pxct.is-stuck { top: calc(var(--pxct-top) + var(--wp-admin--admin-bar--height, 0px)); }
@keyframes pxct-in { from { transform: translateY(-100%); } to { transform: none; } }
.pxct-ph { display: block; }

/* while the next page loads */
body.pxct-loading .wd-products, body.pxct-loading .products { opacity: .45; transition: opacity .2s ease; pointer-events: none; }

.pxct-empty { padding: 14px; border: 1px dashed var(--pxct-line, #D8D8D8); font-size: 13px; color: #6B6870; }

@media (prefers-reduced-motion: reduce) {
	.pxct *, .pxct.is-stuck { transition: none !important; animation: none !important; }
}
