/* ============================================================
   Shop — shop.css
   Uses theme CSS custom properties. Logical properties for RTL.
   ============================================================ */

/* ── Map to theme design tokens ────────────────────────────── */
.stw-shop {
	--stw-shop-accent:       var(--color-primary);
	--stw-shop-accent-hover: var(--color-primary-hover);
	--stw-shop-accent-light: color-mix(in srgb, var(--color-primary) 10%, white);
	--stw-shop-text:         var(--color-text);
	--stw-shop-muted:        var(--color-text-muted);
	--stw-shop-heading:      var(--color-heading);
	--stw-shop-bg:           var(--color-bg-secondary);
	--stw-shop-card:         var(--color-bg);
	--stw-shop-border:       var(--color-border);
	--stw-shop-radius:       var(--radius-corner);
	--stw-shop-radius-sm:    var(--radius-corner);
	--stw-shop-ease:         var(--transition-base);
	--stw-shop-ease-fast:    var(--transition-fast);
	--stw-shop-shadow:       var(--shadow-md);
	--stw-shop-shadow-lg:    var(--shadow-xl);
	--stw-shop-sidebar-w:    272px;
	--stw-shop-columns:      3;
	/* RTL-aware slide direction */
	--stw-shop-slide:        -100%;
}

[dir="rtl"] .stw-shop { --stw-shop-slide: 100%; }

/* ── Root Layout ──────────────────────────────────────────── */
.stw-shop {
	/* background: var(--stw-shop-bg); */
	padding-block: 40px 80px;
}

/* Constrained flex row: sidebar + main content */
.stw-shop-shop-inner {
	display: flex;
	align-items: flex-start;
	gap: 32px;
}

.stw-shop--no-sidebar .stw-shop-shop-inner {
	display: block;
}

.stw-shop--layout-sidebar-left .stw-shop-shop-inner,
[dir="rtl"] .stw-shop--layout-sidebar-right .stw-shop-shop-inner {
	flex-direction: row-reverse;
}

[dir="rtl"] .stw-shop--layout-sidebar-left .stw-shop-shop-inner {
	flex-direction: row;
}

.stw-shop-main {
	flex: 1;
	min-inline-size: 0;
}

/* ── Sidebar — inline sticky on desktop ───────────────────── */
.stw-shop-sidebar {
	inline-size: var(--stw-shop-sidebar-w);
	flex-shrink: 0;
	background: var(--stw-shop-card);
	border: 1px solid var(--stw-shop-border);
	border-radius: var(--stw-shop-radius);
	display: flex;
	flex-direction: column;
	position: sticky;
	inset-block-start: 20px;
	max-block-size: calc(100vh - 40px);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--stw-shop-border) transparent;
}

.stw-shop-sidebar::-webkit-scrollbar { inline-size: 4px; }
.stw-shop-sidebar::-webkit-scrollbar-thumb { background: var(--stw-shop-border); border-radius: var(--radius-corner); }

.stw-shop-sidebar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 28px 24px 20px;
	border-block-end: 1px solid var(--stw-shop-border);
	flex-shrink: 0;
}

.stw-shop-sidebar__title {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--stw-shop-muted);
}

.stw-shop-sidebar__close {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: var(--stw-shop-muted);
	border-radius: var(--radius-corner);
	line-height: 0;
	transition: color var(--stw-shop-ease-fast), background var(--stw-shop-ease-fast);
}

.stw-shop-sidebar__close:hover { color: var(--stw-shop-heading); background: var(--stw-shop-border); }

@media (min-width: 1025px) {
	.stw-shop--sidebar-static .stw-shop-sidebar {
		position: static;
		max-block-size: none;
	}
}

.stw-shop-sidebar__body { flex: 1; padding-block: 8px; }

.stw-shop-sidebar__footer {
	padding: 20px 24px 28px;
	border-block-start: 1px solid var(--stw-shop-border);
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

/* ── Sidebar Facets ────────────────────────────────────────── */
.stw-shop-facet {
	padding: 18px 24px;
	border-block-end: 1px solid var(--stw-shop-border);
	display: grid;
	gap: 12px;
}

.stw-shop-facet:last-child {
	border-block-end: none;
}

.stw-shop-facet__title {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--stw-shop-muted);
	margin: 0;
}

.stw-shop-facet--inline {
	gap: 10px;
}

.stw-shop-facet-options {
	display: grid;
	gap: 6px;
	max-block-size: min(42vh, 360px);
	overflow: auto;
	padding-inline-end: 2px;
	scrollbar-width: thin;
	scrollbar-color: var(--stw-shop-border) transparent;
}

