/* ==========================================================================
   Heaven — product page
   ========================================================================== */

.hv-product__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr); /* A wide table in the details once stretched the column and the whole page past the phone's edge. */
	gap: 20px;
	padding-bottom: clamp(40px, 6vw, 72px);
}

/* ---------- Gallery ---------- */
.hv-gallery {
	position: relative;
	margin-inline: calc(var(--gutter) * -1);
}

.hv-gallery__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.hv-gallery__track::-webkit-scrollbar { display: none; }

.hv-gallery__slide {
	flex: 0 0 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	position: relative;
	aspect-ratio: 2 / 3;
	background: var(--c-sand);
	overflow: hidden;
}

.hv-gallery__zoom {
	display: block;
	width: 100%;
	height: 100%;
	cursor: zoom-in;
}

.hv-gallery__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* A clip from the shoot: the cover is in the photo's place, the video fades in over it once it plays.
   The clips are the phone's 9:16; the 2:3 frame keeps their upper middle, where the face and the garment are. */
.hv-gallery__poster,
.hv-gallery__video {
	object-position: 50% 40%;
}

.hv-gallery__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity .35s var(--ease);
	pointer-events: none;
}

.hv-gallery__slide.is-playing .hv-gallery__video { opacity: 1; }
.hv-gallery__video[src$="#t=0.001"] { opacity: 1; } /* No cover: the first frame is the cover. */

.hv-gallery__play,
.hv-lightbox__play {
	position: absolute;
	left: 50%;
	top: 50%;
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .9);
	color: var(--c-ink);
	box-shadow: 0 6px 24px rgba(31, 27, 24, .18);
	pointer-events: none;
	transition: opacity .3s var(--ease), transform .3s var(--ease);
}

.hv-gallery__play svg,
.hv-lightbox__play svg { width: 26px; height: 26px; margin-left: 3px; }
.hv-gallery__slide.is-playing .hv-gallery__play { opacity: 0; transform: scale(.8); }

/* On a clip: the way into the Reels feed, opened at this very clip. Glass, like the counter opposite. */
.hv-gallery__reel {
	position: absolute;
	left: 12px;
	bottom: 12px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px 8px 10px;
	border-radius: var(--r-pill);
	background: var(--glass-photo);
	-webkit-backdrop-filter: var(--glass-photo-filter);
	backdrop-filter: var(--glass-photo-filter);
	box-shadow: var(--glass-photo-shadow);
	color: var(--c-ink);
	font: 600 .75rem/1 var(--f-sans);
	white-space: nowrap;
}

/* A finger needs more than the 32px the pill shows. */
.hv-gallery__reel::before {
	content: '';
	position: absolute;
	inset: -7px -4px;
}

.hv-gallery__reel svg { flex: none; }

.hv-gallery__counter {
	position: absolute;
	right: 12px;
	bottom: 12px;
	padding: 7px 12px;
	border-radius: var(--r-pill);
	background: var(--glass-photo); /* Glass, like the round buttons on the cards; its rim is in main.css, «Glass rim». */
	-webkit-backdrop-filter: var(--glass-photo-filter);
	backdrop-filter: var(--glass-photo-filter);
	box-shadow: var(--glass-photo-shadow);
	font: 600 .75rem/1 var(--f-sans);
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

.hv-gallery__badges { left: 12px; top: 12px; }

@media (min-width: 1024px) {
	.hv-product__layout {
		grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr);
		gap: clamp(32px, 4vw, 72px);
		align-items: start;
	}

	.hv-gallery { margin-inline: 0; }

	.hv-gallery__track {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		overflow: visible;
	}

	.hv-gallery__slide { border-radius: var(--r-sm); }
	.hv-gallery__slide img { transition: transform .9s var(--ease); }
	.hv-gallery__zoom:hover img,
	.hv-gallery__zoom:hover video { transform: scale(1.03); }
	.hv-gallery__video { transition: opacity .35s var(--ease), transform .9s var(--ease); }
	.hv-gallery__badges { left: 16px; top: 16px; }

	.hv-buybox {
		position: sticky;
		top: calc(var(--header-h) + 20px);
		max-height: calc(100dvh - var(--header-h) - 40px);
		overflow-y: auto;
		scrollbar-width: none;
		padding-bottom: 8px;
	}

	.hv-buybox::-webkit-scrollbar { display: none; }
}

/* ---------- Buy box ---------- */
.hv-buybox__title {
	font-size: clamp(1.875rem, 1.5rem + 1.6vw, 2.75rem);
	line-height: 1.05;
}

.hv-buybox__rating {
	display: inline-flex;
	margin-top: 10px;
	min-height: 32px;
}

.hv-buybox__rating:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }

.hv-buybox__price {
	display: flex;
	margin-top: 14px;
	font-size: 1.375rem;
}

.hv-buybox__short {
	margin-top: 14px;
	color: var(--c-ink-2);
	line-height: 1.6;
}

.hv-buy { margin-top: 22px; }

.hv-buy__stock {
	margin-top: 14px;
	font: 600 .875rem/1.3 var(--f-sans);
	color: var(--c-ink-2);
}

