/* Product block — interaction container (not a decorative card) */
.product {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
	scroll-margin-top: calc(var(--header-h) + var(--space-3));
}

.product__header {
	text-align: center;
	padding-inline: var(--space-2);
}

.product__title {
	font-family: var(--font-display);
	font-size: var(--fs-2xl);
	font-weight: var(--fw-extra);
	line-height: var(--lh-tight);
	letter-spacing: -0.01em;
	color: var(--color-text);
}

.product__price {
	display: block;
	margin-top: var(--space-2);
	font-family: var(--font-display);
	font-size: var(--fs-xl);
	font-weight: var(--fw-bold);
	color: var(--color-text);
}

.product__desc {
	margin-top: var(--space-3);
	font-size: var(--fs-md);
	font-weight: var(--fw-medium);
	line-height: var(--lh-snug);
	color: var(--color-text-dark);
	max-width: 28ch;
	margin-inline: auto;
	text-align: center;
	text-wrap: balance;
}

/* Gallery — viewport matches video 2/3; images letterbox top/bottom */
.gallery {
	position: relative;
	width: 100%;
	user-select: none;
	touch-action: pan-y;
}

.gallery__viewport {
	position: relative;
	aspect-ratio: var(--gallery-ratio);
	/* overflow stays visible so large nav glyphs aren’t clipped;
	   slides clip via .gallery__viewport-clip */
	background: rgba(253, 228, 235, 0.45);
}

.gallery__viewport-clip {
	position: absolute;
	inset: 0;
	overflow: hidden;
}

.gallery__track {
	display: flex;
	height: 100%;
	transition: transform var(--dur-med) var(--ease-out);
	will-change: transform;
}

.gallery__slide {
	flex: 0 0 100%;
	height: 100%;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gallery__media {
	width: 100%;
	height: 100%;
	object-position: center center;
}

/* Videos fill the 2/3 frame edge-to-edge — no side letterboxing */
.gallery__media--video {
	object-fit: cover;
}

/* Photos fit by width; empty space top/bottom (not side-cropped thin) */
.gallery__media--image {
	object-fit: contain;
}

.gallery__nav {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	pointer-events: none;
	padding: 0 var(--space-1);
	z-index: 2;
}

.gallery__btn {
	pointer-events: auto;
	width: var(--tap-min);
	height: calc(var(--tap-min) * 1.5);
	display: grid;
	place-items: center;
	background: rgba(255, 255, 255, 0.72);
	color: var(--color-text);
	line-height: 1;
	opacity: 0.85;
	overflow: visible;
	transition: opacity var(--dur-fast), background var(--dur-fast);
}

.gallery__btn-icon {
	display: block;
	width: 2.5rem;
	height: 2.5rem;
	flex-shrink: 0;
}

.gallery__btn:hover {
	opacity: 1;
	background: var(--color-white);
}

.gallery__btn:disabled {
	opacity: 0.3;
	cursor: default;
}

.gallery__thumbs {
	display: flex;
	justify-content: center;
	gap: var(--space-2);
	overflow-x: auto;
	padding: var(--space-3) 0 var(--space-1);
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.gallery__thumb {
	flex: 0 0 auto;
	width: 4.25rem;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border: 2px solid transparent;
	opacity: 0.65;
	scroll-snap-align: center;
	padding: 0;
	background: rgba(255, 255, 255, 0.25);
	transition: opacity var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast);
	position: relative;
}

.gallery__thumb img,
.gallery__thumb video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}

.gallery__thumb.is-active {
	opacity: 1;
	border-color: var(--color-text);
	transform: translateY(-2px);
}

.gallery__thumb:hover {
	opacity: 1;
}

.gallery__thumb-badge {
	position: absolute;
	bottom: 4px;
	right: 4px;
	width: 1.1rem;
	height: 1.1rem;
	background: rgba(196, 18, 46, 0.9);
	color: var(--color-white);
	font-size: 0.55rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
}

