/* Help Me Choose – front-end.
 * Colours come from CSS variables: Settings → Theme sets them globally, Elementor style controls override per widget.
 * Layout follows the widget's own width (container queries), so it works in narrow Elementor columns too. */
.vshmc {
	--vshmc-primary: #111;
	--vshmc-accent: #ffd200;
	--vshmc-accent-text: #111;
	--vshmc-text: #1a1a1a;
	--vshmc-muted: #6b6b6b;
	--vshmc-card-bg: #fff;
	--vshmc-option-bg: #f3f3f3;
	--vshmc-option-active-bg: #fff8d6;
	--vshmc-panel-bg: #111;
	--vshmc-panel-text: #fff;
	--vshmc-panel-muted: #b8b8b8;
	--vshmc-radius: 14px;
	--vshmc-list-max: none;
	--vshmc-max-width: 1400px;
	box-sizing: border-box;
	color: var(--vshmc-text);
	width: 100%;
	max-width: var(--vshmc-max-width);
	margin-left: auto;
	margin-right: auto;
	container-type: inline-size;
	container-name: vshmc;
}
.vshmc *, .vshmc *::before, .vshmc *::after { box-sizing: border-box; }

/* ---------- Header ---------- */
.vshmc__header { text-align: center; margin-bottom: clamp(20px, 2.6cqi, 40px); }
.vshmc__title { margin: 0 0 8px; color: var(--vshmc-primary); font-size: clamp(28px, 3.2cqi, 48px); line-height: 1.1; }
.vshmc__subtitle { margin: 0; color: var(--vshmc-muted); font-size: clamp(15px, 1.2cqi, 19px); }

/* ---------- White card ---------- */
.vshmc__card {
	background: var(--vshmc-card-bg);
	border-radius: calc(var(--vshmc-radius) + 6px);
	padding: clamp(18px, 3cqi, 44px);
}

/* ---------- Layout: questions | recommendation ---------- */
.vshmc__layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
@container vshmc (min-width: 900px) {
	/* Side by side: the panel is exactly as tall as the question column; its content never stretches the row. */
	.vshmc__layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 3cqi, 52px); align-items: stretch; }
	.vshmc .vshmc__layout > .vshmc__panel { position: relative; height: auto; max-height: none; min-height: var(--vshmc-panel-min, 460px); }
	.vshmc .vshmc__layout > .vshmc__panel > .vshmc__panel-inner { position: absolute; inset: 0; }
}
.vshmc__questions { display: flex; flex-direction: column; gap: clamp(20px, 1.8cqi, 30px); }
/* The question column is its own container, so answers-per-row follows the space the questions actually get. */
.vshmc__questions, .vshmc__step { container-type: inline-size; container-name: vshmcq; }

/* ---------- Questions ---------- */
.vshmc__question {
	display: flex; align-items: center; gap: 12px;
	margin: 0 0 6px; color: var(--vshmc-primary);
	font-size: clamp(17px, 1.35cqi, 22px); font-weight: 600; line-height: 1.3; outline: none;
}
.vshmc__num {
	flex: none; display: inline-flex; align-items: center; justify-content: center;
	width: 28px; height: 28px; border-radius: 50%;
	background: var(--vshmc-primary); color: var(--vshmc-accent);
	font-size: 14px; font-weight: 700; line-height: 1;
}
.vshmc__help { margin: 0 0 10px 40px; color: var(--vshmc-muted); font-size: clamp(13px, 1cqi, 15px); line-height: 1.4; }
.vshmc__question + .vshmc__options { margin-top: 10px; }

/* ---------- Answers: even, compact grid ----------
 * Columns depend on the number of answers (vshmc__options--nX, set by JS) and the width of the question column:
 * narrow → 2 per row · ≥480px → 3 answers in one row, 4 answers 2×2, 5+ in rows of 3 · ≥760px → 4 answers in one row. */