.stw-shop-facet-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	inline-size: 100%;
	padding-block: 10px;
	padding-inline: 12px;
	border: 1px solid transparent;
	border-radius: var(--stw-shop-radius-sm);
	background: transparent;
	color: var(--stw-shop-muted);
	font-family: var(--stw-sans);
	font-size: 0.85rem;
	text-align: start;
	cursor: pointer;
	transition: border-color var(--stw-shop-ease-fast), background var(--stw-shop-ease-fast), color var(--stw-shop-ease-fast);
}

.stw-shop-facet-option:hover {
	color: var(--stw-shop-heading);
	background: color-mix(in srgb, var(--stw-shop-accent) 10%, var(--stw-shop-card));
	border-color: color-mix(in srgb, var(--stw-shop-accent) 25%, transparent);
}

.stw-shop-facet-option.is-active {
	color: var(--stw-shop-accent);
	background: var(--stw-shop-accent-light);
	border-color: color-mix(in srgb, var(--stw-shop-accent) 30%, transparent);
	font-weight: 600;
}

.stw-shop-facet-option__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-inline-size: 1.8rem;
	padding-inline: 0.38rem;
	block-size: 1.15rem;
	font-size: 0.68rem;
	font-weight: 500;
	color: var(--stw-shop-muted);
	background: color-mix(in srgb, var(--stw-shop-border) 88%, var(--stw-shop-card));
	border-radius: 999px;
}

.stw-shop-color-options {
	display: grid;
	grid-template-columns: 1fr;
	gap: 6px;
	max-block-size: min(42vh, 320px);
	overflow: auto;
	padding-inline-end: 2px;
	scrollbar-width: thin;
	scrollbar-color: var(--stw-shop-border) transparent;
}

.stw-shop-color-option {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 10px;
	inline-size: 100%;
	padding-block: 9px;
	padding-inline: 12px;
	border: 1px solid transparent;
	border-radius: var(--stw-shop-radius-sm);
	background: transparent;
	color: var(--stw-shop-muted);
	font-size: 0.84rem;
	text-align: start;
	cursor: pointer;
	transition: border-color var(--stw-shop-ease-fast), background var(--stw-shop-ease-fast), color var(--stw-shop-ease-fast);
}

.stw-shop-color-option:hover {
	color: var(--stw-shop-heading);
	background: color-mix(in srgb, var(--stw-shop-accent) 10%, var(--stw-shop-card));
	border-color: color-mix(in srgb, var(--stw-shop-accent) 25%, transparent);
}

.stw-shop-color-option.is-active {
	color: var(--stw-shop-accent);
	background: var(--stw-shop-accent-light);
	border-color: color-mix(in srgb, var(--stw-shop-accent) 30%, transparent);
	font-weight: 600;
}

.stw-shop-color-option--all {
	display: inline-flex;
	justify-content: center;
	grid-template-columns: none;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding-block: 8px;
}

.stw-shop-color-option__dot {
	inline-size: 0.92rem;
	block-size: 0.92rem;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, var(--stw-shop-border) 78%, transparent);
	background: var(--stw-shop-filter-color, var(--stw-shop-card));
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-white) 70%, transparent);
}

.stw-shop-color-option__name {
	min-inline-size: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.stw-shop-color-option__count {
	font-size: 0.68rem;
	color: var(--stw-shop-muted);
}

/* ── Price Slider ──────────────────────────────────────────── */
.stw-shop-price-slider {
	position: relative;
	block-size: 4px;
	margin: 24px 8px 16px;
}

.stw-shop-price-track {
	position: absolute;
	inset: 0;
	border-radius: var(--radius-corner);
	background: var(--stw-shop-border);
}

.stw-shop-price-fill {
	position: absolute;
	inset-block: 0;
	border-radius: var(--radius-corner);
	background: var(--stw-shop-accent);
	transition: inset-inline-start 0.05s, inset-inline-end 0.05s;
}

.stw-shop-range {
	position: absolute;
	inline-size: calc(100% + 16px);
	inset-inline-start: -8px;
	inset-block-start: 50%;
	transform: translateY(-50%);
	block-size: 4px;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
	pointer-events: none;
	margin: 0;
}

.stw-shop-range::-webkit-slider-runnable-track { background: transparent; }
.stw-shop-range::-moz-range-track { background: transparent; }

.stw-shop-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	inline-size: 20px;
	block-size: 20px;
	border-radius: var(--radius-corner);
	background: var(--stw-shop-accent);
	border: 3px solid var(--color-bg);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	pointer-events: all;
	transition: transform 0.15s, box-shadow 0.15s;
}

.stw-shop-range::-moz-range-thumb {
	inline-size: 20px;
	block-size: 20px;
	border-radius: var(--radius-corner);
	background: var(--stw-shop-accent);
	border: 3px solid var(--color-bg);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	pointer-events: all;
	transition: transform 0.15s;
}