.hv-buy__stock.is-low { color: var(--c-clay); }

.hv-buy__actions {
	display: flex;
	gap: 10px;
	margin-top: 18px;
}

.hv-buy__submit { flex: 1; }

.hv-buy__wish {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 1px solid var(--c-line);
	border-radius: 50%;
	background: var(--c-surface);
	transition: border-color var(--t-fast), transform var(--t-fast);
}

.hv-buy__wish:hover { border-color: var(--c-ink); }
.hv-buy__wish:active { transform: scale(.92); }

.hv-buy__quick {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 48px;
	margin-top: 6px;
	font: 600 .875rem/1 var(--f-sans);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.hv-assure {
	display: grid;
	gap: 12px;
	margin-top: 18px;
	padding: 18px;
	border-radius: var(--r-md);
	background: var(--c-sand);
	font-size: var(--fs-sm);
	line-height: 1.4;
}

.hv-assure li {
	display: flex;
	align-items: center;
	gap: 12px;
}

.hv-assure .hv-icon { flex: none; }

.hv-benefits {
	display: grid;
	gap: 8px;
	margin-top: 20px;
	font-size: .9375rem;
}

.hv-benefits li { display: flex; gap: 10px; }
.hv-benefits .hv-icon { flex: none; margin-top: 3px; color: var(--c-success); }

.hv-facts { margin-top: 28px; }
.hv-facts__list { margin-top: 10px; border-top: 1px solid var(--c-line); }

.hv-facts__row {
	display: grid;
	grid-template-columns: minmax(110px, 38%) 1fr;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px solid var(--c-line);
	font-size: var(--fs-sm);
	line-height: 1.45;
}

.hv-facts__row dt { color: var(--c-ink-2); }
.hv-facts__row dd { font-weight: 500; }

.hv-details { margin-top: 12px; }
.hv-details .hv-acc:last-child { border-bottom: 0; }

/* «Заміри виробу»: measurements down, sizes across. */
.hv-measures th[scope="row"] { font-weight: 500; color: var(--c-ink); }
.hv-measures thead th:not(:first-child),
.hv-measures td { width: 3.25em; padding-inline: 4px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hv-measures th:first-child { padding-left: 0; }
.hv-measures tr > :last-child { padding-right: 0; }

/* ---------- Sticky buy bar ---------- */
/* A glass capsule, floating where the tab bar floats on the other pages; the button in it stays solid. */
.hv-buybar {
	position: fixed;
	left: max(12px, env(safe-area-inset-left, 0px));
	right: max(12px, env(safe-area-inset-right, 0px));
	bottom: var(--tabbar-gap);
	z-index: 44;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 520px;
	margin-inline: auto;
	padding: 6px 6px 6px 20px;
	border-radius: var(--r-pill);
	background: var(--glass);
	-webkit-backdrop-filter: var(--glass-filter);
	backdrop-filter: var(--glass-filter);
	box-shadow: var(--glass-shadow-dock); /* The short one: nothing of it reaches the bottom edge (main.css). */
	transform: translateY(calc(100% + var(--tabbar-gap) + 40px)); /* Down past the edge, shadow and all. */
	transition: transform var(--t) var(--ease);
}

.hv-buybar.is-visible { transform: none; }
.hv-buybar__info { flex: 1; min-width: 0; display: grid; gap: 2px; }

.hv-buybar__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: .8125rem;
	color: var(--c-ink); /* Not --c-ink-2: a dark photo or the dark footer may pass under the glass. */
}

.hv-buybar .hv-btn { flex: none; min-height: 48px; padding-inline: 22px; }

@media (min-width: 1024px) {
	.hv-buybar { display: none; }
}

/* ---------- Full-screen photo viewer ---------- */
dialog.hv-lightbox { background: var(--c-bg); }
dialog.hv-lightbox::backdrop { background: var(--c-bg); }

.hv-lightbox__panel {
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	background: var(--c-bg);
	opacity: 0;
	transform: scale(.985);
	transition: opacity .22s var(--ease), transform .28s var(--ease);
	will-change: transform, opacity;
}

dialog.hv-lightbox.is-open .hv-lightbox__panel {
	opacity: 1;
	transform: none;
}

.hv-lightbox__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: max(10px, env(safe-area-inset-top, 0px)) 10px 6px 16px;
}

.hv-lightbox__counter {
	padding: 8px 14px;
	border-radius: var(--r-pill);
	background: rgba(31, 27, 24, .06);
	font: 600 .8125rem/1 var(--f-sans);
	font-variant-numeric: tabular-nums;
}

.hv-lightbox__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 1px solid var(--c-line);
	border-radius: 50%;
	background: var(--c-surface);
	color: var(--c-ink);
	transition: transform var(--t-fast), border-color var(--t-fast);
}

.hv-lightbox__close:hover { border-color: var(--c-ink); }
.hv-lightbox__close:active { transform: scale(.92); }

