/**
 * Shop and Product motion and interactions (inc/shop-motion.php, assets/js/product.js, shop.js).
 * Loaded on the Shop, product archives and product pages only.
 * Only transform, opacity and clip-path are animated. Reduced motion: see the end of the file.
 */

/* =========================================================
   2. Immersive gallery
   ========================================================= */

/* Mobile: full-bleed swipe gallery with a thin progress bar on top. */
.nk-pdp__gallery { margin-inline: calc(-1 * var(--wp--style--root--padding-left, var(--wp--preset--spacing--40))) !important; }
.nk-gallery { position: relative; }
.nk-gallery__bar {
	position: relative;
	height: 2px;
	margin: 0 var(--wp--style--root--padding-left, var(--wp--preset--spacing--40)) .75rem;
	background: color-mix(in srgb, var(--nk-zari) 40%, transparent);
	overflow: hidden;
}
.nk-gallery__bar-fill {
	position: absolute;
	inset: 0 auto 0 0;
	width: calc(100% / var(--n, 1));
	background: var(--nk-oxblood);
	will-change: transform;
}
.nk-gallery__rail { display: none; }
.nk-gallery__track {
	display: flex;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}
.nk-gallery__track::-webkit-scrollbar { display: none; }
.nk-gallery__item {
	position: relative;
	flex: 0 0 100%;
	margin: 0;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: var(--nk-ivory);
	scroll-snap-align: start;
	scroll-margin-top: calc(var(--nk-header-h) + var(--wp--preset--spacing--40));
}
.nk-gallery__open {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
}
.nk-gallery__open:focus-visible { outline: 2px solid var(--nk-oxblood); outline-offset: -6px; }
.nk-gallery__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nk-gallery__item--wide .nk-gallery__img { object-fit: contain; }

/* Desktop: photos stacked at their own shape; a sticky progress line with numbered ticks on the left. */
@media (min-width: 960px) {
	.nk-pdp__gallery { margin-inline: 0 !important; }
	.nk-gallery {
		display: grid;
		grid-template-columns: 3rem minmax(0, 1fr);
		gap: var(--wp--preset--spacing--30);
		align-items: start;
	}
	.nk-gallery__bar { display: none; }
	.nk-gallery__rail {
		display: block;
		position: sticky;
		top: calc(var(--nk-header-h) + var(--wp--preset--spacing--40));
		height: min(56vh, calc(var(--n, 1) * 4.75rem));
	}
	/* The line runs from the first tick to the last and fills down to the photo you're on. */
	.nk-gallery__line {
		position: absolute;
		top: calc(50% / var(--n, 1));
		bottom: calc(50% / var(--n, 1));
		right: 0;
		width: 1px;
		background: color-mix(in srgb, var(--nk-zari) 40%, transparent);
	}
	.nk-gallery__line-fill {
		position: absolute;
		inset: 0 -.5px 0 auto;
		width: 2px;
		background: var(--nk-oxblood);
		transform: scaleY(0);
		transform-origin: 50% 0;
		will-change: transform;
	}
	.nk-gallery__ticks {
		position: absolute;
		inset: 0;
		display: grid;
		grid-template-rows: repeat(var(--n, 1), minmax(0, 1fr));
		margin: 0;
		padding: 0;
		list-style: none;
	}
	.nk-gallery__ticks li { display: flex; align-items: center; justify-content: flex-end; margin: 0; }
	.nk-gallery__tick {
		position: relative;
		display: inline-flex;
		align-items: center;
		justify-content: flex-start;
		width: var(--nk-tap);
		height: var(--nk-tap);
		margin-right: 0;
		padding: 0;
		border: 0;
		background: none;
		color: var(--nk-ink);
		font: 400 .75rem/1 var(--wp--preset--font-family--dm-sans);
		letter-spacing: .06em;
		cursor: pointer;
		opacity: .72;
		transition: opacity .3s ease;
	}
	.nk-gallery__tick::after {
		content: "";
		position: absolute;
		right: 0;
		top: 50%;
		width: 10px;
		height: 1px;
		background: currentColor;
	}
	.nk-gallery__tick:hover,
	.nk-gallery__tick[aria-current="true"] { opacity: 1; color: var(--nk-oxblood); font-weight: 600; }
	.nk-gallery__tick:focus-visible { outline: 2px solid var(--nk-oxblood); outline-offset: 2px; }
	.nk-gallery__track {
		flex-direction: column;
		gap: var(--wp--preset--spacing--30);
		overflow: visible;
		scroll-snap-type: none;
	}
	.nk-gallery__item { flex: none; aspect-ratio: auto; }
	.nk-gallery__img,
	.nk-gallery__item--wide .nk-gallery__img { height: auto; object-fit: initial; }
	/* Photos fade and rise as they come in (product.js adds .nk-pre, then .nk-in). */
	.nk-gallery__item.nk-pre { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--nk-ease), transform .9s var(--nk-ease); }
	.nk-gallery__item.nk-pre.nk-in { opacity: 1; transform: none; }
}
@media (hover: hover) and (pointer: fine) {
	.nk-gallery__img { transition: transform 1.2s var(--nk-ease); }
	.nk-gallery__open:hover .nk-gallery__img { transform: scale(1.03); }
}