.stw-shop-range::-webkit-slider-thumb:hover,
.stw-shop-range:focus::-webkit-slider-thumb {
	transform: scale(1.2);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.stw-shop-range:focus { outline: none; }

.stw-shop-price-labels {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.83rem;
	color: var(--stw-shop-muted);
	margin-block-start: 4px;
}

.stw-shop-price-labels__min,
.stw-shop-price-labels__max { color: var(--stw-shop-text); font-weight: 500; }

/* ── On Sale Toggle ────────────────────────────────────────── */
.stw-shop-toggle {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	user-select: none;
}

.stw-shop-toggle input { position: absolute; opacity: 0; pointer-events: none; }

.stw-shop-toggle__track {
	inline-size: 42px;
	block-size: 24px;
	border-radius: var(--radius-corner);
	background: var(--stw-shop-border);
	position: relative;
	flex-shrink: 0;
	transition: background var(--stw-shop-ease);
}

.stw-shop-toggle input:checked ~ .stw-shop-toggle__track { background: var(--stw-shop-accent); }

.stw-shop-toggle__thumb {
	position: absolute;
	inset-block-start: 3px;
	inset-inline-start: 3px;
	inline-size: 18px;
	block-size: 18px;
	border-radius: var(--radius-corner);
	background: var(--color-bg);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
	transition: translate var(--stw-shop-ease);
}

.stw-shop-toggle input:checked ~ .stw-shop-toggle__track .stw-shop-toggle__thumb {
	translate: 18px 0;
}

[dir="rtl"] .stw-shop-toggle input:checked ~ .stw-shop-toggle__track .stw-shop-toggle__thumb {
	translate: -18px 0;
}

.stw-shop-toggle__label { font-size: 0.875rem; color: var(--stw-shop-text); }

/* ── Buttons ───────────────────────────────────────────────── */
.stw-shop-btn {
	flex: 1;
	block-size: 40px;
	border-radius: var(--stw-shop-radius-sm);
	border: none;
	cursor: pointer;
	font-family: var(--stw-serif);;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	transition: background var(--stw-shop-ease-fast), color var(--stw-shop-ease-fast), transform 0.1s;
}

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

.stw-shop-btn--primary { background: var(--stw-shop-accent); color: var(--color-btn-text); }
.stw-shop-btn--primary:hover { background: var(--stw-shop-accent-hover); }

.stw-shop-btn--ghost {
	background: transparent;
	color: var(--stw-shop-muted);
	border: 1px solid var(--stw-shop-border);
}

.stw-shop-btn--ghost:hover { border-color: currentColor; color: var(--stw-shop-text); }

/* ── Overlay (mobile drawer backdrop) ─────────────────────── */
.stw-shop-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 199;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

.stw-shop-overlay.is-visible { display: block; animation: stw-shop-fade 0.25s ease; }

/* Hide apply button on desktop (all filters are live-AJAX) */
.stw-shop-sidebar__footer .stw-shop-btn--primary { display: none; }

/* ── Top Bar ───────────────────────────────────────────────── */
.stw-shop-topbar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-block-end: 24px;
	flex-wrap: wrap;
}

.stw-shop-topbar__title {
	font-size: 2rem;
	font-weight: 700;
	margin: 0 0 4px;
	line-height: 1.15;
	color: var(--stw-shop-heading);
	font-family: var(--font-heading);
}

.stw-shop-topbar__count {
	font-size: 0.85rem;
	color: var(--stw-shop-muted);
	display: block;
}

.stw-shop-topbar__right {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* ── Sort Select ───────────────────────────────────────────── */
.stw-shop-sort-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.stw-shop-sort-icon {
	position: absolute;
	inset-inline-start: 12px;
	color: var(--stw-shop-muted);
	pointer-events: none;
}

.stw-shop-sort-select {
	appearance: none;
	-webkit-appearance: none;
	background-color: var(--stw-shop-card);
	border: 1px solid var(--stw-shop-border);
	border-radius: var(--stw-shop-radius-sm);
	padding-block: 10px;
	padding-inline: 36px;
	font-size: 0.85rem;
	color: var(--stw-shop-text);
	cursor: pointer;
	transition: border-color var(--stw-shop-ease-fast), box-shadow var(--stw-shop-ease-fast);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}

[dir="rtl"] .stw-shop-sort-select { background-position: left 12px center; }

.stw-shop-sort-select:hover { border-color: var(--color-text-muted); }

.stw-shop-sort-select:focus {
	outline: none;
	border-color: var(--stw-shop-accent);
	box-shadow: 0 0 0 3px var(--stw-shop-accent-light);
}

/* ── Filter Toggle (mobile) ────────────────────────────────── */
.stw-shop-filter-toggle-btn {
	display: none;
	align-items: center;
	gap: 8px;
	background: var(--stw-shop-card);
	border: 1px solid var(--stw-shop-border);
	border-radius: var(--stw-shop-radius-sm);
	padding: 10px 16px;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--stw-shop-text);
	cursor: pointer;
	transition: border-color var(--stw-shop-ease-fast), background var(--stw-shop-ease-fast);
}

