/*
 * Products Hub — frontend styles (v1.9.0).
 *
 * One consolidated stylesheet replacing the 1.3.x–1.8.x patch layers.
 * Every rule is scoped to Products Hub markup (.sls-pm-*). Plugin markup no
 * longer carries generic theme loop classes, so theme rules cannot reach it, and the
 * stylesheet does not need !important to defend itself.
 *
 * Site-specific values come from CSS custom properties printed by
 * sls_pm_print_design_css() (accent, buttons, container width).
 * Gallery and image viewer styles live in gallery.css.
 */

/* ---------------------------------------------------------------------------
 * 1. Tokens
 * ------------------------------------------------------------------------ */
/* Namespaced custom properties on :root, so shortcode/widget output that is
 * not inside a plugin wrapper gets the same design. They do not affect themes. */
:root {
	--sls-pm-text: #1f1f1f;
	--sls-pm-muted: #6b6b6b;
	--sls-pm-border: #e6e2dc;
	--sls-pm-surface: #ffffff;
	--sls-pm-well: #f6f3ef;
	--sls-pm-radius: 18px;
	--sls-pm-radius-sm: 10px;
	--sls-pm-gap: clamp(14px, 1.8vw, 24px);
	--sls-pm-card-min: 240px;
	--sls-pm-focus: var(--sls-pm-accent, #2563eb);
	/* Card/related titles: theme font by default; Settings → Catalog can choose serif. */
	--sls-pm-title-font: var(--sls-pm-card-title-font, inherit);
}

/* ---------------------------------------------------------------------------
 * 2. Containers
 * ------------------------------------------------------------------------ */
.sls-pm-main {
	display: block;
	padding-block: clamp(1.25rem, 3vw, 2.5rem) clamp(2rem, 4vw, 3.5rem);
}

/* The catalog fills its parent up to the configured width. It never breaks
 * out of the theme's content column (1.7.9 centered it on the viewport, which
 * pushed it under theme sidebars). */
.sls-pm-wrap {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--sls-pm-container-width, 1280px);
	margin-inline: auto;
	padding-inline: clamp(12px, 2vw, 16px);
	color: var(--sls-pm-text);
	overflow-wrap: break-word;
}

.sls-pm-block {
	box-sizing: border-box;
	width: 100%;
	color: var(--sls-pm-text);
}

:is(.sls-pm-wrap, .sls-pm-block, .sls-pm-grid, .sls-pm-embed, .sls-pm-modal, .sls-pm-gallery),
:is(.sls-pm-wrap, .sls-pm-block, .sls-pm-grid, .sls-pm-embed, .sls-pm-modal, .sls-pm-gallery) *,
:is(.sls-pm-wrap, .sls-pm-block, .sls-pm-grid, .sls-pm-embed, .sls-pm-modal, .sls-pm-gallery) *::before,
:is(.sls-pm-wrap, .sls-pm-block, .sls-pm-grid, .sls-pm-embed, .sls-pm-modal, .sls-pm-gallery) *::after {
	box-sizing: border-box;
}

.sls-pm-wrap img,
.sls-pm-block img {
	box-shadow: none;
}

.sls-pm-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------------------
 * 3. Breadcrumbs, headings
 * ------------------------------------------------------------------------ */
.sls-pm-breadcrumbs {
	margin: 0 0 1.1rem;
	color: var(--sls-pm-muted);
	font-size: 0.9rem;
	line-height: 1.5;
}

.sls-pm-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sls-pm-breadcrumbs li {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sls-pm-breadcrumbs li::marker {
	content: none;
}

.sls-pm-breadcrumbs li + li::before {
	content: "/";
	margin: 0 10px;
	color: #b5b0aa;
}

.sls-pm-breadcrumbs a {
	color: var(--sls-pm-text);
	text-decoration: none;
}

.sls-pm-breadcrumbs a:hover,
.sls-pm-breadcrumbs a:focus-visible {
	color: var(--sls-pm-accent, #2563eb);
}

.sls-pm-archive-header {
	margin: 0 0 clamp(1rem, 2.5vw, 1.75rem);
}

.sls-pm-archive-title,
.sls-pm-single .sls-pm-title {
	margin: 0 0 0.5rem;
	padding: 0;
	color: var(--sls-pm-text);
	font-size: clamp(1.75rem, 3.2vw, 2.6rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	word-break: normal;
	overflow-wrap: break-word;
	hyphens: manual;
}

.sls-pm-term-description {
	max-width: 70ch;
	color: var(--sls-pm-muted);
	line-height: 1.6;
}

.sls-pm-category-image img {
	display: block;
	width: 100%;
	max-height: 360px;
	margin: 0 0 1.25rem;
	border-radius: var(--sls-pm-radius);
	object-fit: cover;
}

/* ---------------------------------------------------------------------------
 * 4. Product grid
 *
 * --sls-pm-cols (inline, from settings) is a MAXIMUM. auto-fill drops columns
 * whenever a cell would be narrower than --sls-pm-card-min, based on the
 * grid's real width — a theme sidebar or a narrow content column therefore
 * reduces columns instead of squeezing cards until titles break per letter.
 * ------------------------------------------------------------------------ */
.sls-pm-grid {
	--_cols: var(--sls-pm-cols, 4);
	--_min: var(--sls-pm-card-min, 240px);
	display: grid;
	grid-template-columns: repeat(
		auto-fill,
		minmax(max(min(100%, var(--_min)), calc((100% - (var(--_cols) - 1) * var(--sls-pm-gap, 20px)) / var(--_cols))), 1fr)
	);
	gap: var(--sls-pm-gap, 20px);
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
	float: none;
}

/* Theme clearfix pseudo-elements must never become grid items. */
.sls-pm-grid::before,
.sls-pm-grid::after {
	content: none;
	display: none;
}

@media (max-width: 960px) {
	.sls-pm-grid {
		--_cols: var(--sls-pm-cols-tablet, 2);
	}
}

@media (max-width: 560px) {
	.sls-pm-grid {
		--_cols: var(--sls-pm-cols-mobile, 1);
		--_min: 140px;
	}
}

/* ---------------------------------------------------------------------------
 * 5. Product card
 * ------------------------------------------------------------------------ */
.sls-pm-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	width: auto;
	max-width: none;
	height: 100%;
	margin: 0;
	padding: 0;
	float: none;
	background: var(--sls-pm-surface);
	border: 1px solid var(--sls-pm-border);
	border-radius: var(--sls-pm-radius);
	overflow: hidden;
	text-align: left;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sls-pm-card:hover {
	box-shadow: 0 12px 28px rgba(28, 28, 28, 0.08);
}

.sls-pm-card-inner {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	padding: 12px 12px 0;
}

.sls-pm-card-image-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

/* Uniform image well: fixed aspect ratio, image contained (never cropped or
 * stretched) and centered, whatever its own proportions. */
.sls-pm-card-media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0 0 14px;
	padding: 6%;
	background: var(--sls-pm-well);
	border-radius: calc(var(--sls-pm-radius) - 6px);
	overflow: hidden;
}

.sls-pm-card-media.is-portrait {
	aspect-ratio: 4 / 5;
}

.sls-pm-card-media.is-original {
	aspect-ratio: auto;
	min-height: 160px;
}

.sls-pm-card-media img,
.sls-pm-card .sls-pm-card-image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	object-fit: contain;
	object-position: center;
	float: none;
	transition: transform 0.35s ease;
}

.sls-pm-card-media.is-original img {
	height: auto;
}

.sls-pm-card:hover .sls-pm-card-media img {
	transform: scale(1.025);
}

.sls-pm-card-body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
	padding: 0 4px 14px;
}