/* Full-screen viewer (a modal <dialog>: focus stays inside, Esc closes). */
.nk-viewer {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--nk-oxblood);
	color: var(--nk-cream);
	overflow: hidden;
	overscroll-behavior: contain;
}
.nk-viewer::backdrop { background: var(--nk-oxblood); }
.nk-viewer[open] { animation: nk-viewer-in .3s ease both; }
@keyframes nk-viewer-in { from { opacity: 0; } to { opacity: 1; } }
.nk-viewer__stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; }
.nk-viewer__stage.is-zoomed { cursor: move; }
.nk-viewer__track { display: flex; height: 100%; will-change: transform; }
.nk-viewer__track.is-moving { transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.nk-viewer__slide {
	flex: 0 0 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	margin: 0;
	padding: 4.5rem 1rem 5rem;
	box-sizing: border-box;
}
.nk-viewer__slide img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
	will-change: transform;
}
.nk-viewer__slide img.is-easing { transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.nk-viewer__btn {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--nk-cream) 55%, transparent);
	border-radius: 50%;
	background: color-mix(in srgb, var(--nk-oxblood) 70%, transparent);
	color: var(--nk-cream);
	cursor: pointer;
	z-index: 2;
}
.nk-viewer__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.nk-viewer__btn:hover { background: var(--nk-cream); color: var(--nk-oxblood); }
.nk-viewer__btn:focus-visible { outline: 2px solid var(--nk-cream); outline-offset: 3px; }
.nk-viewer__btn:disabled { opacity: .35; cursor: default; background: transparent; color: var(--nk-cream); }
.nk-viewer__close { top: max(1rem, env(safe-area-inset-top)); right: 1rem; }
.nk-viewer__prev, .nk-viewer__next { bottom: max(1rem, env(safe-area-inset-bottom)); }
.nk-viewer__prev { left: 1rem; }
.nk-viewer__next { right: 1rem; }
.nk-viewer__count {
	position: absolute;
	left: 50%;
	bottom: max(1rem, env(safe-area-inset-bottom));
	margin: 0;
	transform: translateX(-50%);
	min-height: 48px;
	display: flex;
	align-items: center;
	font: 400 var(--wp--preset--font-size--small)/1 var(--wp--preset--font-family--dm-sans);
	letter-spacing: .08em;
}
@media (min-width: 960px) {
	.nk-viewer__slide { padding: 2.5rem 6rem; }
	.nk-viewer__prev, .nk-viewer__next { top: 50%; bottom: auto; margin-top: -24px; }
	.nk-viewer__prev { left: 1.5rem; }
	.nk-viewer__next { right: 1.5rem; }
	.nk-viewer__close { right: 1.5rem; top: 1.5rem; }
	.nk-viewer__count { bottom: 1.5rem; }
}
html.nk-locked { overflow: hidden; }

/* =========================================================
   3. "Look closer" strip (inside the oxblood band)
   Drag or flick on desktop (momentum), native swipe on phones; drifts on its own until touched.
   ========================================================= */
.nk-closer .nk-strip {
	margin-top: var(--wp--preset--spacing--60) !important;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	cursor: grab;
	-webkit-user-select: none;
	user-select: none;
}
.nk-strip::-webkit-scrollbar { display: none; }
.nk-strip.is-dragging { cursor: grabbing; }
.nk-strip:focus-visible { outline: 2px solid var(--nk-cream); outline-offset: 4px; }
.nk-strip__track {
	display: flex;
	gap: var(--wp--preset--spacing--30);
	width: max-content;
	margin: 0;
	padding: 0 var(--nk-pad-x);
	list-style: none;
}
.nk-strip__item {
	flex: none;
	width: min(68vw, 19rem);
	aspect-ratio: 1;
	margin: 0;
	overflow: hidden;
	background: color-mix(in srgb, var(--nk-cream) 8%, transparent);
}
.nk-strip__item img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* =========================================================
   4. Saree-tinted backdrop: a faint layer behind the product page (colour from inc/shop-motion.php),
   faded in by product.js after the morph. Header, oxblood band and footer keep their colours.
   ========================================================= */