.stw-shop-filter-toggle-btn:hover { border-color: var(--stw-shop-accent); background: var(--stw-shop-accent-light); }

/* ── Active Filter Chips ───────────────────────────────────── */
.stw-shop-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-block-end: 24px;
}

.stw-shop-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--stw-shop-accent-light);
	color: var(--stw-shop-accent);
	border: 1px solid color-mix(in srgb, var(--stw-shop-accent) 25%, transparent);
	border-radius: var(--radius-corner);
	padding: 5px 10px;
	font-family: var(--stw-serif);
	font-size: 0.78rem;
	font-weight: 500;
	cursor: pointer;
	transition: background var(--stw-shop-ease-fast), transform 0.1s;
}

.stw-shop-chip:hover { background: color-mix(in srgb, var(--stw-shop-accent) 18%, white); }
.stw-shop-chip:active { transform: scale(0.96); }

.stw-shop-chip__remove {
	display: flex;
	align-items: center;
	justify-content: center;
	inline-size: 16px;
	block-size: 16px;
	border-radius: var(--radius-corner);
	background: color-mix(in srgb, var(--stw-shop-accent) 25%, transparent);
	line-height: 0;
	transition: background var(--stw-shop-ease-fast);
}

.stw-shop-chip:hover .stw-shop-chip__remove { background: var(--stw-shop-accent); color: var(--color-bg); }

/* ── Product Grid ──────────────────────────────────────────── */
.stw-shop-grid-wrap { position: relative; }

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

/* `display: grid` overrides the UA stylesheet's [hidden] → display:none.
   These rules restore the intended behaviour for both grid and skeleton. */
.stw-shop-grid[hidden],
.stw-shop-skeleton-wrap[hidden] { display: none !important; }

/* ── Woo Products Style 1 parity (used by ST Woo card design) ───────────────── */
.stw-shop,
.stw-related-products {
	--stw-bg: var(--color-bg, #fdfcfb);
	--stw-surface: #fff;
	--stw-ink: var(--color-text, #1a0d14);
	--stw-muted: var(--color-text-muted, #5c4855);
	--stw-line: var(--color-border, rgba(26, 13, 20, .08));
	--stw-pink: var(--color-primary, #f083b4);
	--stw-deep: var(--color-primary-hover, #b83b70);
	--stw-serif: var(--font-heading, 'Cormorant Garamond', 'Times New Roman', serif);
	--stw-sans: var(--font-body, Inter, system-ui, -apple-system, 'Segoe UI', sans-serif);
	font-family: var(--stw-sans);
	color: var(--stw-ink);
}

/* Keep single-product related cards aligned with global theme typography. */
.stw-related-products {
	--stw-serif: var(--font-heading);
	--stw-sans: var(--font-body);
	font-family: var(--font-body);
}

.stw-related-products .stw-product-card__title a{
	font-family: var(--font-heading);
}

.stw-shop .stw-product-card__buttons,
.stw-related-products .stw-product-card__buttons {
	display: flex;
	align-items: center;
	gap: .3rem;
	margin-inline-start: auto;
}

/* ── Related products carousel (single product page) ──────────────────────── */
.stw-related-products--carousel {
	--stw-related-gap: 24px;
	--stw-related-cols: 4;
}

.stw-related-products--carousel .stw-related-products__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-block-end: 1rem;
	flex-wrap: wrap;
}

.stw-related-products--carousel .stw-related-products__header > h2 {
	margin-block-end: 0;
}

.stw-related-products--carousel .stw-related-products__controls {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-block-end: 0;
}

.stw-related-products--carousel .stw-related-products__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 2.4rem;
	block-size: 2.4rem;
	border: 1px solid color-mix(in srgb, var(--stw-line) 78%, transparent);
	border-radius: 999px;
	background: var(--stw-surface);
	color: var(--stw-ink);
	box-shadow: var(--shadow-sm);
	cursor: pointer;
	transition: transform var(--stw-shop-ease-fast), background var(--stw-shop-ease-fast), border-color var(--stw-shop-ease-fast), color var(--stw-shop-ease-fast);
}

.stw-related-products--carousel .stw-related-products__arrow:hover,
.stw-related-products--carousel .stw-related-products__arrow:focus-visible {
	transform: translateY(-1px);
	background: color-mix(in srgb, var(--stw-pink) 10%, var(--stw-surface));
	border-color: color-mix(in srgb, var(--stw-pink) 35%, transparent);
	color: var(--stw-deep);
	outline: none;
}

.stw-related-products--carousel .stw-related-products__arrow:disabled {
	opacity: .45;
	cursor: not-allowed;
	transform: none;
	background: var(--stw-surface);
	color: var(--stw-muted);
}

.stw-related-products--carousel .stw-related-products__viewport {
	overflow: hidden;
	outline: none;
	border-radius: var(--stw-shop-radius);
	position: relative;
}

.stw-related-products--carousel .stw-related-products__track {
	display: flex;
	gap: var(--stw-related-gap);
	grid-template-columns: none;
	will-change: transform;
	transition: transform var(--stw-shop-ease-fast);
}

.stw-related-products--carousel .stw-related-products__track > * {
	flex: 0 0 calc((100% - (var(--stw-related-gap) * (var(--stw-related-cols) - 1))) / var(--stw-related-cols));
	min-inline-size: 0;
	scroll-snap-align: start;
}

.stw-related-products--carousel .stw-related-products__viewport:focus-visible {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--stw-pink) 26%, transparent);
}

/* ── Product Card (Loved Picks style) ─────────────────────── */
.stw-shop-loved-card {
	position: relative;
	display: grid;
	gap: .7rem;
	min-inline-size: 0;
	animation: stw-shop-card-in 0.4s ease both;
}

.stw-shop-loved-card--out-of-stock {
	opacity: .78;
}

.stw-shop-loved-card__visual {
	position: relative;
	border-radius: var(--stw-shop-radius);
	overflow: hidden;
}

.amb-loved-card__media {
	position: relative;
	display: block;
	aspect-ratio: 1.08 / 1;
	background: var(--stw-shop-bg);
	text-decoration: none;
	border: 1px solid color-mix(in srgb, var(--stw-shop-border) 72%, transparent);
}

.amb-loved-card__media img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	transition: transform .55s cubic-bezier(.2, .8, .2, 1), filter .55s cubic-bezier(.2, .8, .2, 1);
}