/* Photos: native horizontal scroll-snap, one photo per screen. */
.hv-lightbox__track {
	display: flex;
	min-height: 0;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	overscroll-behavior: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.hv-lightbox__track::-webkit-scrollbar { display: none; }
.hv-lightbox__track.is-zoomed { overflow-x: hidden; }

.hv-lightbox__slide {
	position: relative;
	flex: 0 0 100%;
	min-width: 0;
	height: 100%;
	overflow: hidden;
	scroll-snap-align: center;
	scroll-snap-stop: always;
	touch-action: pan-x;
	cursor: zoom-in;
	user-select: none;
	-webkit-user-select: none;
}

.hv-lightbox__slide.is-zoomed {
	touch-action: none;
	cursor: zoom-out;
}

.hv-lightbox__zoom {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: center / contain no-repeat content-box;
	transform-origin: 0 0;
	will-change: transform;
}

.hv-lightbox__slide--video { cursor: pointer; }

.hv-lightbox__video {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	pointer-events: none;
}

/* The sign shows only while the visitor holds the clip paused (a tap resumes it). */
.hv-lightbox__play { opacity: 0; transform: scale(.8); }
.hv-lightbox__slide.is-paused .hv-lightbox__play { opacity: 1; transform: none; }

.hv-lightbox__img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	pointer-events: none;
	-webkit-user-drag: none;
}

/* Thumbnails: where you are and a one-tap jump, within thumb reach. */
.hv-lightbox__thumbs {
	display: flex;
	gap: 8px;
	padding: 12px 16px calc(14px + var(--safe-b));
	overflow-x: auto;
	scrollbar-width: none;
	transition: opacity var(--t-fast);
}

.hv-lightbox__thumbs::-webkit-scrollbar { display: none; }
.hv-lightbox__thumb:first-child { margin-left: auto; }
.hv-lightbox__thumb:last-child { margin-right: auto; }

.hv-lightbox__thumb {
	flex: none;
	width: 48px;
	aspect-ratio: 2 / 3;
	padding: 0;
	border-radius: var(--r-sm);
	background: var(--c-sand);
	overflow: hidden;
	opacity: .5;
	outline: 2px solid transparent;
	outline-offset: 2px;
	transition: opacity var(--t-fast), outline-color var(--t-fast);
}

.hv-lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; }
.hv-lightbox__thumb--video { position: relative; }

.hv-lightbox__thumb-play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	color: #fff;
	background: rgba(31, 27, 24, .18);
}

.hv-lightbox__thumb-play svg { width: 18px; height: 18px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); }
.hv-lightbox__thumb:hover { opacity: .8; }

.hv-lightbox__thumb.is-active {
	opacity: 1;
	outline-color: var(--c-ink);
}

/* While zoomed the photo is the only thing that matters. */
.hv-lightbox__panel.is-zoomed .hv-lightbox__thumbs,
.hv-lightbox__panel.is-zoomed .hv-lightbox__nav { opacity: 0; pointer-events: none; }

.hv-lightbox__nav {
	position: absolute;
	top: 50%;
	display: none;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-top: -26px;
	border: 1px solid var(--c-line);
	border-radius: 50%;
	background: var(--c-surface);
	color: var(--c-ink);
	transition: opacity var(--t-fast), border-color var(--t-fast);
}

.hv-lightbox__nav--prev { left: 24px; }
.hv-lightbox__nav--next { right: 24px; }
.hv-lightbox__nav:hover { border-color: var(--c-ink); }
.hv-lightbox__nav[disabled] { opacity: .3; cursor: default; }

@media (hover: hover) and (pointer: fine) {
	.hv-lightbox__nav { display: inline-flex; }
	.hv-lightbox__zoom { padding: 8px 96px; }
	.hv-lightbox__bar { padding: 16px 24px 8px; }
	.hv-lightbox__thumb { width: 56px; }
}

.hv-lightbox__hint {
	position: absolute;
	left: 50%;
	bottom: calc(104px + var(--safe-b));
	width: max-content;
	max-width: calc(100% - 32px);
	padding: 10px 16px;
	border-radius: var(--r-pill);
	background: rgba(31, 27, 24, .86);
	color: #fff;
	font: 500 .8125rem/1.3 var(--f-sans);
	text-align: center;
	opacity: 0;
	transform: translate(-50%, 8px);
	transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
	pointer-events: none;
}

.hv-lightbox__hint.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

/* ---------- Reviews ---------- */
.hv-reviews {
	display: grid;
	gap: 32px;
}

@media (min-width: 900px) {
	.hv-reviews { grid-template-columns: minmax(260px, 340px) 1fr; gap: 64px; align-items: start; }
	.hv-reviews__summary { position: sticky; top: calc(var(--header-h) + 24px); }
}

.hv-reviews__summary { display: grid; gap: 20px; justify-items: start; }
.hv-reviews__score { display: flex; align-items: center; gap: 16px; }
.hv-reviews__avg { font: 500 3.5rem/1 var(--f-serif); font-variant-numeric: lining-nums; }
.hv-fit { display: grid; gap: 8px; width: 100%; }

