/*
 * Nizu style page: gallery, photo viewer, colour picker, buy bar. Mobile first (phone base, min-width for larger).
 * Tokens (--nz-*) come from the Bricks variables; every use carries a fallback.
 */

/* ---------------------------------------------------------------- Gallery */
.nz-gallery {
	position: relative;
	width: 100%;
	background: var(--nz-surface, #f5f3f2);
}

.nz-gallery__track {
	display: flex;
	width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

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

.nz-gallery__track:focus-visible {
	outline: 2px solid var(--nz-brand, #6f6467);
	outline-offset: -2px;
}

.nz-gallery__frame {
	position: relative;
	flex: 0 0 100%;
	margin: 0;
	aspect-ratio: var(--nz-gallery-ratio, 4 / 5);
	overflow: hidden;
	scroll-snap-align: center;
	scroll-snap-stop: always;
	background: var(--nz-surface, #f5f3f2);
}

.nz-gallery__open {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
	-webkit-appearance: none;
	appearance: none;
}

.nz-gallery__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}

.nz-gallery__count {
	position: absolute;
	right: 12px;
	bottom: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(27, 25, 24, .62);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	font: 600 12px/1.4 var(--nz-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	letter-spacing: .02em;
	pointer-events: none;
}

.nz-gallery__dots {
	position: absolute;
	left: 56px;
	right: 56px;
	bottom: 18px;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	pointer-events: none;
}

.nz-gallery__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .6);
	box-shadow: 0 0 0 .5px rgba(0, 0, 0, .18);
	transition: transform 200ms var(--nz-ease, ease), background-color 200ms var(--nz-ease, ease);
}

.nz-gallery__dot.is-active {
	background: #fff;
	transform: scale(1.35);
}

.nz-gallery--single .nz-gallery__count,
.nz-gallery--single .nz-gallery__dots {
	display: none;
}

.nz-gallery--empty,
.nz-picker--empty {
	padding: 16px;
	border: 1px dashed var(--nz-line, #e7e2e0);
	border-radius: var(--nz-r-m, 14px);
	color: var(--nz-ink-2, #6b6466);
	font-size: 14px;
}

.nz-gallery__note,
.nz-picker__note {
	margin: 0;
}

@media (min-width: 1024px) {
	.nz-gallery {
		max-width: 560px;
		border-radius: var(--nz-r-m, 14px);
		overflow: hidden;
	}
}

/* ---------------------------------------------------------------- Product video (slide 2) */
.nz-gallery__dot--video {
	position: relative;
	width: 16px;
	border-radius: 4px;
}

.nz-gallery__dot--video::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	transform: translate(-35%, -50%);
	border-style: solid;
	border-width: 2.5px 0 2.5px 4px;
	border-color: transparent transparent transparent rgba(27, 25, 24, .75);
}

.nz-gallery__dot--video.is-active {
	transform: scale(1.2);
}

.nz-vid {
	position: relative;
	background: #000;
}

.nz-vid__el,
.nz-vid__yt,
.nz-vid__toggle {
	display: block;
	width: 100%;
	height: 100%;
}

.nz-vid__el {
	max-width: none;
	object-fit: cover;
	background: var(--nz-surface, #f5f3f2);
}

.nz-vid__yt,
.nz-vid__toggle {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
}

.nz-vid__yt .nz-gallery__img {
	position: absolute;
	inset: 0;
}

/* A YouTube Short's thumbnail is a pillarboxed 4:3 frame: scale it so the vertical picture fills the slide. */
.nz-vid--short .nz-vid__yt .nz-gallery__img {
	transform: scale(1.45);
}

.nz-vid__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	padding-left: 3px;
	box-sizing: border-box;
	border-radius: 50%;
	background: rgba(27, 25, 24, .55);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: #fff;
	transition: opacity 200ms var(--nz-ease, ease);
	pointer-events: none;
}

/* The MP4 shows the play badge only while paused (autoplay refused, reduced motion, or the customer paused it). */
.nz-vid:not(.is-paused) .nz-vid__toggle .nz-vid__play {
	opacity: 0;
}

.nz-vid__yt:focus-visible,
.nz-vid__toggle:focus-visible,
.nz-vid__expand:focus-visible {
	outline: 2px solid #fff;
	outline-offset: -4px;
}

.nz-vid__frame {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
}

.nz-vid__expand {
	position: absolute;
	top: 6px;
	right: 6px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.nz-vid__expand svg {
	box-sizing: content-box;
	padding: 7px;
	border-radius: 50%;
	background: rgba(27, 25, 24, .55);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.nz-vid.is-yt-live .nz-vid__expand {
	display: none;
}

.nz-vid--viewer {
	width: 100%;
	height: 100%;
	max-width: 100%;
	margin: 0;
}

.nz-vid--viewer .nz-vid__el {
	object-fit: contain;
	background: #000;
}

.nz-vid--viewer .nz-vid__yt .nz-gallery__img {
	object-fit: contain;
}

.nz-vid--viewer.nz-vid--short .nz-vid__yt .nz-gallery__img {
	object-fit: cover;
}

/* ---------------------------------------------------------------- Photo viewer (a Nizu.sheet, full variant) */
.nz-viewer .nz-sheet__panel {
	display: block;
	background: #000;
	color: #fff;
	overflow: hidden;
	padding-bottom: 0;
}

.nz-viewer__bar {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: calc(env(safe-area-inset-top, 0px) + 6px) 8px 14px 18px;
	background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
	pointer-events: none;
}

.nz-viewer__count {
	font: 600 14px/1 var(--nz-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	letter-spacing: .03em;
}

.nz-viewer--single .nz-viewer__count {
	visibility: hidden;
}

.nz-viewer__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: #fff;
	cursor: pointer;
	pointer-events: auto;
}

.nz-viewer__track {
	display: flex;
	width: 100%;
	height: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	scrollbar-width: none;
}

.nz-viewer__track::-webkit-scrollbar {
	display: none;
}

.nz-viewer__slide {
	flex: 0 0 100%;
	height: 100%;
	scroll-snap-align: center;
	scroll-snap-stop: always;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nz-viewer__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	touch-action: pan-x pan-y pinch-zoom;
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}

/* ---------------------------------------------------------------- Colour picker */
.nz-picker {
	width: 100%;
	box-sizing: border-box;
}

.nz-picker__head {
	margin: 0 0 12px;
}

.nz-picker__title {
	margin: 0;
	font: 600 17px/1.3 var(--nz-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	color: var(--nz-ink, #1b1918);
}

.nz-picker__sep,
.nz-picker__colour {
	font-weight: 400;
	color: var(--nz-ink-2, #6b6466);
}

.nz-picker__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px 12px;
	margin: 0;
	padding: 4px 4px 0;
	list-style: none;
}

@media (min-width: 768px) {
	.nz-picker__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.nz-tile {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nz-tile__pick {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--nz-r-m, 14px);
	overflow: hidden;
	background: var(--nz-surface, #f5f3f2);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: box-shadow 160ms var(--nz-ease, ease), transform 120ms var(--nz-ease, ease);
}

.nz-tile__pick:focus-visible {
	outline: 2px solid var(--nz-brand, #6f6467);
	outline-offset: 3px;
}

.nz-tile.is-selected .nz-tile__pick {
	box-shadow: 0 0 0 2px var(--nz-bg, #fff), 0 0 0 4px var(--nz-brand, #6f6467);
}

.nz-tile__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.nz-tile__name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin-top: 8px;
	font: 500 12px/1.3 var(--nz-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	color: var(--nz-ink, #1b1918);
}

.nz-tile__hint {
	display: block;
	margin-top: 2px;
	font: 400 12px/1.3 var(--nz-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	color: var(--nz-ink-2, #6b6466);
}

.nz-tile__hint[hidden] {
	display: none;
}

.nz-tile__ctl {
	margin-top: auto;
	padding-top: 8px;
}

/* "+" (qty 0) and the - qty + stepper share the slot: a real 44px tall control (was 40px + 2px margins). */
.nz-add {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--nz-line, #e7e2e0);
	border-radius: 999px;
	background: var(--nz-bg, #fff);
	color: var(--nz-ink, #1b1918);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.nz-add[hidden],
.nz-step[hidden] {
	display: none;
}

.nz-add::after,
.nz-step__btn::after {
	content: "";
	position: absolute;
	inset: -2px 0;
}

.nz-step {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 44px;
	margin: 0;
	border-radius: 999px;
	background: var(--nz-ink, #1b1918);
	color: var(--nz-bg, #fff);
}

.nz-step__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.nz-step__btn.is-max {
	opacity: .35;
}

.nz-step__qty {
	flex: 1 1 auto;
	min-width: 0;
	text-align: center;
	font: 600 15px/1 var(--nz-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	font-variant-numeric: tabular-nums;
}

.nz-add:focus-visible,
.nz-step__btn:focus-visible {
	outline: 2px solid var(--nz-brand, #6f6467);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------- Buy bar */
.nz-buybar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: calc(var(--nz-tabbar-h, 56px) + env(safe-area-inset-bottom, 0px));
	z-index: 900;
	display: flex;
	align-items: center;
	gap: 12px;
	box-sizing: border-box;
	min-height: var(--nz-buybar-h, 72px);
	padding: 10px max(16px, calc((100% - 720px) / 2));
	background: rgba(255, 255, 255, .9);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	backdrop-filter: saturate(180%) blur(20px);
	box-shadow: 0 -.5px 0 var(--nz-line, #e7e2e0);
	transition: transform 220ms var(--nz-ease, ease);
}

.nz-buybar--builder {
	position: sticky;
}

html.nz-kb .nz-buybar {
	transform: translateY(110%);
}

.nz-buybar__info {
	flex: 1 1 auto;
	min-width: 0;
}

.nz-buybar__sum {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font: 600 15px/1.3 var(--nz-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	color: var(--nz-ink, #1b1918);
	font-variant-numeric: tabular-nums;
}

.nz-buybar__nudge {
	margin-top: 2px;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font: 500 12px/1.3 var(--nz-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	color: var(--nz-deal, #bf3228);
}

.nz-buybar__nudge[hidden] {
	display: none;
}

.nz-buybar__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	min-width: 128px;
	height: 48px;
	margin: 0;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: var(--nz-ink, #1b1918);
	color: var(--nz-bg, #fff);
	font: 600 16px/1 var(--nz-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 200ms var(--nz-ease, ease), transform 120ms var(--nz-ease, ease);
}

.nz-buybar__btn:disabled {
	background: var(--nz-surface-2, #ece8e6);
	color: var(--nz-ink-3, #716a6c);
	cursor: not-allowed;
}

.nz-buybar__btn:focus-visible {
	outline: 2px solid var(--nz-brand, #6f6467);
	outline-offset: 3px;
}

.nz-buybar__done {
	display: none;
	align-items: center;
	gap: 6px;
}

.nz-buybar.is-added .nz-buybar__btn {
	background: var(--nz-ok, #2e7d4f);
	color: #fff;
}

.nz-buybar.is-added .nz-buybar__label {
	display: none;
}

.nz-buybar.is-added .nz-buybar__done {
	display: inline-flex;
}

.nz-buybar.is-busy .nz-buybar__btn {
	opacity: .7;
}

@media (min-width: 1024px) {
	/* Desktop: the bar sits under the colour grid but sticks to the bottom of the viewport while the grid is still scrolling past,
	   so Add to bag never needs a scroll to the end of a 28-colour grid. */
	.nz-buybar {
		position: sticky;
		left: auto;
		right: auto;
		bottom: 0;
		min-height: 0;
		margin-top: 20px;
		padding: 14px 0;
		background: var(--nz-bg, #fff);
		-webkit-backdrop-filter: saturate(180%) blur(20px);
		backdrop-filter: saturate(180%) blur(20px);
		box-shadow: none;
		border-top: .5px solid var(--nz-line, #e7e2e0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.nz-gallery__dot,
	.nz-vid__play,
	.nz-tile__pick,
	.nz-buybar,
	.nz-buybar__btn {
		transition: none;
	}
}

/* ---------------------------------------------------------------- Sold-out product page (editors only: shoppers are redirected) */
.nz-soldout {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--nz-s-2, 8px);
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 var(--nz-s-5, 20px);
	padding: var(--nz-s-4, 16px);
	border-radius: var(--nz-r-m, 14px);
	background: var(--nz-surface, #f5f3f2);
}

.nz-soldout[hidden] {
	display: none;
}

.nz-soldout__badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--nz-bg, #fff);
	color: var(--nz-ink, #1b1918);
	font: 600 12px/1.2 var(--nz-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
	letter-spacing: .01em;
}

.nz-soldout__text {
	margin: 0;
	color: var(--nz-ink-2, #6b6466);
	font: 400 15px/1.45 var(--nz-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/* ---------------------------------------------------------------- Highlights chips (owner 2026-10-08): fabric / size / fit under the price. */
.nz-pdp__facts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.nz-pdp__facts li {
	padding: 6px 12px;
	border: 1px solid var(--nz-line, #E7E2DF);
	border-radius: 999px;
	color: var(--nz-ink-2, #6b6466);
	font: 500 13px/1.2 var(--nz-font-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/* Sold-out note (owner 2026-10-11): sits right under the undertone row (or at its place when the colour has none). */
.nz-pdp__info > .nz-pdp__note {
	margin: calc(-1 * var(--nz-s-2, 8px)) 0 0;
}

/* ---------------------------------------------------------------- Undertone chip colours (owner 2026-10-08):
   cool = light blue, warm = orange, neutral = nude. Dark text on light fills keeps contrast ≥ 4.5:1. */
.nz-pdp__tone[data-nz-tone="cool"] [data-nz-bind="undertone"] {
	background: #CFE3F5;
	color: #1B4F7A;
}
.nz-pdp__tone[data-nz-tone="warm"] [data-nz-bind="undertone"] {
	background: #F9C89B;
	color: #7A3410;
}
.nz-pdp__tone[data-nz-tone="neutral"] [data-nz-bind="undertone"] {
	background: #EAD7C3;
	color: #5A4130;
}

/* "Back to colours" pill: shown after a colour tap jumps up to the photos (product.js backPill). */
.nz-backpill {
	position: fixed;
	left: 50%;
	bottom: calc(var(--nz-tabbar-h, 56px) + env(safe-area-inset-bottom, 0px) + var(--nz-buybar-h, 72px) + 12px);
	z-index: 901;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: var(--nz-ink, #1b1918);
	color: var(--nz-bg, #fff);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
	opacity: 0;
	transform: translate(-50%, 8px);
	transition: opacity 200ms var(--nz-ease, ease), transform 200ms var(--nz-ease, ease);
	cursor: pointer;
}

.nz-backpill.is-on {
	opacity: 1;
	transform: translate(-50%, 0);
}

.nz-backpill[hidden] {
	display: none;
}

html.nz-kb .nz-backpill {
	display: none;
}