.sls-pm-card-category {
	margin: 0 0 6px;
	padding: 0;
	color: var(--sls-pm-muted);
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.sls-pm-card .sls-pm-card-title {
	margin: 0;
	padding: 0;
	color: var(--sls-pm-text);
	font-family: var(--sls-pm-title-font);
	font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.25rem);
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	/* Wrap between words; break inside a word only if it cannot fit at all. */
	word-break: normal;
	overflow-wrap: break-word;
	hyphens: manual;
	white-space: normal;
}

.sls-pm-card .sls-pm-card-title a {
	color: inherit;
	text-decoration: none;
}

.sls-pm-card .sls-pm-card-title a:hover,
.sls-pm-card .sls-pm-card-title a:focus-visible {
	color: var(--sls-pm-accent, #2563eb);
}

.sls-pm-card .sls-pm-card-excerpt {
	display: -webkit-box;
	margin: 8px 0 0;
	overflow: hidden;
	color: var(--sls-pm-muted);
	font-size: 0.9rem;
	line-height: 1.5;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* CTA footer is pushed to the bottom, so buttons align across a row. */
.sls-pm-card .sls-pm-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: auto -12px 0;
	padding: 12px 14px 12px 16px;
	background: transparent;
	border: 0;
	border-top: 1px solid var(--sls-pm-border);
	border-radius: 0;
	color: var(--sls-pm-text);
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.sls-pm-card .sls-pm-card-footer:hover,
.sls-pm-card .sls-pm-card-footer:focus-visible {
	background: #faf9f7;
	color: var(--sls-pm-text);
}

.sls-pm-card-footer-label {
	min-width: 0;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.25;
}

.sls-pm-card-cta-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--sls-pm-btn-bg, var(--sls-pm-accent, #2563eb));
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.sls-pm-card-cta-icon::after {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	margin-left: -3px;
	border-top: 2px solid var(--sls-pm-btn-color, #fff);
	border-right: 2px solid var(--sls-pm-btn-color, #fff);
	transform: rotate(45deg);
}

.sls-pm-card-footer:hover .sls-pm-card-cta-icon {
	background: var(--sls-pm-btn-hover-bg, var(--sls-pm-accent-hover, #1d4ed8));
	transform: translateX(2px);
}

.sls-pm-card-footer:hover .sls-pm-card-cta-icon::after {
	border-color: var(--sls-pm-btn-hover-color, #fff);
}

.sls-pm-card .sls-pm-card-quickview {
	position: absolute;
	top: 22px;
	right: 22px;
	z-index: 2;
	width: auto;
	min-height: 0;
	margin: 0;
	padding: 6px 11px;
	background: rgba(255, 255, 255, 0.94);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	color: var(--sls-pm-text);
	font: inherit;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.2;
	text-transform: none;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.sls-pm-card:hover .sls-pm-card-quickview,
.sls-pm-card .sls-pm-card-quickview:focus-visible {
	opacity: 1;
}

@media (hover: none) {
	.sls-pm-card .sls-pm-card-quickview {
		display: none;
	}
}

/* Category cards */
.sls-pm-category-card .sls-pm-card-body {
	padding-bottom: 16px;
}

.sls-pm-count {
	margin: 6px 0 0;
	color: var(--sls-pm-muted);
	font-size: 0.88rem;
}

.sls-pm-child-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.88rem;
}

.sls-pm-child-list a {
	color: var(--sls-pm-text);
	text-decoration: none;
}

.sls-pm-child-list a:hover {
	color: var(--sls-pm-accent, #2563eb);
}

.sls-pm-archive-header .sls-pm-category-grid {
	margin-top: 1.25rem;
}

/* ---------------------------------------------------------------------------
 * 6. Buttons
 * ------------------------------------------------------------------------ */
.sls-pm-wrap .sls-pm-btn,
.sls-pm-block .sls-pm-btn,
.sls-pm-modal .sls-pm-btn,
.sls-pm-contact-details .sls-pm-contact-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	padding: var(--sls-pm-btn-padding-top, 12px) var(--sls-pm-btn-padding-right, 20px) var(--sls-pm-btn-padding-bottom, 12px) var(--sls-pm-btn-padding-left, 20px);
	background: var(--sls-pm-btn-bg, var(--sls-pm-accent, #2563eb));
	border: var(--sls-pm-btn-border-width, 0px) solid var(--sls-pm-btn-border-color, transparent);
	border-radius: var(--sls-pm-btn-radius, 30px);
	box-shadow: none;
	color: var(--sls-pm-btn-color, #fff);
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	white-space: normal;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sls-pm-wrap .sls-pm-btn:hover,
.sls-pm-wrap .sls-pm-btn:focus-visible,
.sls-pm-block .sls-pm-btn:hover,
.sls-pm-modal .sls-pm-btn:hover,
.sls-pm-contact-details .sls-pm-contact-button:hover {
	background: var(--sls-pm-btn-hover-bg, var(--sls-pm-accent-hover, #1d4ed8));
	color: var(--sls-pm-btn-hover-color, #fff);
}

.sls-pm-wrap .sls-pm-btn-availability,
.sls-pm-modal .sls-pm-btn-availability {
	background: var(--sls-pm-availability-bg, #fff);
	border: 1px solid currentColor;
	color: var(--sls-pm-availability-text, #1c1c1c);
}

.sls-pm-wrap .sls-pm-btn-outline,
.sls-pm-modal .sls-pm-btn-outline {
	background: transparent;
	border: 1px solid var(--sls-pm-border);
	color: var(--sls-pm-text);
}

.sls-pm-wrap .sls-pm-btn-availability:hover,
.sls-pm-wrap .sls-pm-btn-outline:hover,
.sls-pm-modal .sls-pm-btn-outline:hover,
.sls-pm-modal .sls-pm-btn-availability:hover {
	background: #f4f2ef;
	color: var(--sls-pm-text);
}

.sls-pm-wrap :is(a, button, input, select):focus-visible,
.sls-pm-block :is(a, button, input, select):focus-visible,
.sls-pm-modal :is(a, button):focus-visible {
	outline: 2px solid var(--sls-pm-focus);
	outline-offset: 2px;
}

.sls-pm-product-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
}

/* ---------------------------------------------------------------------------
 * 7. Catalog archive: sidebar + results
 *
 * Layout responds to the width of the catalog itself (container query), not
 * the viewport: the filter sidebar sits beside the grid only when there is
 * room for both; otherwise it becomes a slide-out drawer.
 * ------------------------------------------------------------------------ */
.sls-pm-archive {
	container: sls-pm-archive / inline-size;
}

.sls-pm-shop-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(18px, 2.4vw, 32px);
	align-items: start;
}

.sls-pm-shop-main {
	min-width: 0;
}

.sls-pm-shop-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	margin: 0 0 16px;
}

.sls-pm-result-count {
	margin: 0;
	color: var(--sls-pm-muted);
	font-size: 0.95rem;
	line-height: 1.4;
}

.sls-pm-sort {
	margin: 0;
	float: none;
}

.sls-pm-sort label {
	display: block;
	margin: 0;
}

.sls-pm-wrap .sls-pm-sort select {
	min-width: 170px;
	min-height: 42px;
	margin: 0;
	padding: 8px 38px 8px 14px;
	background: var(--sls-pm-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23333' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
	border: 1px solid var(--sls-pm-border);
	border-radius: 999px;
	color: var(--sls-pm-text);
	font: inherit;
	font-size: 0.95rem;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

/* Filter sidebar. Explicit position/size values also neutralize the browser's
 * default popover styles (the drawer uses the Popover API when available). */
.sls-pm-sidebar {
	display: block;
	position: relative;
	inset: auto;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	min-width: 0;
	padding: 20px 16px;
	background: var(--sls-pm-sidebar-background, #ffffff);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	backdrop-filter: blur(18px) saturate(140%);
	border: 1px solid var(--sls-pm-border);
	border-radius: var(--sls-pm-radius);
	box-shadow: 0 10px 32px rgba(23, 24, 29, 0.06);
	color: var(--sls-pm-text);
}


.sls-pm-sidebar-title {
	display: none;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	padding: 0;
	color: var(--sls-pm-text);
	font-family: inherit;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
}

.sls-pm-filter-icon {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
}

.sls-pm-mobile-filter-head,
.sls-pm-mobile-filter-toggle,
.sls-pm-mobile-filter-backdrop {
	display: none;
}

.sls-pm-sidebar-form {
	margin: 0;
}

.sls-pm-toolbar-row {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.sls-pm-field {
	display: block;
	min-width: 0;
	margin: 0;
}

.sls-pm-field > span,
.sls-pm-filter-label {
	display: block;
	margin: 0 0 8px;
	color: var(--sls-pm-text);
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.35;
}

.sls-pm-wrap .sls-pm-field input[type="search"] {
	width: 100%;
	min-height: 42px;
	margin: 0;
	padding: 9px 12px;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid var(--sls-pm-border);
	border-radius: var(--sls-pm-radius-sm);
	box-shadow: none;
	color: var(--sls-pm-text);
	font: inherit;
	font-size: 0.95rem;
}

.sls-pm-checks {
	display: flex;
	flex-direction: column;
	gap: 2px;
	max-height: 232px;
	margin: 0;
	padding: 0 6px 0 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.sls-pm-check {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 6px 6px;
	border-radius: 8px;
	color: var(--sls-pm-text);
	font-size: 0.92rem;
	font-weight: 400;
	line-height: 1.35;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.sls-pm-check:hover {
	background: rgba(0, 0, 0, 0.035);
}

.sls-pm-wrap .sls-pm-check input[type="checkbox"] {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	margin: 0;
	accent-color: var(--sls-pm-accent, #2563eb);
	cursor: pointer;
}

.sls-pm-check-name {
	flex: 1 1 auto;
	min-width: 0;
	overflow-wrap: anywhere;
}

.sls-pm-filter-count {
	flex: 0 0 auto;
	color: var(--sls-pm-muted);
	font-size: 0.8rem;
	font-variant-numeric: tabular-nums;
}

.sls-pm-toolbar-actions {
	margin-top: 18px;
	padding-top: 4px;
}

/* Thin filter scrollbars without arrow buttons.
 * Chrome/Edge 121+ ignore every ::-webkit-scrollbar rule on an element that
 * also sets scrollbar-width or scrollbar-color, and then draw the native
 * scrollbar with up/down arrows on Windows. So the standard properties are
 * used only where ::-webkit-scrollbar is not supported (Firefox). */
:is(.sls-pm-sidebar, .sls-pm-sidebar .sls-pm-toolbar-row, .sls-pm-checks, .sls-pm-short-description, .sls-pm-quickview-desc, .sls-pm-table-scroll)::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

:is(.sls-pm-sidebar, .sls-pm-sidebar .sls-pm-toolbar-row, .sls-pm-checks, .sls-pm-short-description, .sls-pm-quickview-desc, .sls-pm-table-scroll)::-webkit-scrollbar-track {
	background: rgba(148, 163, 184, 0.16);
	border-radius: 999px;
}

:is(.sls-pm-sidebar, .sls-pm-sidebar .sls-pm-toolbar-row, .sls-pm-checks, .sls-pm-short-description, .sls-pm-quickview-desc, .sls-pm-table-scroll)::-webkit-scrollbar-thumb {
	background: var(--sls-pm-sidebar-scrollbar, #94a3b8);
	border-radius: 999px;
}

:is(.sls-pm-sidebar, .sls-pm-sidebar .sls-pm-toolbar-row, .sls-pm-checks, .sls-pm-short-description, .sls-pm-quickview-desc, .sls-pm-table-scroll)::-webkit-scrollbar-button {
	display: none;
	width: 0;
	height: 0;
}

@supports not selector(::-webkit-scrollbar) {
	:is(.sls-pm-sidebar, .sls-pm-sidebar .sls-pm-toolbar-row, .sls-pm-checks, .sls-pm-short-description, .sls-pm-quickview-desc, .sls-pm-table-scroll) {
		scrollbar-width: thin;
		scrollbar-color: var(--sls-pm-sidebar-scrollbar, #94a3b8) rgba(148, 163, 184, 0.16);
	}
}

.sls-pm-toolbar-actions .sls-pm-reset {
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: var(--sls-pm-text);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.sls-pm-archive.sls-pm-is-loading .sls-pm-shop-main {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

/* Wide catalog: sidebar beside the grid. */
@container sls-pm-archive (min-width: 860px) {
	.sls-pm-shop-body {
		grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
	}

	.sls-pm-sidebar {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 24px);
		max-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - 48px);
		overflow-y: auto;
	}
}

/* Narrow catalog: filters in a slide-out drawer. The drawer is shown as a
 * popover (browser top layer) when supported, so transformed or clipped
 * theme containers cannot trap it. */
@container sls-pm-archive (max-width: 859.98px) {
	.sls-pm-mobile-filter-toggle {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		min-height: 44px;
		margin: 0 0 16px;
		padding: 10px 18px;
		background: var(--sls-pm-btn-bg, var(--sls-pm-accent, #2563eb));
		border: 0;
		border-radius: 999px;
		color: var(--sls-pm-btn-color, #fff);
		font: inherit;
		font-size: 0.95rem;
		font-weight: 600;
		line-height: 1;
		cursor: pointer;
	}

	.sls-pm-mobile-filter-toggle .sls-pm-filter-icon { display: none; }

	.sls-pm-mobile-filter-toggle svg {
		display: block;
		flex: 0 0 auto;
	}

	/* Drawer = flex column: fixed header, scrolling filter list, fixed footer.
	 * Only .sls-pm-toolbar-row scrolls; the drawer itself never does, so the
	 * footer cannot drift over the checkboxes. */
	.sls-pm-sidebar {
		--sls-pm-drawer-bg: #fbf9f7;
		position: fixed;
		inset: 0 auto 0 0;
		z-index: 100000;
		display: flex;
		flex-direction: column;
		width: min(360px, 88vw);
		height: 100vh;
		height: 100dvh;
		max-height: 100vh;
		max-height: 100dvh;
		margin: 0;
		padding: 0;
		overflow: hidden;
		overscroll-behavior: contain;
		background: var(--sls-pm-drawer-bg);
		border: 0;
		border-radius: 0 20px 20px 0;
		box-shadow: 8px 0 38px rgba(0, 0, 0, 0.18);
		transform: translateX(-105%);
		visibility: hidden;
		transition: transform 0.28s ease, visibility 0s linear 0.28s;
	}

	.sls-pm-mobile-filters-open .sls-pm-sidebar,
	.sls-pm-sidebar:popover-open {
		transform: none;
		visibility: visible;
		transition: transform 0.28s ease;
	}

	.sls-pm-sidebar::backdrop {
		background: rgba(22, 22, 22, 0.35);
	}

	.sls-pm-sidebar-title {
		display: none;
	}

	.sls-pm-mobile-filter-head {
		position: static;
		flex: 0 0 auto;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		margin: 0;
		padding: max(16px, env(safe-area-inset-top)) 18px 16px;
		background: var(--sls-pm-drawer-bg);
		border-bottom: 1px solid var(--sls-pm-border);
		font-size: 1.05rem;
	}

	.sls-pm-sidebar .sls-pm-sidebar-form {
		display: flex;
		flex: 1 1 auto;
		flex-direction: column;
		min-height: 0;
		margin: 0;
	}

	/* The only scroll area in the drawer. */
	.sls-pm-sidebar .sls-pm-toolbar-row {
		flex: 1 1 auto;
		min-height: 0;
		padding: 16px 18px 24px;
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}

	.sls-pm-sidebar .sls-pm-toolbar-actions {
		position: static;
		flex: 0 0 auto;
		margin: 0;
		padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
		background: var(--sls-pm-drawer-bg);
		border-top: 1px solid var(--sls-pm-border);
		box-shadow: 0 -8px 18px rgba(23, 24, 29, 0.05);
	}

	.sls-pm-toolbar-actions .sls-pm-reset {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: 48px;
		padding: 10px 16px;
		background: #ffffff;
		border: 1px solid #d7dce3;
		border-radius: 12px;
		color: #171717;
		font-weight: 650;
		text-decoration: none;
	}

	.sls-pm-wrap .sls-pm-mobile-filter-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		margin: 0;
		padding: 0;
		background: #efebe6;
		border: 0;
		border-radius: 50%;
		color: var(--sls-pm-text);
		font-size: 1.5rem;
		line-height: 1;
		cursor: pointer;
	}

	.sls-pm-checks {
		max-height: none;
		overflow: visible;
	}

	.sls-pm-check {
		padding: 9px 6px;
	}

	/* Class-based fallback when the Popover API is unavailable. */
	.sls-pm-mobile-filters-open .sls-pm-mobile-filter-backdrop {
		position: fixed;
		inset: 0;
		z-index: 99999;
		display: block;
		background: rgba(22, 22, 22, 0.35);
	}

	.sls-pm-mobile-filters-open.has-popover .sls-pm-mobile-filter-backdrop {
		display: none;
	}
}

@media (prefers-reduced-transparency: reduce) {
	.sls-pm-sidebar {
		background: #faf8f6;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sls-pm-sidebar,
	.sls-pm-card,
	.sls-pm-card-media img,
	.sls-pm-card-cta-icon {
		transition: none;
	}
}

/* Pagination */
.sls-pm-pagination {
	margin: 8px 0 0;
}

.sls-pm-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.sls-pm-pagination ul.page-numbers li {
	float: none;
	margin: 0;
	padding: 0;
	border: 0;
}

.sls-pm-pagination .page-numbers a,
.sls-pm-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 42px;
	padding: 0 14px;
	background: var(--sls-pm-surface);
	border: 1px solid var(--sls-pm-border);
	border-radius: 999px;
	color: var(--sls-pm-text);
	font-size: 0.95rem;
	line-height: 1;
	text-decoration: none;
}

.sls-pm-pagination .page-numbers a:hover {
	border-color: var(--sls-pm-accent, #2563eb);
	color: var(--sls-pm-accent, #2563eb);
}

.sls-pm-pagination .page-numbers span.current {
	background: var(--sls-pm-accent, #2563eb);
	border-color: var(--sls-pm-accent, #2563eb);
	color: var(--sls-pm-accent-contrast, #fff);
}

.sls-pm-empty {
	margin: 0;
	padding: 28px 20px;
	background: var(--sls-pm-well);
	border-radius: var(--sls-pm-radius);
	color: var(--sls-pm-muted);
	text-align: center;
}

/* Alternative archive layouts */
.sls-pm-shop--list .sls-pm-grid {
	grid-template-columns: minmax(0, 1fr);
}

.sls-pm-shop--list .sls-pm-card-inner {
	display: grid;
	grid-template-columns: minmax(120px, 200px) minmax(0, 1fr);
	grid-template-rows: 1fr auto;
	column-gap: 18px;
	padding-bottom: 0;
}

.sls-pm-shop--list .sls-pm-card-image-link {
	grid-row: 1 / span 2;
	padding-bottom: 12px;
}

.sls-pm-shop--list .sls-pm-card-media {
	margin: 0;
}

.sls-pm-shop--list .sls-pm-card-body {
	padding-top: 6px;
}

.sls-pm-shop--list .sls-pm-card-footer {
	margin: 0 -12px 0 0;
}

.sls-pm-shop--lookbook .sls-pm-grid {
	--sls-pm-card-min: 260px;
}

.sls-pm-shop--lookbook .sls-pm-card-media {
	padding: 0;
	aspect-ratio: 4 / 5;
}

.sls-pm-shop--lookbook .sls-pm-card-media img {
	object-fit: cover;
}

@container sls-pm-archive (min-width: 860px) {
	.sls-pm-shop--showcase .sls-pm-grid > .sls-pm-card:first-child {
		grid-column: span 2;
	}
}

@container sls-pm-archive (max-width: 520px) {
	.sls-pm-shop--list .sls-pm-card-inner {
		grid-template-columns: 110px minmax(0, 1fr);
		column-gap: 12px;
	}
}

/* ---------------------------------------------------------------------------
 * 8. Single product
 * ------------------------------------------------------------------------ */
.sls-pm-single {
	container: sls-pm-single / inline-size;
}

.sls-pm-single-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: clamp(20px, 3.5vw, 48px);
	align-items: start;
	margin: 0 0 clamp(28px, 4vw, 48px);
}

.sls-pm-single-gallery,
.sls-pm-single-summary {
	min-width: 0;
	width: 100%;
	margin: 0;
	float: none;
}

/* Summary building blocks shared by every layout. */
.sls-pm-single-summary {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.sls-pm-summary-main,
.sls-pm-summary-aside {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.sls-pm-summary-aside {
	gap: 20px;
}

.sls-pm-single-summary > *,
.sls-pm-summary-main > *,
.sls-pm-summary-aside > *,
.sls-pm-single-header > * {
	margin-top: 0;
	margin-bottom: 0;
}

/* No images and the gallery switched off: one readable column, no empty cell. */
.sls-pm-single.is-no-gallery .sls-pm-single-layout {
	grid-template-columns: minmax(0, 1fr);
	max-width: 860px;
}

/* Product photography sits on a quiet neutral surface: no gradients, no
 * glow, no tinted overlays. The picture is contained, so it is never
 * cropped, stretched or recolored. */
.sls-pm-single .sls-pm-gallery-stage {
	background: var(--sls-pm-photo-bg, #f5f5f3);
	border: 1px solid rgba(0, 0, 0, 0.04);
	border-radius: 16px;
}

.sls-pm-single .sls-pm-gallery-stage .sls-pm-gallery-main {
	padding: 5%;
}

/* ---- Split: gallery left, details right ------------------------------- */
@container sls-pm-single (min-width: 760px) {
	.sls-pm-single--split .sls-pm-single-layout {
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
		gap: clamp(32px, 4.5vw, 72px);
	}

	.sls-pm-single--split .sls-pm-single-summary {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 24px);
		padding-top: 4px;
	}
}

.sls-pm-single--split .sls-pm-summary-aside {
	padding-top: 20px;
	border-top: 1px solid var(--sls-pm-border);
}

/* ---- Stacked: wide gallery, then text and an actions panel ----------- */
.sls-pm-single--stacked .sls-pm-gallery-stage {
	aspect-ratio: 4 / 3;
}

.sls-pm-single--stacked .sls-pm-summary-aside {
	padding: clamp(18px, 2.4vw, 28px);
	background: var(--sls-pm-surface);
	border: 1px solid var(--sls-pm-border);
	border-radius: 16px;
}

.sls-pm-single--stacked .sls-pm-summary-aside .sls-pm-contact-details {
	padding-bottom: 0;
	border-bottom: 0;
}

@container sls-pm-single (min-width: 760px) {
	.sls-pm-single--stacked .sls-pm-gallery-stage {
		aspect-ratio: 16 / 9;
	}

	.sls-pm-single--stacked .sls-pm-single-summary {
		display: grid;
		grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr);
		gap: clamp(24px, 4vw, 56px);
		align-items: start;
	}

	/* Output added through the summary hooks spans both columns. */
	.sls-pm-single--stacked .sls-pm-single-summary > :not(.sls-pm-summary-main):not(.sls-pm-summary-aside) {
		grid-column: 1 / -1;
	}
}

/* ---- Gallery focus: photo-first with a slim sticky details column ---- */
.sls-pm-single--gallery .sls-pm-gallery-stage {
	aspect-ratio: 4 / 3;
}

.sls-pm-single--gallery .sls-pm-gallery-thumbs {
	grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
	gap: 10px;
}

.sls-pm-single--gallery .sls-pm-gallery .sls-pm-gallery-thumb {
	aspect-ratio: 4 / 3;
	padding: 0;
	overflow: hidden;
	border-radius: 12px;
	opacity: 1;
}

/* Grid tiles fill their frame like a photo grid; the main image above still
 * shows each photo whole. */
.sls-pm-single--gallery .sls-pm-gallery .sls-pm-gallery-thumb img {
	object-fit: cover;
	border-radius: 0;
	transition: transform 0.3s ease;
}

.sls-pm-single--gallery .sls-pm-gallery .sls-pm-gallery-thumb:hover img {
	transform: scale(1.04);
}

.sls-pm-single--gallery .sls-pm-gallery .sls-pm-gallery-thumb:not(.is-active) {
	border-color: transparent;
}

.sls-pm-single--gallery .sls-pm-title {
	font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}

@container sls-pm-single (min-width: 760px) {
	.sls-pm-single--gallery .sls-pm-single-layout {
		grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
		gap: clamp(28px, 3.5vw, 56px);
	}

	.sls-pm-single--gallery .sls-pm-gallery-thumbs {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 12px;
	}

	.sls-pm-single--gallery .sls-pm-single-summary {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 24px);
		padding: 4px 0 4px clamp(20px, 2.5vw, 32px);
		border-left: 1px solid var(--sls-pm-border);
	}
}

/* ---- Editorial: headline first, then offset image and text ----------- */
.sls-pm-single-header {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 980px;
	margin: 0 0 clamp(24px, 4vw, 48px);
}

.sls-pm-kicker {
	color: var(--sls-pm-accent, #2563eb);
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.sls-pm-kicker a {
	color: inherit;
	text-decoration: none;
}

.sls-pm-kicker a:hover {
	text-decoration: underline;
}

.sls-pm-single.sls-pm-single--editorial .sls-pm-title {
	max-width: 20ch;
	margin: 0;
	font-size: clamp(2.2rem, 5.2vw, 4.25rem);
	font-weight: 700;
	line-height: 1.04;
	letter-spacing: -0.03em;
}

.sls-pm-single--editorial .sls-pm-single-header .sls-pm-short-description {
	max-width: 62ch;
	color: var(--sls-pm-muted);
	font-size: clamp(1.05rem, 1.4vw, 1.2rem);
	line-height: 1.6;
}

@container sls-pm-single (min-width: 760px) {
	.sls-pm-single--editorial .sls-pm-single-layout {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: clamp(32px, 5vw, 80px);
	}

	/* The text column starts lower than the image: the asymmetric offset. */
	.sls-pm-single--editorial .sls-pm-single-summary {
		padding-top: clamp(24px, 9vw, 140px);
	}

	.sls-pm-single--editorial.is-no-gallery .sls-pm-single-summary {
		padding-top: 0;
	}
}

.sls-pm-single--editorial .sls-pm-summary-main {
	padding-left: 16px;
	border-left: 2px solid var(--sls-pm-accent, #2563eb);
}

.sls-pm-short-description {
	max-height: 12em;
	margin-right: -8px;
	padding-right: 14px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	color: #3c3c3c;
	font-size: 1.02rem;
	line-height: 1.65;
}


.sls-pm-short-description > :first-child {
	margin-top: 0;
}

.sls-pm-short-description > :last-child {
	margin-bottom: 0;
}

/* Contact details */
.sls-pm-contact-details {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 16px 0;
	border-block: 1px solid var(--sls-pm-border);
}

.sls-pm-contact-row {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	max-width: 100%;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.sls-pm-contact-row a {
	color: inherit;
	text-decoration: none;
}

.sls-pm-contact-row a:hover {
	color: var(--sls-pm-accent, #2563eb);
	text-decoration: underline;
}

.sls-pm-contact-icon {
	display: inline-flex;
	flex: 0 0 22px;
	align-items: center;
	justify-content: center;
	color: var(--sls-pm-accent, #2563eb);
}

.sls-pm-contact-icon svg {
	display: block;
	width: 20px;
	height: 20px;
}

.sls-pm-product-meta {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-top: 14px;
	border-top: 1px solid var(--sls-pm-border);
	color: var(--sls-pm-muted);
	font-size: 0.92rem;
	line-height: 1.5;
}

.sls-pm-meta-label {
	color: var(--sls-pm-muted);
}

.sls-pm-meta a {
	color: var(--sls-pm-text);
	text-decoration: none;
}

.sls-pm-meta a:hover {
	color: var(--sls-pm-accent, #2563eb);
}

/* Description / additional information */
.sls-pm-details {
	margin: 0 0 clamp(32px, 5vw, 56px);
}

.sls-pm-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0 0 22px;
	padding: 0;
	border-bottom: 1px solid var(--sls-pm-border);
}

.sls-pm-wrap .sls-pm-tab {
	position: relative;
	margin: 0 0 -1px;
	padding: 12px 18px;
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	box-shadow: none;
	color: var(--sls-pm-muted);
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
	cursor: pointer;
}

.sls-pm-wrap .sls-pm-tab:hover {
	color: var(--sls-pm-text);
}

.sls-pm-wrap .sls-pm-tab.is-active {
	border-bottom-color: var(--sls-pm-accent, #2563eb);
	color: var(--sls-pm-text);
}

.sls-pm-panel[hidden] {
	display: none;
}

.sls-pm-panel-title {
	margin: 0 0 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--sls-pm-border);
	color: var(--sls-pm-text);
	font-size: 1.3rem;
	font-weight: 700;
	line-height: 1.3;
}

.sls-pm-details + .sls-pm-details,
.sls-pm-panel + .sls-pm-panel:not([role="tabpanel"]) {
	margin-top: 32px;
}

.sls-pm-content {
	max-width: 100%;
	min-width: 0;
	overflow-x: hidden;
	color: #333;
	line-height: 1.7;
}

.sls-pm-content > :first-child {
	margin-top: 0;
}

.sls-pm-content > :is(p, ul, ol, h2, h3, h4, blockquote) {
	max-width: 75ch;
}

.sls-pm-content > :last-child {
	margin-bottom: 0;
}

.sls-pm-content img {
	max-width: 100%;
	height: auto;
}

/* Product description tables (scoped to .sls-pm-content only; WordPress
 * admin tables, theme tables and other plugins are untouched).
 * sls_pm_wrap_description_tables() wraps each table in
 * .sls-pm-table-scroll, which scrolls sideways on narrow screens. */
.sls-pm-content :is(p, li, a) { overflow-wrap: break-word; }

.sls-pm-content .wp-block-table {
	margin: 1.5em 0;
	overflow: visible;
}

.sls-pm-content .wp-block-table figcaption {
	margin-top: 8px;
	color: var(--sls-pm-muted);
	font-size: 0.85rem;
	text-align: left;
}

.sls-pm-content .sls-pm-table-scroll {
	max-width: 100%;
	margin: 1.5em 0;
	overflow-x: auto;
	background: var(--sls-pm-surface);
	border: 1px solid var(--sls-pm-border);
	border-radius: 14px;
	-webkit-overflow-scrolling: touch;
}

.sls-pm-content .wp-block-table > .sls-pm-table-scroll {
	margin: 0;
}

.sls-pm-content .sls-pm-table-scroll:focus-visible {
	outline: 2px solid var(--sls-pm-accent, #2563eb);
	outline-offset: 2px;
}

.sls-pm-content table {
	width: 100%;
	min-width: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: auto;
	font-size: 0.95rem;
	line-height: 1.5;
}

/* Gutenberg "fixed width cells" option keeps its behavior. */
.sls-pm-content .wp-block-table .has-fixed-layout {
	table-layout: fixed;
}

.sls-pm-content table :is(th, td) {
	min-width: 7.5rem;
	padding: 12px 16px;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--sls-pm-border);
	color: #333;
	text-align: left;
	vertical-align: top;
	overflow-wrap: normal;
	word-break: normal;
}

.sls-pm-content table thead :is(th, td) {
	background: #f6f6f4;
	color: var(--sls-pm-text);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Row headers (first-column labels) in tables with or without <thead>. */
.sls-pm-content table tbody th {
	color: var(--sls-pm-text);
	font-weight: 600;
}

.sls-pm-content table tbody tr:nth-child(even) :is(td, th) {
	background: #fafaf9;
}

.sls-pm-content table tbody tr:hover :is(td, th) {
	background: #f3f4f6;
}

.sls-pm-content table tr:last-child > :is(td, th),
.sls-pm-content table tfoot tr:last-child > :is(td, th) {
	border-bottom: 0;
}

.sls-pm-content table tfoot :is(td, th) {
	border-top: 1px solid var(--sls-pm-border);
	font-weight: 600;
}

.sls-pm-content table caption {
	padding: 12px 16px 0;
	color: var(--sls-pm-muted);
	font-size: 0.85rem;
	text-align: left;
	caption-side: top;
}

/* Specifications (Additional information) use the same visual language. */
.sls-pm-specs {
	width: 100%;
	max-width: 760px;
	margin: 0;
	border: 1px solid var(--sls-pm-border);
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 14px;
	overflow: hidden;
	font-size: 0.97rem;
}

.sls-pm-specs th,
.sls-pm-specs td {
	padding: 12px 16px;
	border: 0;
	border-bottom: 1px solid var(--sls-pm-border);
	text-align: left;
	vertical-align: top;
}

.sls-pm-specs tr:last-child > * {
	border-bottom: 0;
}

.sls-pm-specs th {
	width: 36%;
	background: #f6f6f4;
	color: var(--sls-pm-text);
	font-weight: 600;
}

.sls-pm-specs td {
	color: #333;
}

@container sls-pm-single (max-width: 480px) {
	.sls-pm-specs th,
	.sls-pm-specs td,
	.sls-pm-content table :is(th, td) {
		padding: 10px 12px;
		font-size: 0.9rem;
	}
}

/* Related products */
.sls-pm-related {
	clear: both;
	margin: 0;
	padding-top: clamp(24px, 4vw, 40px);
	border-top: 1px solid var(--sls-pm-border);
}

.sls-pm-related .sls-pm-related-grid {
	--sls-pm-card-min: 180px;
}

.sls-pm-related-title {
	margin: 12px 0 clamp(16px, 2.5vw, 24px);
	color: var(--sls-pm-text);
	font-family: inherit;
	font-size: clamp(1.75rem, 3.2vw, 2.6rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-align: center;
}

/* ---------------------------------------------------------------------------
 * 9. Single product embed (shortcode/block)
 * ------------------------------------------------------------------------ */
.sls-pm-embed {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 14px;
	min-width: 0;
	max-width: 520px;
	padding: 14px;
	background: var(--sls-pm-surface);
	border: 1px solid var(--sls-pm-border);
	border-radius: var(--sls-pm-radius);
}

.sls-pm-embed-media {
	display: flex;
	width: 100%;
	max-width: 400px;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	padding: 6%;
	background: var(--sls-pm-well);
	border-radius: calc(var(--sls-pm-radius) - 6px);
	overflow: hidden;
}

.sls-pm-embed-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.sls-pm-embed-title {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.3;
}

.sls-pm-embed-title a {
	color: var(--sls-pm-text);
	text-decoration: none;
}

.sls-pm-editor-placeholder {
	padding: 16px;
	background: #f6f7f7;
	border: 1px dashed #c3c4c7;
	color: #50575e;
}

/* ---------------------------------------------------------------------------
 * 10. Quick view dialog (native modal, browser top layer)
 * ------------------------------------------------------------------------ */
.sls-pm-modal {
	width: min(900px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 0;
	background: var(--sls-pm-surface);
	border: 0;
	border-radius: var(--sls-pm-radius);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
	color: var(--sls-pm-text);
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.sls-pm-modal::backdrop {
	background: rgba(17, 17, 17, 0.6);
}

.sls-pm-modal-body {
	padding: clamp(16px, 3vw, 28px);
	min-width: 0;
	overflow-x: hidden;
}

.sls-pm-modal .sls-pm-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	background: #f3f1ee;
	border: 0;
	border-radius: 50%;
	color: var(--sls-pm-text);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.sls-pm-quickview {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(16px, 3vw, 28px);
	align-items: start;
}

.sls-pm-quickview-copy {
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
}

.sls-pm-quickview-media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	padding: 6%;
	background: var(--sls-pm-well);
	border-radius: 14px;
}

.sls-pm-quickview-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.sls-pm-quickview-title {
	margin: 0 44px 12px 0;
	font-family: var(--sls-pm-title-font);
	font-size: 1.45rem;
	font-weight: 700;
	line-height: 1.25;
}

.sls-pm-quickview-desc {
	margin: 0 0 16px;
	max-height: 4.8em;
	padding-right: 12px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	color: #3a3a3a;
	line-height: 1.6;
}

.sls-pm-quickview-desc :is(img, iframe, video, table) { max-width: 100%; height: auto; }
.sls-pm-quickview-desc :is(p, li, td, th, a) { overflow-wrap: anywhere; }

.sls-pm-quickview-specs-title {
	margin: 0 0 8px;
	font-size: 0.95rem;
}

.sls-pm-quickview-specs-list {
	margin: 0 0 18px;
}

.sls-pm-quickview-spec-row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 8px 0;
	border-bottom: 1px solid var(--sls-pm-border);
	font-size: 0.92rem;
}

.sls-pm-quickview-spec-row dt {
	color: var(--sls-pm-muted);
	font-weight: 400;
}

.sls-pm-quickview-spec-row dd {
	margin: 0;
	text-align: right;
}

.sls-pm-quickview-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

@media (max-width: 680px) {
	.sls-pm-quickview {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Scroll lock while a dialog/drawer is open. The scrollbar width is added
 * back as padding so the page behind does not shift sideways. */
html.sls-pm-scroll-locked,
html.sls-pm-scroll-locked body {
	overflow: hidden;
}

html.sls-pm-scroll-locked body {
	padding-right: var(--sls-pm-scrollbar-gap, 0px);
}