.stw-shop-loved-card:hover .amb-loved-card__media img,
.stw-shop-loved-card:focus-within .amb-loved-card__media img {
	transform: scale(1.045);
	filter: saturate(1.03) contrast(1.01);
}

.stw-shop-loved-card__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: flex-start;
	padding: 1rem;
	background: linear-gradient(180deg, color-mix(in srgb, var(--color-bg) 0%, transparent) 35%, color-mix(in srgb, #000 62%, transparent) 100%);
	opacity: 0;
	transform: translateY(.45rem);
	pointer-events: none;
	transition: opacity .24s ease, transform .24s ease;
	z-index: 3;
}

.stw-shop-loved-card:hover .stw-shop-loved-card__overlay,
.stw-shop-loved-card:focus-within .stw-shop-loved-card__overlay {
	opacity: 1;
	transform: translateY(0);
}

.stw-shop-loved-card__overlay-actions {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .62rem;
	margin-block-start: auto;
	pointer-events: auto;
}

.stw-shop-loved-card__action {
	display: inline-grid;
	place-items: center;
	min-inline-size: 2.75rem;
	block-size: 2.75rem;
	padding-inline: .9rem;
	border: 1px solid color-mix(in srgb, var(--color-bg) 35%, transparent);
	border-radius: var(--radius-button);
	background: color-mix(in srgb, var(--color-btn-bg) 92%, transparent);
	color: var(--color-btn-text);
	box-shadow: var(--shadow-sm);
	cursor: pointer;
	text-decoration: none;
	appearance: none;
	transition: transform .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
}

.stw-shop-loved-card__action:hover,
.stw-shop-loved-card__action:focus-visible,
.stw-shop-loved-card__action.is-success {
	background: var(--color-btn-hover-bg);
	border-color: var(--color-btn-hover-bg);
	color: var(--color-btn-hover-text);
	transform: translateY(-1px);
	outline: none;
}

.stw-shop-loved-card__action.is-loading {
	pointer-events: none;
	opacity: .72;
}

.stw-shop-loved-card__action svg {
	inline-size: 1rem;
	block-size: 1rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.stw-shop-quickshow-modal {
	position: fixed;
	inset: 0;
	z-index: 600;
	display: grid;
	place-items: center;
	padding: 1.25rem;
	background: rgba(15, 23, 42, .62);
	backdrop-filter: blur(8px);
}

.stw-shop-quickshow-modal[hidden] {
	display: none;
}

.stw-shop-quickshow-modal__panel {
	inline-size: min(920px, calc(100vw - 2rem));
	max-block-size: min(88vh, 860px);
	overflow: auto;
	background: var(--color-bg);
	color: var(--color-text);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-xl);
	border: 1px solid color-mix(in srgb, var(--stw-shop-border) 70%, transparent);
}

.stw-shop-quickshow-modal__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
	min-block-size: 100%;
}