.vshmc__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vshmc__options.vshmc__options--n1 { grid-template-columns: minmax(0, 1fr); }
@container vshmcq (min-width: 480px) {
	.vshmc__options.vshmc__options--n3, .vshmc__options.vshmc__options--n5, .vshmc__options.vshmc__options--n6,
	.vshmc__options.vshmc__options--n7, .vshmc__options.vshmc__options--n8, .vshmc__options.vshmc__options--n9 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container vshmcq (min-width: 760px) {
	.vshmc__options.vshmc__options--n4, .vshmc__options.vshmc__options--n8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container vshmcq (max-width: 240px) {
	.vshmc__options { grid-template-columns: minmax(0, 1fr); }
}
.vshmc .vshmc__option {
	display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 3px;
	width: 100%; min-width: 0; margin: 0; padding: 12px 14px;
	text-align: left; cursor: pointer;
	background: var(--vshmc-option-bg); color: var(--vshmc-text);
	border: 2px solid transparent; border-radius: calc(var(--vshmc-radius) - 4px);
	font: inherit; line-height: 1.3; text-transform: none; letter-spacing: normal; box-shadow: none; white-space: normal;
	transition: border-color .15s ease, background-color .15s ease;
}
.vshmc .vshmc__option:hover { border-color: rgba(0, 0, 0, .18); background: var(--vshmc-option-bg); color: var(--vshmc-text); }
.vshmc .vshmc__option:focus-visible { outline: 3px solid var(--vshmc-accent); outline-offset: 2px; }
.vshmc .vshmc__option.is-selected { background: var(--vshmc-option-active-bg); border-color: var(--vshmc-primary); }
.vshmc__option-label { font-size: clamp(15px, 1.1cqi, 17px); font-weight: 500; color: var(--vshmc-text); }
.vshmc__option-desc { font-size: clamp(12px, .9cqi, 14px); color: var(--vshmc-muted); line-height: 1.35; }

/* ---------- Recommendation panel ---------- */
.vshmc__panel {
	--vshmc-screen: 100vh;
	background: var(--vshmc-panel-bg); color: var(--vshmc-panel-text);
	border-radius: calc(var(--vshmc-radius) + 2px);
	container-type: inline-size;
	container-name: vshmcpanel;
	display: flex; flex-direction: column; overflow: hidden;
	/* Stacked layouts (phones, tablets, narrow columns) and step mode: as tall as the questions,
	   but never taller than ~85% of the screen (portrait or landscape) and never cramped. */
	max-height: max(var(--vshmc-panel-min-stacked, 380px), min(var(--vshmc-q-height, 9999px), calc(var(--vshmc-screen) * .85)));
}
@supports (height: 100svh) { .vshmc__panel { --vshmc-screen: 100svh; } }
.vshmc--steps .vshmc__panel { max-height: max(var(--vshmc-panel-min-stacked, 380px), min(760px, calc(var(--vshmc-screen) * .85))); }
.vshmc__panel-inner {
	flex: 1 1 auto; min-height: 0;
	display: flex; flex-direction: column;
	padding: clamp(20px, 2.6cqi, 36px);
}
.vshmc__panel-inner > * { flex: none; }

/* Scrollable product list */
.vshmc__panel-inner > .vshmc__scroll { flex: 0 1 auto; min-height: 0; position: relative; display: flex; flex-direction: column; margin-bottom: 20px; }
.vshmc__panel-inner > .vshmc__scroll:last-child { margin-bottom: 0; }
.vshmc__scroll > .vshmc__products {
	flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
	scrollbar-width: thin; scrollbar-color: rgba(127, 127, 127, .6) transparent;
	outline: none;
}
.vshmc__scroll.is-scrollable > .vshmc__products { padding-right: 10px; }
.vshmc__scroll > .vshmc__products:focus-visible { box-shadow: 0 0 0 2px var(--vshmc-accent); border-radius: 4px; }
.vshmc__scroll > .vshmc__products::-webkit-scrollbar { width: 6px; }
.vshmc__scroll > .vshmc__products::-webkit-scrollbar-track { background: rgba(127, 127, 127, .15); border-radius: 6px; }
.vshmc__scroll > .vshmc__products::-webkit-scrollbar-thumb { background: rgba(127, 127, 127, .65); border-radius: 6px; }
/* "More below" fade */
.vshmc__scroll::after {
	content: ""; position: absolute; left: 0; right: 10px; bottom: 0; height: 48px; pointer-events: none;
	background: linear-gradient(to bottom, transparent, var(--vshmc-panel-bg));
	opacity: 0; transition: opacity .2s ease;
}
.vshmc__scroll.has-more::after { opacity: 1; }
.vshmc__kicker {
	display: flex; align-items: center; gap: 10px; margin: 0 0 12px;
	color: var(--vshmc-accent); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.vshmc__kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.vshmc__result-title { margin: 0 0 10px; color: var(--vshmc-panel-text); font-size: clamp(22px, 4.6cqi, 32px); font-weight: 700; line-height: 1.2; outline: none; }
.vshmc__result-message { color: var(--vshmc-panel-text); opacity: .92; font-size: clamp(14px, 2.6cqi, 17px); line-height: 1.5; margin: 0 0 16px; }
.vshmc__result-message p { margin: 0 0 8px; }
.vshmc__result-message p:last-child { margin-bottom: 0; }
.vshmc__result-message a { color: var(--vshmc-accent); }
.vshmc__pending { display: inline-block; margin: 0 0 12px; padding: 4px 10px; border-radius: 4px; background: #fff4d6; color: #7a5b00; font-size: 12px; }
.vshmc .is-waiting .vshmc__result-message { color: var(--vshmc-panel-muted); opacity: 1; }

/* Progress (waiting state / steps mode) */
.vshmc__progress { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--vshmc-panel-muted); margin-top: 8px; }
.vshmc__progress-bar { flex: 1; height: 4px; background: rgba(127, 127, 127, .3); border-radius: 4px; overflow: hidden; }
.vshmc__progress-fill { display: block; height: 100%; background: var(--vshmc-accent); transition: width .25s ease; }
.vshmc--steps .vshmc__step .vshmc__progress { color: var(--vshmc-muted); margin: 0 0 16px; }

/* ---------- Products: image | title (full width) → price → note ---------- */
.vshmc__products { display: flex; flex-direction: column; border-top: 1px solid rgba(127, 127, 127, .35); }
.vshmc--list .vshmc__products { max-height: var(--vshmc-list-max); }
.vshmc-product {
	display: grid; grid-template-columns: clamp(52px, 13cqi, 84px) minmax(0, 1fr); column-gap: clamp(12px, 3cqi, 18px); align-items: start;
	padding: 16px 0; border-bottom: 1px solid rgba(127, 127, 127, .35);
}
.vshmc-product:not(:has(.vshmc-product__image)) { grid-template-columns: minmax(0, 1fr); }
.vshmc-product__image { display: block; background: #fff; border-radius: 10px; overflow: hidden; }
.vshmc-product__image img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; margin: 0; }
.vshmc-product__info { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.vshmc .vshmc-product__name {
	color: var(--vshmc-panel-text); font-weight: 600; font-size: clamp(15px, 2.7cqi, 18px); line-height: 1.4; text-decoration: none;
	overflow-wrap: anywhere;
}
.vshmc .vshmc-product__name:hover, .vshmc .vshmc-product__name:focus { color: var(--vshmc-panel-text); text-decoration: underline; }
.vshmc .vshmc-product__price { color: var(--vshmc-accent); font-weight: 700; font-size: clamp(14px, 2.5cqi, 17px); line-height: 1.4; }
.vshmc .vshmc-product__price .amount, .vshmc .vshmc-product__price ins, .vshmc .vshmc-product__price bdi { color: inherit; text-decoration: none; background: none; font-weight: 700; }
.vshmc .vshmc-product__price del, .vshmc .vshmc-product__price del .amount, .vshmc .vshmc-product__price del bdi { color: var(--vshmc-panel-muted); opacity: .8; font-weight: 400; text-decoration: line-through; margin-right: 6px; }
.vshmc-product__from { text-transform: none; }
.vshmc .vshmc-product__price .amount { white-space: nowrap; }
.vshmc-product__note { font-size: clamp(13px, 2.3cqi, 15px); color: var(--vshmc-panel-muted); line-height: 1.45; }
/* Price + size variations on one line (wraps only when there is no room) */
.vshmc-product__meta { display: flex; flex-wrap: wrap; align-items: center; column-gap: 10px; row-gap: 4px; }
.vshmc-product__sizes { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; min-width: 0; }
.vshmc-size {
	display: inline-block; padding: 1px 5px; border-radius: 4px;
	border: 1px solid rgba(127, 127, 127, .45); color: var(--vshmc-panel-muted);
	font-size: 11px; font-weight: 500; line-height: 1.45; white-space: nowrap; letter-spacing: 0;
}
.vshmc-size--more { border-style: dashed; }
.vshmc-sizes__chips { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.vshmc-sizes__range { display: none; }
@container vshmcpanel (max-width: 420px) {
	.vshmc-product__sizes:has(.vshmc-sizes__range) .vshmc-sizes__chips { display: none; }
	.vshmc-sizes__range { display: inline-flex; }
}
/* Highlight label ("Most popular" or the admin's own label) */
.vshmc-product__badge {
	align-self: flex-start; display: inline-flex; align-items: center; gap: 5px;
	padding: 3px 9px; border-radius: 999px;
	background: var(--vshmc-badge-bg, var(--vshmc-accent)); color: var(--vshmc-badge-text, var(--vshmc-accent-text));
	font-size: 11px; font-weight: 700; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase;
}
.vshmc-product__badge[hidden] { display: none; }
.vshmc-product__badge::before { content: "\2605"; font-size: 10px; }
.vshmc-product.has-badge .vshmc-product__image { box-shadow: 0 0 0 2px var(--vshmc-badge-bg, var(--vshmc-accent)); }
.vshmc .is-popular .vshmc__progress { margin: 0 0 14px; }
.vshmc .is-popular .vshmc__hint { color: var(--vshmc-panel-muted); opacity: 1; margin-bottom: 10px; }
.vshmc-product__actions { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* Optional grid layout for products */
.vshmc--grid .vshmc__products { display: grid; grid-template-columns: repeat(var(--vshmc-cols, 2), minmax(0, 1fr)); gap: 16px; border-top: 0; }
.vshmc--grid .vshmc-product, .vshmc--grid .vshmc-product:not(:has(.vshmc-product__image)) { grid-template-columns: minmax(0, 1fr); row-gap: 10px; padding: 0 0 16px; }
.vshmc--grid .vshmc-product__actions { grid-column: auto; }

/* ---------- Buttons ---------- */
.vshmc__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.vshmc__nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.vshmc .vshmc-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 50px; padding: 12px 26px; margin: 0; border-radius: 6px; cursor: pointer;
	background: var(--vshmc-primary); color: #fff; border: 2px solid var(--vshmc-primary);
	font: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; text-decoration: none; text-transform: none; letter-spacing: normal;
	transition: opacity .15s ease, background-color .15s ease;
}
.vshmc .vshmc-btn:hover, .vshmc .vshmc-btn:focus { opacity: .88; text-decoration: none; }
.vshmc .vshmc-btn[disabled] { opacity: .4; cursor: not-allowed; }
.vshmc .vshmc-btn--accent { background: var(--vshmc-accent); border-color: var(--vshmc-accent); color: var(--vshmc-accent-text); }
.vshmc .vshmc-btn--accent:hover, .vshmc .vshmc-btn--accent:focus { color: var(--vshmc-accent-text); }
.vshmc .vshmc-btn--outline { background: transparent; border-color: rgba(127, 127, 127, .6); border-width: 1px; color: var(--vshmc-panel-text); }
.vshmc .vshmc-btn--outline:hover, .vshmc .vshmc-btn--outline:focus { color: var(--vshmc-panel-text); border-color: var(--vshmc-panel-text); opacity: 1; }
.vshmc .vshmc-btn--ghost { background: transparent; color: var(--vshmc-primary); min-height: 42px; padding: 8px 18px; font-size: 15px; }
.vshmc .vshmc-btn--ghost:hover, .vshmc .vshmc-btn--ghost:focus { color: var(--vshmc-primary); }
.vshmc .vshmc-btn--cart { background: var(--vshmc-accent); border-color: var(--vshmc-accent); color: var(--vshmc-accent-text); min-height: 0; padding: 7px 14px; font-size: 13px; }
.vshmc .vshmc-btn--view { min-height: 0; padding: 7px 14px; font-size: 13px; background: transparent; color: var(--vshmc-panel-text); border-color: rgba(127, 127, 127, .6); border-width: 1px; }
.vshmc .vshmc-btn.added::after { content: " \2713"; }
.vshmc .added_to_cart { color: var(--vshmc-accent); font-size: 13px; }

/* Steps mode */


/* ---------- Narrow widgets / phones ---------- */
@container vshmc (max-width: 600px) {
	.vshmc__questions { gap: 22px; }
	.vshmc__help { margin-left: 0; }
	.vshmc__card { padding: 16px; }
	.vshmc__panel-inner { padding: 20px; }
	.vshmc__actions { flex-direction: column; gap: 10px; }
	.vshmc__actions .vshmc-btn { width: 100%; }
	.vshmc--grid .vshmc__products { grid-template-columns: 1fr; }
}
@container vshmc (max-width: 400px) {
	.vshmc .vshmc__option { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.vshmc .vshmc__option, .vshmc__progress-fill, .vshmc .vshmc-btn { transition: none; }
}

/* Short screens (phones in landscape, small laptops): compact panel header so more products are visible. */
@media (max-height: 560px) {
	.vshmc__panel { --vshmc-panel-min-stacked: 340px; }
	.vshmc__panel-inner { padding: 14px 18px; }
	.vshmc__kicker { margin-bottom: 6px; font-size: 11px; }
	.vshmc__result-title { font-size: 20px; margin-bottom: 4px; }
	.vshmc__result-message { font-size: 13px; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.vshmc__panel .vshmc__progress { margin: 0 0 8px; }
	.vshmc-product { padding: 10px 0; grid-template-columns: 52px minmax(0, 1fr); }
	.vshmc__panel-inner > .vshmc__scroll { margin-bottom: 10px; }
	.vshmc .vshmc__actions .vshmc-btn { min-height: 40px; padding: 8px 18px; font-size: 14px; }
	.vshmc__actions { flex-direction: row; }
	.vshmc__actions .vshmc-btn { width: auto; }
}