.hv-fit__row {
	display: grid;
	grid-template-columns: 110px 1fr 40px;
	align-items: center;
	gap: 10px;
	font-size: .8125rem;
}

.hv-fit__bar { height: 4px; border-radius: var(--r-pill); background: var(--c-line); overflow: hidden; }
.hv-fit__bar span { display: block; height: 100%; background: var(--c-ink); }
.hv-reviews__list { display: grid; gap: 12px; }

.hv-review {
	padding: 20px;
	border-radius: var(--r-md);
	background: var(--c-surface);
}

.hv-review__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hv-review__date { font-size: .8125rem; color: var(--c-ink-3); }
.hv-review__text { margin-top: 10px; line-height: 1.6; }
.hv-review__text p + p { margin-top: .6em; }

.hv-review__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 14px;
	margin-top: 12px;
	font-size: .8125rem;
	color: var(--c-ink-2);
}

.hv-review__foot strong { color: var(--c-ink); }
.hv-review__verified { display: inline-flex; align-items: center; gap: 4px; color: var(--c-success); }

/* The store's answer under a review. */
.hv-review__reply {
	margin-top: 14px;
	padding: 12px 14px;
	border-left: 2px solid var(--c-sky-ink);
	border-radius: 0 var(--r-sm) var(--r-sm) 0;
	background: var(--c-bg);
}

.hv-review__reply-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .8125rem; }
.hv-review__reply-badge { padding: 2px 7px; border-radius: var(--r-pill); background: var(--c-sky); color: var(--c-sky-ink); font-size: .6875rem; font-weight: 700; }
.hv-review__reply-text { margin-top: 6px; font-size: .9375rem; line-height: 1.55; overflow-wrap: anywhere; }
.hv-review__reply-text p + p { margin-top: .5em; }

.hv-reviewform {
	margin-top: 24px;
	padding: 24px 20px;
	border-radius: var(--r-md);
	background: var(--c-surface);
}

.hv-reviewform__form { display: grid; gap: 16px; margin-top: 16px; }
.hv-reviewform .form-submit { margin: 0; }
.hv-reviewform .comment-form-cookies-consent { display: flex; gap: 10px; font-size: .8125rem; color: var(--c-ink-2); }

.hv-rate { border: 0; margin: 0; padding: 0; }

.hv-rate__stars {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 2px;
	margin-top: 6px;
}

.hv-rate__stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hv-rate__stars label { cursor: pointer; padding: 6px 2px; }
.hv-rate__stars svg { fill: var(--c-line); transition: fill var(--t-fast); }

.hv-rate__stars label:hover svg,
.hv-rate__stars label:hover ~ label svg,
.hv-rate__stars input:checked ~ label svg { fill: #C9973B; }

.hv-rate__stars input:focus-visible + label { outline: 2px solid var(--c-ink); outline-offset: 2px; border-radius: 4px; }

.hv-review-field { display: grid; gap: 6px; }
.hv-review-fields { display: grid; gap: 16px; }

@media (min-width: 600px) {
	.hv-review-fields { grid-template-columns: 1fr 1fr; }
	.hv-review-field--fit { grid-column: 1 / -1; }
}

.hv-review-field__options { display: flex; flex-wrap: wrap; gap: 8px; }

.hv-quickorder { display: grid; gap: 16px; }
.hv-quickorder__summary { font-weight: 600; }
.hv-quickorder__summary:empty { display: none; }

/* Colour switch: the neighbouring product page cross-fades in instead of flashing.
   Other navigations skip the transition (heaven_color_swap_head()). */
@media (prefers-reduced-motion: no-preference) {
	@view-transition { navigation: auto; }

	::view-transition-old(root),
	::view-transition-new(root) { animation-duration: .2s; }
}

/* Review form: problems are reported next to the field, the result right above the list. */
.hv-reviewform__error:empty { display: none; }
.hv-reviewform .hv-field__error { margin-top: 6px; }
.hv-rate.is-error .hv-rate__stars svg { fill: var(--c-blush); }
.hv-reviews__sent { scroll-margin-top: calc(var(--header-h) + 24px); }
.hv-reviews__sent:focus { outline: none; }

/* Review form: the fit question is a fieldset without the browser's frame; options sit apart for a thumb. */
fieldset.hv-review-field { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.hv-review-field legend { margin-bottom: 8px; padding: 0; }
.hv-review-field__options { gap: 10px 22px; }
.hv-reviewform__remember { color: var(--c-ink-2); }

/* ---------- Photo tags: Instagram-style dots on product photos ---------- */

.hv-tags {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
}

.hv-tag {
	--tx: -50%;
	position: absolute;
	width: 0;
	height: 0;
}

.hv-tag.is-open { z-index: 2; }
.hv-tag--start { --tx: -18px; }
.hv-tag--end { --tx: calc(-100% + 18px); }

.hv-tag__dot {
	position: absolute;
	left: -16px;
	top: -16px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	pointer-events: auto;
	cursor: pointer;
}

.hv-tag__dot::before,
.hv-tag__dot::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 14px;
	height: 14px;
	margin: -7px 0 0 -7px;
	border-radius: 50%;
}

.hv-tag__dot::before {
	background: #fff;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, .35), 0 2px 8px rgba(31, 27, 24, .35);
	transition: transform var(--t-fast) var(--ease);
}

.hv-tag__dot::after {
	border: 2px solid #fff;
	opacity: 0;
	animation: hv-tag-pulse 1.8s var(--ease) .6s 2;
}

.hv-tag.is-open .hv-tag__dot::before,
.hv-tag__dot:focus-visible::before { transform: scale(1.2); }

@keyframes hv-tag-pulse {
	0% { transform: scale(1); opacity: .9; }
	100% { transform: scale(2.6); opacity: 0; }
}

.hv-tag__label {
	position: absolute;
	left: 0;
	bottom: 18px;
	display: flex;
	align-items: center;
	gap: 8px;
	width: max-content;
	max-width: min(230px, 64vw);
	padding: 9px 8px 9px 12px;
	border-radius: var(--r-sm);
	background: rgba(255, 255, 255, .97);
	box-shadow: var(--shadow-2);
	color: var(--c-ink);
	font: 500 .8125rem/1.25 var(--f-sans);
	text-decoration: none;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate(var(--tx), 6px);
	transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility 0s linear var(--t-fast);
}

/* Keeps the hover alive while the pointer travels from the dot to the label. */
.hv-tag__label::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -18px;
	height: 18px;
}