/* Size selector */
.size {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-3);
}

.size__label {
	font-family: var(--font-display);
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--color-text);
}

.size__options {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-2);
}

.size__option {
	min-width: var(--tap-min);
	min-height: var(--tap-min);
	padding: var(--space-2) var(--space-3);
	border: 1.5px solid var(--color-border);
	background: transparent;
	color: var(--color-text);
	font-weight: var(--fw-semibold);
	font-size: var(--fs-sm);
	letter-spacing: 0.04em;
	transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}

.size__option:hover {
	background: rgba(196, 18, 46, 0.08);
}

.size__option.is-selected,
.size__option[aria-checked="true"] {
	background: var(--color-text);
	color: var(--color-white);
}

.size__hint {
	display: inline-block;
	font-size: var(--fs-xs);
	font-weight: var(--fw-medium);
	min-height: 1.25em;
	padding: var(--space-1) var(--space-3);
	border-radius: var(--radius-pill);
	opacity: 0;
	transition: opacity var(--dur-fast);
}

.size__hint.is-visible {
	opacity: 1;
	color: var(--color-black);
	background: #ffc15b;
}

/* CTAs — sharp corners (brief) */
.product__actions {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	width: 100%;
	max-width: 22rem;
	margin-inline: auto;
	padding-left: var(--space-2);
	padding-right: var(--space-2);
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--tap-min);
	padding: var(--space-3) var(--space-5);
	font-family: var(--font-display);
	font-size: var(--fs-sm);
	font-weight: var(--fw-bold);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-align: center;
	border-radius: var(--radius-none);
	transition:
		background var(--dur-fast) var(--ease-out),
		color var(--dur-fast),
		transform var(--dur-fast) var(--ease-out),
		box-shadow var(--dur-fast);
}

.btn:active {
	transform: scale(0.98);
}

.btn--outline {
	border: 2px solid var(--color-border);
	background: transparent;
	color: var(--color-text);
}

.btn--outline:hover {
	background: rgba(196, 18, 46, 0.08);
}

.btn--solid {
	border: 2px solid var(--color-text);
	background: var(--color-text);
	color: var(--color-white);
	box-shadow: 0 0 0 0 rgba(196, 18, 46, 0.35);
}

.btn--solid:hover {
	background: var(--color-text-dark);
	border-color: var(--color-text-dark);
	box-shadow: 0 6px 18px rgba(196, 18, 46, 0.28);
}

.btn--solid.is-pulse {
	animation: cta-pulse var(--dur-slow) var(--ease-out);
}

.product__shipping {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: var(--space-4);
	padding-top: var(--space-2);
}

.product__shipping img {
	width: min(100%, 80px);
	height: auto;
	border-radius: 1rem;
}

/* Toast feedback */
.toast {
	position: fixed;
	left: 50%;
	bottom: calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
	z-index: var(--z-toast);
	transform: translateX(-50%) translateY(120%);
	max-width: min(90vw, 22rem);
	padding: var(--space-3) var(--space-5);
	background: var(--color-toast-bg);
	color: var(--color-toast-fg);
	font-size: var(--fs-sm);
	font-weight: var(--fw-medium);
	text-align: center;
	box-shadow: var(--shadow-soft);
	opacity: 0;
	pointer-events: none;
	transition: transform var(--dur-med) var(--ease-out), opacity var(--dur-med);
}

.toast.is-visible {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

@keyframes cta-pulse {
	0% {
		transform: scale(1);
	}

	40% {
		transform: scale(1.02);
	}

	100% {
		transform: scale(1);
	}
}

@media (min-width: 480px) {
	.product__actions {
		flex-direction: row;
		max-width: none;
	}

	.btn {
		flex: 1;
	}

	.product__shipping img {
		width: min(100%, 84px);
	}
}

@media (max-height: 560px) {
	.cart-suggest {
		display: none;
	}
}