.stw-shop-quickshow-modal__media {
	position: relative;
	background: var(--stw-shop-bg);
	min-block-size: 100%;
}

.stw-shop-quickshow-modal__media img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.stw-shop-quickshow-modal__body {
	display: grid;
	gap: 1rem;
	padding: 1.4rem;
	align-content: start;
}

.stw-shop-quickshow-modal__close {
	position: absolute;
	inset-inline-start: 1rem;
	inset-block-start: 1rem;
	display: inline-grid;
	place-items: center;
	inline-size: 2.5rem;
	block-size: 2.5rem;
	border: none;
	border-radius: var(--radius-button);
	background: rgba(15, 23, 42, .78);
	color: #fff;
	cursor: pointer;
	z-index: 2;
}

.stw-shop-quickshow-modal__close svg {
	inline-size: 1rem;
	block-size: 1rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.stw-shop-quickshow-modal__kicker {
	color: var(--stw-shop-muted);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.stw-shop-quickshow-modal__title {
	margin: 0;
	color: var(--stw-shop-heading);
	font-family: var(--font-heading);
	font-size: clamp(1.45rem, 2.5vw, 2.2rem);
	line-height: 1.15;
}

.stw-shop-quickshow-modal__price {
	color: var(--stw-shop-heading);
	font-size: 1.05rem;
	font-weight: 700;
}

.stw-shop-quickshow-modal__attributes {
	display: grid;
	gap: .5rem;
	padding: .85rem;
	border-radius: var(--radius-card);
	background: color-mix(in srgb, var(--stw-shop-bg) 72%, var(--color-bg));
	border: 1px solid color-mix(in srgb, var(--stw-shop-border) 72%, transparent);
}

.stw-shop-quickshow-modal__attributes[hidden] {
	display: none;
}

.stw-shop-quickshow-modal__attribute {
	display: grid;
	grid-template-columns: minmax(0, 110px) minmax(0, 1fr);
	gap: .7rem;
	align-items: start;
	font-size: .86rem;
	line-height: 1.5;
}

.stw-shop-quickshow-modal__attribute-name {
	color: var(--stw-shop-heading);
	font-weight: 600;
}

.stw-shop-quickshow-modal__attribute-value {
	color: var(--stw-shop-muted);
}

.stw-shop-quickshow-modal__text {
	margin: 0;
	color: var(--stw-shop-muted);
	font-size: .95rem;
	line-height: 1.65;
}

.stw-shop-quickshow-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	padding-block-start: .25rem;
}

.stw-shop-quickshow-modal__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-inline-size: 10rem;
	min-block-size: 2.75rem;
	padding-inline: 1rem;
	border-radius: var(--radius-button);
	background: var(--color-btn-bg);
	color: var(--color-btn-text);
	text-decoration: none;
	font-weight: 700;
}

.stw-shop-quickshow-modal__link--ghost {
	border: 1px solid color-mix(in srgb, var(--stw-shop-border) 85%, transparent);
	background: color-mix(in srgb, var(--stw-shop-bg) 65%, var(--color-bg));
	color: var(--stw-shop-heading);
	cursor: pointer;
	appearance: none;
}

.stw-shop-quickshow-modal__link--ghost[hidden] {
	display: none;
}

.stw-shop-quickshow-modal__link--ghost.is-success {
	inline-size: 2.75rem;
	min-inline-size: 2.75rem;
	padding-inline: 0;
	border-color: var(--color-btn-hover-bg);
	background: var(--color-btn-hover-bg);
	color: var(--color-btn-hover-text);
}

.stw-shop-quickshow-modal__link--ghost svg {
	inline-size: 1rem;
	block-size: 1rem;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.stw-shop-quickshow-modal__link:hover,
.stw-shop-quickshow-modal__link:focus-visible {
	background: var(--color-btn-hover-bg);
	color: var(--color-btn-hover-text);
	outline: none;
}

@media (max-width: 768px) {
	.stw-shop-quickshow-modal__layout {
		grid-template-columns: 1fr;
	}

	.stw-shop-quickshow-modal__media {
		block-size: 52vw;
		max-block-size: 320px;
	}

	.stw-shop-quickshow-modal__body {
		padding: 1.1rem;
	}
}

.stw-shop-loved-card__placeholder {
	inline-size: 100%;
	block-size: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--stw-shop-border);
}

.stw-shop-loved-card__placeholder svg {
	inline-size: 48px;
	block-size: 48px;
	opacity: .35;
}