.hv-tag--below .hv-tag__label { bottom: auto; top: 18px; transform: translate(var(--tx), -6px); }
.hv-tag--below .hv-tag__label::before { bottom: auto; top: -18px; }

.hv-tag__name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.hv-tag__price { flex: none; font-weight: 700; white-space: nowrap; }
.hv-tag__label .hv-icon { flex: none; color: var(--c-ink-3); }

.hv-tag.is-open .hv-tag__label,
.hv-gallery.is-tags-on .hv-tag__label {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate(var(--tx), 0);
	transition-delay: 0s;
}

@media (hover: hover) {
	.hv-tag:hover .hv-tag__label {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translate(var(--tx), 0);
		transition-delay: 0s;
	}

	.hv-tag__label:hover { background: #fff; }
}

.hv-tags__toggle {
	position: absolute;
	left: 12px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 30px;
	padding: 0 11px 0 9px;
	border-radius: var(--r-pill);
	background: rgba(255, 255, 255, .88);
	color: var(--c-ink);
	font: 600 .75rem/1 var(--f-sans);
	pointer-events: auto;
	cursor: pointer;
	transition: background var(--t-fast), color var(--t-fast);
}

.hv-gallery.is-tags-on .hv-tags__toggle { background: var(--c-ink); color: #fff; }

@media (prefers-reduced-motion: reduce) {
	.hv-tag__dot::after { animation: none; }
	.hv-tag__label { transition: none; }
}

/* ---------- Set contents / «this piece comes in a set» ---------- */

.hv-setbox {
	margin-top: 20px;
	padding: 14px 14px 12px;
	border: 1px solid var(--c-line);
	border-radius: var(--r-md);
	background: var(--c-surface);
}

.hv-setbox .hv-eyebrow { margin: 0 0 8px 4px; }

.hv-setbox__list {
	display: grid;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hv-setbox__item {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) auto 18px;
	gap: 12px;
	align-items: center;
	padding: 5px 4px;
	border-radius: var(--r-sm);
	color: inherit;
	text-decoration: none;
	transition: background var(--t-fast);
}

.hv-setbox__item:hover { background: var(--c-sand); }

.hv-setbox__media {
	display: block;
	width: 44px;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	border-radius: var(--r-xs);
	background: var(--c-sand);
}

.hv-setbox__media img { width: 100%; height: 100%; object-fit: cover; }
.hv-setbox__name { font-size: .9375rem; line-height: 1.3; }
.hv-setbox__price { font-weight: 600; white-space: nowrap; }
.hv-setbox__go { color: var(--c-ink-3); }

.hv-setbox__sum {
	margin: 10px 4px 0;
	padding-top: 10px;
	border-top: 1px dashed var(--c-line);
	font-size: .9375rem;
	line-height: 1.5;
}

.hv-setbox__sum s { color: var(--c-ink-3); }

.hv-setbox__save {
	display: inline-block;
	padding: 2px 8px;
	border-radius: var(--r-pill);
	background: var(--c-blush);
	color: var(--c-clay);
	font: 600 .75rem/1.4 var(--f-sans);
	white-space: nowrap;
}

.hv-setbox__sum .hv-setbox__save { margin-left: 2px; }
.hv-setbox__name .hv-setbox__save { display: table; margin-top: 4px; }

.hv-setbox__note {
	margin: 8px 4px 0;
	color: var(--c-ink-3);
	font-size: .8125rem;
	line-height: 1.45;
}

/* ---------- Size finder: the button under the size buttons ---------- */
.hv-fitcta,
.hv-sizer {
	/* Dawn: peach, cream, sky — the ring around «your size». */
	--fit-a: #EFAE8F;
	--fit-b: #F6E3D6;
	--fit-c: #9DBBD1;
}

.hv-fitcta {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin-top: 16px;
	padding: 10px 12px 10px 10px;
	border: 1px solid var(--c-line);
	border-radius: var(--r-lg);
	background: linear-gradient(115deg, #FFF7F2 0%, var(--c-surface) 45%, #F1F6FA 100%);
	text-align: left;
	transition: border-color var(--t-fast), box-shadow var(--t), transform var(--t-fast);
}

.hv-fitcta:active { transform: scale(.99); }

.hv-fitcta__halo {
	position: relative;
	flex: none;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	color: var(--c-ink-2);
	font: 600 1.0625rem/1 var(--f-serif);
}

/* The ring turns slowly; the letter inside stands still. */
.hv-fitcta__halo::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: conic-gradient(from 200deg, var(--fit-a), var(--fit-b), var(--fit-c), var(--fit-b), var(--fit-a));
}

.hv-fitcta__halo::after {
	content: '';
	position: absolute;
	inset: 2.5px;
	border-radius: 50%;
	background: var(--c-surface);
}

.hv-fitcta__halo > * { position: relative; z-index: 1; }
.hv-fitcta[data-state="yours"] .hv-fitcta__halo { color: var(--c-ink); }
.hv-fitcta[data-state="yours"] .hv-fitcta__halo .hv-icon { display: none; }

.hv-fitcta__text { flex: 1; min-width: 0; }
.hv-fitcta__text strong { display: block; font: 600 .9375rem/1.25 var(--f-sans); }

.hv-fitcta__text small {
	display: block;
	margin-top: 2px;
	color: var(--c-ink-2);
	font-size: .8125rem;
	line-height: 1.3;
}

.hv-fitcta__go { flex: none; color: var(--c-ink-3); transition: transform var(--t) var(--ease); }

@media (hover: hover) {
	.hv-fitcta:hover { border-color: var(--c-ink-3); box-shadow: var(--shadow-1); }
	.hv-fitcta:hover .hv-fitcta__go { transform: translateX(3px); }
}

.hv-fitcta:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 3px; }

/* ---------- Size finder: the sheet ---------- */
.hv-sizer__body {
	display: grid;
	align-content: start;
	gap: 16px;
	padding-top: 14px;
}

.hv-sizer__stage {
	display: grid;
	grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
	align-items: center;
	gap: 4px;
	padding: 8px 12px 4px 4px;
	border-radius: var(--r-lg);
	background:
		radial-gradient(110% 80% at 12% 0%, #FDEFE7 0%, rgba(253, 239, 231, 0) 62%),
		radial-gradient(110% 90% at 100% 100%, #E3EDF4 0%, rgba(227, 237, 244, 0) 60%),
		var(--c-bg);
}

.hv-sizer__svg { display: block; width: 100%; height: auto; max-height: 216px; overflow: visible; }

/* On a screen tall enough the picture and the answer stay in view while the controls scroll under them. */
@media (min-height: 700px) {
	.hv-sizer__stage { position: sticky; top: 0; z-index: 2; box-shadow: 0 0 0 8px var(--c-surface), 0 14px 16px -8px rgba(31, 27, 24, .1); }
}

@media (min-width: 768px) {
	.hv-sizer__svg { max-height: 244px; }
}

.hv-sizer__ground { fill: rgba(31, 27, 24, .07); }
.hv-sizer__stand { fill: none; stroke: #BDAE9F; stroke-width: 3.5; stroke-linecap: round; }
.hv-sizer__torso { fill: url(#hv-fit-skin); stroke: #CDB6A6; stroke-width: 1.2; }
.hv-sizer__cap { fill: #DCCABB; stroke: #CDB6A6; stroke-width: 1; }
.hv-sizer__seam { fill: none; stroke: rgba(31, 27, 24, .16); stroke-width: 1; stroke-dasharray: 2 4; }
.hv-sizer__tape { fill: none; stroke: rgba(31, 27, 24, .13); stroke-width: 1; }

.hv-sizer__cloth {
	fill: url(#hv-fit-cloth);
	stroke: rgba(63, 95, 122, .8);
	stroke-width: 1.2;
	stroke-linejoin: round;
	opacity: 0;
}

.hv-sizer__dot {
	fill: var(--c-surface);
	stroke: var(--c-ink-3);
	stroke-width: 3;
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
	transform: scale(.3);
	transition: opacity var(--t), transform .4s var(--ease), stroke var(--t);
}

.hv-sizer__dot.is-on { opacity: 1; transform: none; }
.hv-sizer__dot[data-tone="right"] { stroke: var(--c-success); }
.hv-sizer__dot[data-tone="loose"] { stroke: var(--c-sky-ink); }
.hv-sizer__dot[data-tone="snug"] { stroke: var(--c-clay); }

.hv-sizer__answer {
	display: grid;
	justify-items: center;
	gap: 8px;
	text-align: center;
}

.hv-sizer__eyebrow {
	color: var(--c-ink-3);
	font: 600 .6875rem/1 var(--f-sans);
	letter-spacing: .14em;
	text-transform: uppercase;
}

.hv-sizer__halo {
	position: relative;
	display: grid;
	place-items: center;
	width: 112px;
	aspect-ratio: 1;
}

/* A soft glow behind the ring once there is an answer. */
.hv-sizer__halo::before {
	content: '';
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(239, 174, 143, .5), rgba(157, 187, 209, .28) 62%, rgba(157, 187, 209, 0));
	filter: blur(10px);
	opacity: 0;
	transition: opacity .7s var(--ease);
}

.hv-sizer__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: rotate(-90deg); }
.hv-sizer__ring-track { fill: var(--c-surface); stroke: var(--c-line); stroke-width: 2; }

.hv-sizer__ring-arc {
	fill: none;
	stroke: url(#hv-fit-dawn);
	stroke-width: 5;
	stroke-linecap: round;
	stroke-dasharray: 100;
	stroke-dashoffset: 100;
	transition: stroke-dashoffset .9s var(--ease);
}

.hv-sizer__body[data-state="found"] .hv-sizer__halo::before { opacity: 1; }
.hv-sizer__body[data-state="found"] .hv-sizer__ring-arc { stroke-dashoffset: 0; }
.hv-sizer__body[data-state="none"] .hv-sizer__ring-track { stroke-dasharray: 3 5; }
.hv-sizer__body[data-state="none"] .hv-sizer__eyebrow { visibility: hidden; }

.hv-sizer__size {
	position: relative;
	z-index: 1;
	color: var(--c-ink-3);
	font: 600 3rem/1 var(--f-serif);
}

.hv-sizer__size.is-long { font-size: 2.25rem; }
.hv-sizer__body[data-state="found"] .hv-sizer__size { color: var(--c-ink); }

.hv-sizer__verdict {
	min-height: 3.9em; /* Three lines: the answer may change length without moving the controls. */
	font-size: .875rem;
	line-height: 1.3;
	text-wrap: balance;
}

.hv-sizer__verdict small {
	display: block;
	margin-top: 4px;
	color: var(--c-ink-2);
	font-size: .8125rem;
}

.hv-sizer__zones {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hv-sizer__zones li {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 38px; /* One line, whatever the words: the rows must not grow under a finger on the slider. */
	padding: 0 12px;
	border-radius: var(--r-md);
	background: var(--c-sand);
	font-size: .875rem;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
}

.hv-sizer__zones li[hidden] { display: none; }

.hv-sizer__zone-dot {
	flex: none;
	width: 12px;
	height: 12px;
	border: 3px solid var(--c-ink-3);
	border-radius: 50%;
	background: var(--c-surface);
	transition: border-color var(--t);
}

[data-tone="right"] > .hv-sizer__zone-dot { border-color: var(--c-success); }
[data-tone="loose"] > .hv-sizer__zone-dot { border-color: var(--c-sky-ink); }
[data-tone="snug"] > .hv-sizer__zone-dot { border-color: var(--c-clay); }

.hv-sizer__zone-name { font-weight: 600; }
.hv-sizer__zone-feel { color: var(--c-ink-2); }
.hv-sizer__zone-ease { margin-left: auto; color: var(--c-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.hv-sizer__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	padding: 4px;
	border-radius: var(--r-pill);
	background: var(--c-sand);
}

.hv-sizer__tabs button {
	min-height: 40px;
	padding: 0 10px;
	border-radius: var(--r-pill);
	color: var(--c-ink-2);
	font: 600 .8125rem/1.15 var(--f-sans);
	transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}

.hv-sizer__tabs button[aria-selected="true"] { background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow-1); }
.hv-sizer__tabs button:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }

.hv-sizer__pane { display: grid; gap: 14px; }
.hv-sizer__pane[hidden] { display: none; }

.hv-sizer__slider { display: block; }

.hv-sizer__slider-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	font: 600 .875rem/1.2 var(--f-sans);
}

.hv-sizer__slider-head [data-hv-fit-out] { font: 600 1.5rem/1 var(--f-serif); font-variant-numeric: lining-nums tabular-nums; }

.hv-sizer__slider input {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: 40px;
	margin: 0;
	background: transparent;
	touch-action: pan-y;
	cursor: pointer;
}

.hv-sizer__slider input::-webkit-slider-runnable-track {
	height: 6px;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--fit-a), var(--fit-c)) 0 0 / var(--p, 50%) 100% no-repeat, var(--c-line);
}

.hv-sizer__slider input::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 30px;
	height: 30px;
	margin-top: -12px;
	border: 1px solid var(--c-line);
	border-radius: 50%;
	background: var(--c-surface);
	box-shadow: 0 2px 10px rgba(31, 27, 24, .22);
	transition: transform var(--t-fast);
}

.hv-sizer__slider input:active::-webkit-slider-thumb { transform: scale(1.1); }

.hv-sizer__slider input::-moz-range-track { height: 6px; border-radius: 3px; background: var(--c-line); }
.hv-sizer__slider input::-moz-range-progress { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--fit-a), var(--fit-c)); }

.hv-sizer__slider input::-moz-range-thumb {
	width: 30px;
	height: 30px;
	border: 1px solid var(--c-line);
	border-radius: 50%;
	background: var(--c-surface);
	box-shadow: 0 2px 10px rgba(31, 27, 24, .22);
}

.hv-sizer__slider input:focus-visible { outline: none; }
.hv-sizer__slider input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--c-ink); outline-offset: 2px; }
.hv-sizer__slider input:focus-visible::-moz-range-thumb { outline: 2px solid var(--c-ink); outline-offset: 2px; }