.nk-product { position: relative; isolation: isolate; }
.nk-product::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--nk-tint, transparent);
	opacity: 0;
	transition: opacity .6s ease;
	pointer-events: none;
}
.nk-tinted .nk-product::before { opacity: 1; }

/* =========================================================
   6. Sticky buy bar: slides up from the bottom once the main buttons have scrolled away.
   Full width on phones (safe area respected), a slim floating bar on desktop.
   ========================================================= */
.nk-buybar {
	position: fixed;
	z-index: 900;
	left: 0;
	right: 0;
	bottom: 0;
	padding: .5rem var(--nk-pad-x) max(.5rem, env(safe-area-inset-bottom));
	background: var(--nk-cream);
	border-top: 1px solid var(--nk-rule);
	box-shadow: 0 -8px 24px rgba(42, 10, 14, .08);
	transform: translateY(110%);
	visibility: hidden;
	transition: transform .4s var(--nk-ease), visibility 0s linear .4s;
}
.nk-buybar.is-shown { transform: none; visibility: visible; transition: transform .45s var(--nk-ease), visibility 0s; }
.nk-buybar__inner { display: flex; align-items: center; gap: .75rem; max-width: 720px; margin: 0 auto; }
.nk-buybar__thumb { flex: none; width: 40px; height: 53px; object-fit: cover; background: var(--nk-ivory); }
.nk-buybar__text { flex: 1 1 auto; min-width: 0; }
.nk-buybar__text p { margin: 0; }
.nk-buybar__name {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-family: var(--wp--preset--font-family--instrument-serif);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.2;
}
.nk-buybar__price { font-family: var(--wp--preset--font-family--dm-sans); font-size: var(--wp--preset--font-size--small); }
.nk-buybar__price * { font-family: inherit !important; }
.nk-buybar__bag {
	flex: none;
	min-height: 48px;
	padding: 0 1.1rem;
	border: 1px solid var(--nk-oxblood);
	background: var(--nk-oxblood);
	color: var(--nk-cream);
	font: 500 var(--wp--preset--font-size--small)/1 var(--wp--preset--font-family--dm-sans);
	letter-spacing: .08em;
	text-transform: uppercase;
	cursor: pointer;
}
.nk-buybar__bag:hover { background: var(--nk-ink); border-color: var(--nk-ink); }
.nk-buybar__bag.is-busy { opacity: .8; cursor: progress; }
.nk-buybar__bag:focus-visible,
.nk-buybar__wa:focus-visible { outline: 2px solid var(--nk-oxblood); outline-offset: 2px; }
.nk-buybar__wa {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 1px solid var(--nk-oxblood);
	color: var(--nk-oxblood);
}
.nk-buybar__wa:hover { background: var(--nk-oxblood); color: var(--nk-cream); }
.nk-buybar__wa svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.nk-buybar__error {
	max-width: 720px;
	margin: .5rem auto 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--nk-ink);
	border-left: 2px solid var(--nk-terracotta);
	padding-left: .75rem;
}
@media (min-width: 960px) {
	.nk-buybar {
		left: 50%;
		right: auto;
		bottom: 1.25rem;
		width: min(720px, calc(100vw - 3rem));
		padding: .5rem .5rem .5rem .75rem;
		border: 1px solid var(--nk-rule);
		box-shadow: 0 14px 40px rgba(42, 10, 14, .14);
		transform: translate(-50%, calc(100% + 2rem));
	}
	.nk-buybar.is-shown { transform: translate(-50%, 0); }
}

/* =========================================================
   Reduced motion: everything instant, nothing moves.
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
	.nk-gallery__item.nk-pre { opacity: 1 !important; transform: none !important; transition: none !important; }
	.nk-gallery__img { transition: none !important; transform: none !important; }
	.nk-gallery__tick { transition: none; }
	.nk-viewer[open] { animation: none; }
	.nk-product::before { transition: none; }
	.nk-buybar, .nk-buybar.is-shown { transition: none; }
	.nk-viewer__track.is-moving,
	.nk-viewer__slide img.is-easing { transition: none !important; }
}

/* =========================================================
   Product page extras: breadcrumb, trust row, accordions, recently viewed
   ========================================================= */