.amb-loved-card__badge {
	position: absolute;
	inset-inline-start: .62rem;
	inset-block-start: .62rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	min-block-size: 1.35rem;
	padding-inline: .55rem;
	border-radius: var(--stw-shop-radius-sm);
	background: color-mix(in srgb, var(--stw-shop-muted) 78%, var(--stw-shop-heading));
	color: var(--color-bg);
	font-size: .62rem;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.amb-loved-card__body {
	position: relative;
	display: grid;
	gap: .28rem;
	padding-inline: .02rem;
}

.amb-loved-card__meta {
	color: var(--stw-shop-muted);
	font-size: .76rem;
	font-weight: 400;
	line-height: 1.25;
}

.amb-loved-card__title {
	max-inline-size: 31ch;
	margin: 0;
	color: var(--stw-shop-heading);
	font-family: var(--font-heading);
	font-size: clamp(.92rem, 1vw, 1.03rem);
	font-weight: 600;
	line-height: 1.38;
	letter-spacing: 0;
}

.amb-loved-card__title a {
	color: inherit;
	text-decoration: none;
}

.amb-loved-card__title a:hover,
.amb-loved-card__title a:focus-visible {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
}

.amb-loved-card__footer {
	display: grid;
	gap: .45rem;
	margin-block-start: .05rem;
}

.amb-loved-card__price,
.amb-loved-card__price .price {
	display: inline-flex;
	align-items: baseline;
	gap: .34rem;
	flex-wrap: wrap;
	color: var(--stw-shop-heading);
	font-size: .88rem;
	font-weight: 600;
	line-height: 1.2;
}

.amb-loved-card__price del {
	text-decoration: line-through;
}

.amb-loved-card__price del .amount {
	color: var(--stw-shop-muted);
	font-weight: 400;
}

.amb-loved-card__price ins {
	text-decoration: none;
}

.amb-loved-card__price ins .amount {
	color: #e05a5a;
}

.amb-loved-card__swatches {
	display: inline-flex;
	align-items: center;
	gap: .38rem;
	min-block-size: .92rem;
}

.amb-loved-card__swatch {
	display: inline-block;
	inline-size: .9rem;
	block-size: .9rem;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, var(--stw-shop-border) 75%, transparent);
	background: var(--amb-loved-swatch-color, color-mix(in srgb, var(--stw-shop-bg) 82%, var(--stw-shop-card)));
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-white) 70%, transparent);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.amb-loved-card__swatch:hover,
.amb-loved-card__swatch:focus-visible {
	transform: translateY(-1px) scale(1.06);
	border-color: color-mix(in srgb, var(--stw-shop-accent) 40%, var(--stw-shop-border));
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--stw-shop-accent) 16%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--color-white) 70%, transparent);
	outline: none;
}

.amb-loved-card__swatch-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-inline-size: 1.1rem;
	block-size: 1.1rem;
	padding-inline: .2rem;
	border-radius: 999px;
	color: var(--stw-shop-muted);
	font-size: .66rem;
	font-weight: 600;
	line-height: 1;
	background: color-mix(in srgb, var(--stw-shop-bg) 78%, var(--stw-shop-card));
	border: 1px solid color-mix(in srgb, var(--stw-shop-border) 72%, transparent);
}

.amb-loved-card__swatches span {
	inline-size: .82rem;
	block-size: .82rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--stw-shop-bg) 82%, var(--stw-shop-card));
}

.amb-loved-card__swatches span:first-child {
	background: var(--stw-shop-accent);
}

@keyframes stw-shop-card-in {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}

.stw-shop-loved-card:nth-child(1)  { animation-delay: 0.00s; }
.stw-shop-loved-card:nth-child(2)  { animation-delay: 0.05s; }
.stw-shop-loved-card:nth-child(3)  { animation-delay: 0.10s; }
.stw-shop-loved-card:nth-child(4)  { animation-delay: 0.15s; }
.stw-shop-loved-card:nth-child(5)  { animation-delay: 0.20s; }
.stw-shop-loved-card:nth-child(6)  { animation-delay: 0.25s; }
.stw-shop-loved-card:nth-child(n+7){ animation-delay: 0.00s; }

/* ── Skeleton Loading ──────────────────────────────────────── */
.stw-shop-skeleton-wrap {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.stw-shop-skeleton-card {
	border-radius: var(--stw-shop-radius);
	overflow: hidden;
	background: var(--stw-shop-card);
	border: 1px solid var(--stw-shop-border);
}

.stw-shop-skeleton-img {
	aspect-ratio: 4 / 5;
	background: linear-gradient(90deg, var(--stw-shop-border) 0%, var(--stw-shop-bg) 50%, var(--stw-shop-border) 100%);
	background-size: 200% 100%;
	animation: stw-shop-shimmer 1.4s ease-in-out infinite;
}

.stw-shop-skeleton-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; }