.hv-sizer__choice { min-width: 0; margin: 0; padding: 0; border: 0; }
.hv-sizer__choice legend { margin-bottom: 8px; padding: 0; font: 600 .875rem/1.2 var(--f-sans); }
.hv-sizer__segments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hv-sizer__segments label { position: relative; cursor: pointer; }

.hv-sizer__segments input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.hv-sizer__segments span {
	display: grid;
	place-items: center;
	min-height: 42px;
	padding: 4px 6px;
	border: 1px solid var(--c-line);
	border-radius: var(--r-pill);
	background: var(--c-surface);
	font: 500 .8125rem/1.15 var(--f-sans);
	text-align: center;
	transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast);
}

.hv-sizer__segments input:checked + span { border-color: var(--c-ink); background: var(--c-ink); color: #fff; }
.hv-sizer__segments input:focus-visible + span { outline: 2px solid var(--c-ink); outline-offset: 2px; }

.hv-sizer__more summary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	color: var(--c-ink-2);
	font: 500 .8125rem/1 var(--f-sans);
	text-decoration: underline;
	text-underline-offset: 3px;
	list-style: none;
	cursor: pointer;
}

.hv-sizer__more summary::-webkit-details-marker { display: none; }
.hv-sizer__more summary .hv-icon { transition: transform var(--t) var(--ease); }
.hv-sizer__more[open] summary .hv-icon { transform: rotate(180deg); }
.hv-sizer__more .hv-sizer__choice { margin-top: 10px; }