.nk-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 -.5rem; padding: 0; list-style: none; font: 400 var(--wp--preset--font-size--small)/1 var(--wp--preset--font-family--dm-sans); font-variant-caps: all-small-caps; letter-spacing: .1em; }
.nk-crumbs li { display: inline-flex; align-items: center; margin: 0; color: var(--nk-ink); }
.nk-crumbs li + li::before { content: "/"; margin: 0 .6rem; opacity: .5; }
.nk-crumbs a { display: inline-flex; align-items: center; min-height: var(--nk-tap); color: var(--nk-oxblood); }
.nk-crumbs [aria-current] { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 24ch; }

.nk-trust { display: grid; gap: .55rem; margin: 0; padding: .25rem 0 0; list-style: none; }
.nk-trust li { display: flex; align-items: center; gap: .75rem; margin: 0; font-size: var(--wp--preset--font-size--small); line-height: 1.35; color: var(--nk-ink); }
.nk-trust svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--nk-oxblood); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }

.nk-acc { border-bottom: 1px solid var(--nk-rule); }
.nk-acc > * { margin: 0 !important; }
.nk-acc__item { border-top: 1px solid var(--nk-rule); }
.nk-acc__item > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 56px;
	cursor: pointer;
	list-style: none;
	color: var(--nk-oxblood);
	font: 500 var(--wp--preset--font-size--x-small)/1 var(--wp--preset--font-family--dm-sans);
	letter-spacing: .18em;
	text-transform: uppercase;
}
.nk-acc__item > summary::-webkit-details-marker { display: none; }
.nk-acc__item > summary::after {
	content: "";
	width: 12px;
	height: 12px;
	background: linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
	transition: transform .35s cubic-bezier(.65, 0, .25, 1);
}
.nk-acc__item[open] > summary::after { transform: rotate(135deg); }
.nk-acc__item > summary:focus-visible { outline-offset: -2px; }
.nk-acc__item > :last-child:not(summary) { padding-bottom: 1.25rem; }
.nk-acc .nk-specs { margin: 0 !important; }
.nk-acc .nk-specs__row:first-child { border-top: 0; }
.nk-acc .nk-specs__row:last-child { border-bottom: 0; }
.nk-acc__text { margin: 0 0 .5rem !important; max-width: 48ch; font-size: var(--wp--preset--font-size--small); line-height: 1.6; }
.nk-acc__link { margin: 0 !important; }
.nk-acc__list { padding-left: 1.1rem; }
.nk-acc__list li { margin: 0 0 .3rem; }
.nk-acc__note { font-style: italic; color: var(--nk-oxblood); }
.nk-acc__link a { display: inline-flex; align-items: center; min-height: var(--nk-tap); color: var(--nk-oxblood); font-size: var(--wp--preset--font-size--small); font-weight: 500; }

.nk-recent { padding-block: 0 var(--nk-section-y); }
.nk-recent[hidden] { display: none; }
.nk-recent > h2 { margin: 0 0 var(--wp--preset--spacing--50); text-align: center; }
.nk-recent .nk-grid.wc-block-product-template { margin: 0; }
@media (min-width: 960px) {
	.nk-recent .nk-grid.wc-block-product-template { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}


/* Colour options under the price (inc/colours.php, client 2026-12-05). Two-tone swatch: main colour + a quarter of the border colour. */
.nk-colours { margin: .9rem 0 .4rem; }
.nk-colours__label { margin: 0 0 .5rem; font: 500 var(--wp--preset--font-size--small)/1.3 var(--wp--preset--font-family--dm-sans); letter-spacing: .08em; text-transform: uppercase; }
.nk-colours__name { text-transform: none; letter-spacing: .02em; color: var(--wp--preset--color--oxblood); }
.nk-colours__list { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0 0 0 -6px; padding: 0; list-style: none; }
.nk-colours__sw { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; text-decoration: none; }
.nk-colours__sw::after { content: none !important; }
.nk-colours__sw span { width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(from 225deg, var(--c1) 0 75%, var(--c2) 75% 100%); box-shadow: inset 0 0 0 1px rgba(244, 237, 227, .28); transition: transform .2s cubic-bezier(.2, .7, .2, 1); }
.nk-colours__sw:hover span { transform: scale(1.1); }
.nk-colours__sw.is-current { box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--oxblood); }
.nk-colours__sw.is-out span { opacity: .4; }
.nk-colours__sw.is-out::before { content: ""; position: absolute; width: 30px; height: 1.5px; background: var(--wp--preset--color--ink); transform: rotate(-45deg); opacity: .8; }
.nk-colours__sw:focus-visible { outline: 2px solid var(--wp--preset--color--oxblood); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .nk-colours__sw span { transition: none; } .nk-colours__sw:hover span { transform: none; } }