.stw-shop-skeleton-line {
	block-size: 13px;
	border-radius: var(--radius-corner);
	background: linear-gradient(90deg, var(--stw-shop-border) 0%, var(--stw-shop-bg) 50%, var(--stw-shop-border) 100%);
	background-size: 200% 100%;
	animation: stw-shop-shimmer 1.4s ease-in-out infinite;
}

@keyframes stw-shop-shimmer {
	0%   { background-position:  200% 0; }
	100% { background-position: -200% 0; }
}

/* ── No Products ───────────────────────────────────────────── */
.stw-shop-no-products {
	grid-column: 1 / -1;
	text-align: center;
	padding: 80px 24px;
}

.stw-shop-no-products__icon { font-size: 2.5rem; margin-block-end: 16px; opacity: 0.4; }

.stw-shop-no-products__title {
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--stw-shop-heading);
	margin: 0 0 8px;
	font-family: var(--font-heading);
}

.stw-shop-no-products__text { font-size: 0.88rem; color: var(--stw-shop-muted); margin: 0 0 24px; }

.stw-shop-no-products__reset {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--stw-shop-accent);
	color: var(--color-btn-text);
	border: none;
	border-radius: var(--stw-shop-radius-sm);
	padding: 12px 24px;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	transition: background var(--stw-shop-ease-fast);
}

.stw-shop-no-products__reset:hover { background: var(--stw-shop-accent-hover); }

/* ── Load More ─────────────────────────────────────────────── */
.stw-shop-loadmore-wrap {
	text-align: center;
	margin-block-start: 56px;
}

.stw-shop-loadmore-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: transparent;
	border: 2px solid var(--stw-shop-accent);
	color: var(--stw-shop-accent);
	border-radius: var(--stw-shop-radius-sm);
	padding: 14px 40px;
	font-size: 0.88rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: background var(--stw-shop-ease-fast), color var(--stw-shop-ease-fast), transform 0.1s;
}

.stw-shop-loadmore-btn:hover { background: var(--stw-shop-accent); color: var(--color-btn-text); }
.stw-shop-loadmore-btn:active { transform: scale(0.97); }
.stw-shop-loadmore-btn:disabled { opacity: 0.5; pointer-events: none; }

.stw-shop-loadmore-meta {
	margin: 16px 0 0;
	font-size: 0.8rem;
	color: var(--stw-shop-muted);
}

/* ── Spin animation ────────────────────────────────────────── */
.stw-shop-spin { animation: stw-shop-rotate 0.7s linear infinite; }

@keyframes stw-shop-rotate { to { transform: rotate(360deg); } }

@keyframes stw-shop-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Responsive ────────────────────────────────────────────── */

/* Tablet: sidebar collapses to off-canvas drawer */
@media (max-width: 1024px) {
	.stw-shop-shop-inner {
		display: block;
	}

	.stw-shop-sidebar {
		position: fixed;
		inset-block-start: 0;
		inset-inline-start: 0;
		block-size: 100dvh;
		max-block-size: 100dvh;
		inline-size: min(var(--stw-shop-sidebar-w), 85vw);
		border-radius: 0;
		border: none;
		border-inline-end: 1px solid var(--stw-shop-border);
		z-index: 200;
		translate: var(--stw-shop-slide) 0;
		box-shadow: var(--stw-shop-shadow-lg);
		transition: translate var(--stw-shop-ease);
	}

	[dir="rtl"] .stw-shop-sidebar {
		border-inline-end: none;
		border-inline-start: 1px solid var(--stw-shop-border);
	}

	.stw-shop-sidebar.is-open { translate: 0 0; }
	.stw-shop-sidebar__close  { display: flex; }
	.stw-shop-filter-toggle-btn { display: flex; }

	/* Show apply button inside the drawer */
	.stw-shop-sidebar__footer .stw-shop-btn--primary { display: flex; }
}

@media (max-width: 768px) {
	.stw-shop-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
	.stw-shop-skeleton-wrap { grid-template-columns: repeat(2, 1fr); gap: 14px; }
	.stw-shop-topbar__title { font-size: 1.5rem; }
	.stw-related-products--carousel { --stw-related-cols: 2; --stw-related-gap: 14px; }
	.stw-related-products--carousel .stw-related-products__header {
		align-items: flex-start;
	}
}

@media (max-width: 480px) {
	.stw-shop-grid { grid-template-columns: 1fr; gap: 12px; }
	.stw-shop-skeleton-wrap { grid-template-columns: 1fr; }
	.stw-shop-topbar { flex-direction: column; align-items: flex-start; }
	.stw-shop-topbar__right { inline-size: 100%; justify-content: space-between; }
	.stw-related-products--carousel { --stw-related-cols: 1; --stw-related-gap: 12px; }
}

@media (max-width: 1024px) and (min-width: 769px) {
	.stw-related-products--carousel { --stw-related-cols: 3; --stw-related-gap: 18px; }
}