.hv-sizer__girths { display: grid; gap: 10px; }

.hv-sizer__girth {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font: 600 .875rem/1.2 var(--f-sans);
}

.hv-sizer__stepper {
	display: inline-grid;
	grid-template-columns: 44px 60px 44px;
	align-items: center;
	border: 1px solid var(--c-line);
	border-radius: var(--r-pill);
	background: var(--c-surface);
}

.hv-sizer__stepper button { display: grid; place-items: center; height: 44px; border-radius: 50%; }

.hv-sizer__stepper input {
	width: 100%;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	font: 600 1.0625rem/1 var(--f-sans);
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.hv-sizer__stepper input::-webkit-outer-spin-button,
.hv-sizer__stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.hv-sizer__stepper input:focus { outline: none; }
.hv-sizer__stepper:focus-within { border-color: var(--c-ink); }

.hv-sizer__hint,
.hv-sizer__model {
	color: var(--c-ink-3);
	font-size: .8125rem;
	line-height: 1.45;
}

.hv-sizer__note {
	margin-top: 10px;
	color: var(--c-ink-3);
	font-size: .75rem;
	line-height: 1.4;
	text-align: center;
}

.hv-sizer__note .hv-link { font-size: inherit; }

@keyframes hv-fit-turn {
	to { transform: rotate(360deg); }
}

@keyframes hv-fit-ring-turn {
	from { transform: rotate(-90deg); }
	to { transform: rotate(270deg); }
}

@keyframes hv-fit-pop {
	0% { opacity: 0; transform: scale(.55); filter: blur(6px); }
	60% { opacity: 1; transform: scale(1.1); filter: blur(0); }
	100% { opacity: 1; transform: none; }
}

@keyframes hv-fit-wave {
	from { opacity: .75; transform: scale(.82); }
	to { opacity: 0; transform: scale(1.5); }
}

@keyframes hv-fit-hint {
	50% { opacity: .4; }
}

@media (prefers-reduced-motion: no-preference) {
	.hv-fitcta__halo::before { animation: hv-fit-turn 14s linear infinite; }
	.hv-sizer__body[data-state="idle"] .hv-sizer__size { animation: hv-fit-hint 2.4s ease-in-out infinite; }
	.hv-sizer__body[data-state="found"] .hv-sizer__ring { animation: hv-fit-ring-turn 18s linear infinite; }
	.hv-sizer__size.is-new { animation: hv-fit-pop .45s var(--ease) both; }

	/* A ring of light leaves the halo each time the size changes. */
	.hv-sizer__size.is-new::after {
		content: '';
		position: absolute;
		top: 50%;
		left: 50%;
		width: 104px;
		height: 104px;
		margin: -52px 0 0 -52px;
		border: 2px solid var(--fit-a);
		border-radius: 50%;
		animation: hv-fit-wave .8s ease-out both;
		pointer-events: none;
	}
}
