/*
 * NJF Product Hero: gallery (2-column grid at 990 px+, swipe carousel below),
 * info column, swatches/pills over WooCommerce's hidden selects, buttons,
 * trust items, fit guide, size guide dialog, lightbox and sticky bar.
 * Rules are scoped under two classes so they outrank the kit's global
 * button/link/heading styles.
 */

.njf-ph {
	--njf-ph-fg: var(--njf-fg, #111);
	--njf-ph-bg: var(--njf-bg, #fff);
	--njf-ph-alt: var(--njf-surface, color-mix(in srgb, var(--njf-ph-fg) 6%, var(--njf-ph-bg)));
	--njf-ph-muted: color-mix(in srgb, var(--njf-ph-fg) 66%, transparent);
	--njf-ph-faint: color-mix(in srgb, var(--njf-ph-fg) 42%, transparent);
	--njf-ph-line: color-mix(in srgb, var(--njf-ph-fg) 18%, transparent);
	--njf-ph-r: 4px;
	--njf-ph-top: calc(var(--njf-announcement-height, 0px) + var(--wp-admin--admin-bar--height, 0px));

	max-width: 1280px;
	margin: 0 auto;
	padding: 25px 24px 0;
	color: var(--njf-ph-fg);
}

.njf-ph .njf-visually-hidden,
.njf-ph__sticky .njf-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.njf-ph .njf-ph__cols {
	display: grid;
	grid-template-columns: 59.5% minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

/* ---- Gallery ---- */
.njf-ph .njf-ph__gallery {
	min-width: 0;
}

.njf-ph .njf-ph__media {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	outline: none;
}

.njf-ph .njf-ph__cell {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: var(--njf-ph-alt);
	overflow: hidden;
	cursor: zoom-in;
	aspect-ratio: 1 / 1;
}

.njf-ph .njf-ph__cell[hidden] {
	display: none;
}

.njf-ph .njf-ph__cell:focus-visible {
	outline: 2px solid var(--njf-ph-fg);
	outline-offset: 2px;
}

.njf-ph .njf-ph__img,
.njf-ph .njf-ph__cell img,
.njf-ph .njf-ph__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.njf-ph .njf-ph__cell--video {
	cursor: default;
}

.njf-ph .njf-ph__zoom {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgb(0 0 0 / 55%);
	color: #fff;
	opacity: 0;
	transition: opacity 0.2s;
	pointer-events: none;
}

.njf-ph .njf-ph__cell:hover .njf-ph__zoom,
.njf-ph .njf-ph__cell:focus-visible .njf-ph__zoom {
	opacity: 1;
}

.njf-ph .njf-ph__dots {
	display: none;
}

/* ---- Info ---- */
.njf-ph .njf-ph__info {
	position: sticky;
	top: calc(var(--njf-ph-top) + 24px);
	min-width: 0;
	padding-bottom: 40px;
	display: flex;
	flex-direction: column;
}

.njf-ph .njf-ph__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
}

.njf-ph .njf-ph__title {
	flex: 1;
	min-width: 0;
	margin: 0 0 3px;
	font-size: clamp(1.125rem, 1.8vw, 1.5rem);
	line-height: 1.2;
	color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__head p.njf-ph__price.price,
.njf-ph .njf-ph__head p.njf-ph__price.price .amount {
	color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: flex-end;
	gap: 6px;
	flex-shrink: 0;
	margin: 0;
	padding-top: 2px;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--njf-ph-fg);
	white-space: nowrap;
}

.njf-ph .njf-ph__price del,
.njf-ph__sticky .njf-ph__sticky-price del {
	font-size: 0.9375rem;
	font-weight: 400;
	color: var(--njf-ph-faint);
}

.njf-ph .njf-ph__price ins,
.njf-ph__sticky .njf-ph__sticky-price ins {
	text-decoration: none;
	background: none;
}

.njf-ph .njf-ph__sub {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 4px;
}

.njf-ph .njf-ph__subtitle {
	margin: 0;
	font-size: 15px;
	letter-spacing: 0.02em;
	color: var(--njf-ph-muted);
}

.njf-ph .njf-ph__rating {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8125rem;
	color: var(--njf-ph-muted);
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}

.njf-ph .njf-ph__stars {
	--njf-star: #f5a623;

	position: relative;
	display: inline-block;
	font-size: 1rem;
	line-height: 1;
	letter-spacing: 1px;
}

.njf-ph .njf-ph__stars::before {
	content: "★★★★★";
	color: var(--njf-ph-line);
}

.njf-ph .njf-ph__stars::after {
	content: "★★★★★";
	position: absolute;
	inset: 0 auto 0 0;
	width: var(--njf-rating, 0%);
	overflow: hidden;
	color: var(--njf-star);
}

.njf-ph .njf-ph__crumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
	font-size: 0.75rem;
	color: var(--njf-ph-muted);
}

.njf-ph .njf-ph__crumbs li + li::before {
	content: "/";
	margin-right: 4px;
	color: var(--njf-ph-faint);
}

.njf-ph .njf-ph__crumbs a {
	color: var(--njf-ph-muted);
	text-decoration: none;
}

.njf-ph .njf-ph__crumbs a:hover {
	color: var(--njf-ph-fg);
	text-decoration: underline;
}

.njf-ph .njf-ph__crumbs [aria-current] {
	display: inline-block;
	max-width: 160px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: bottom;
	color: var(--njf-ph-faint);
}

.njf-ph .njf-ph__deal {
	display: flex;
	width: fit-content;
	align-items: center;
	gap: 6px;
	margin: -12px 0 20px;
	font-size: 13px;
	letter-spacing: 0.02em;
	color: var(--njf-ph-muted);
	text-decoration: none;
}

.njf-ph a.njf-ph__deal:hover {
	color: var(--njf-ph-fg);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.njf-ph .njf-ph__desc {
	margin-bottom: 20px;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--njf-ph-muted);
}

.njf-ph .njf-ph__desc p {
	margin: 0 0 0.75em;
}

.njf-ph .njf-ph__desc p:last-child {
	margin-bottom: 0;
}

/* ---- Options ---- */
.njf-ph .njf-ph__options {
	margin-bottom: 8px;
}

.njf-ph .njf-ph__option {
	min-width: 0;
	margin: 0 0 18px;
	padding: 0;
	border: 0;
}

.njf-ph .njf-ph__label-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}

.njf-ph .njf-ph__label-row--end {
	justify-content: flex-end;
	margin-top: -8px;
}

.njf-ph .njf-ph__label {
	float: left;
	padding: 0;
	font-size: 0.875rem;
	color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__label-row + * {
	clear: both;
}

.njf-ph .njf-ph__guide-btn,
.njf-ph .njf-ph__guide-btn:hover,
.njf-ph .njf-ph__guide-btn:focus {
	padding: 0;
	border: 0;
	background: none;
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--njf-ph-muted);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}

.njf-ph .njf-ph__guide-btn:hover {
	color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__swatches,
.njf-ph .njf-ph__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.njf-ph .njf-ph__pills {
	gap: 8px;
}

.njf-ph .njf-ph__swatch {
	position: relative;
	cursor: pointer;
}

.njf-ph .njf-ph__face {
	display: block;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--njf-ph-alt);
	box-shadow: 0 0 0 1px var(--njf-ph-line);
	transition: box-shadow 0.15s;
}

.njf-ph .njf-ph__face--unknown {
	background: repeating-linear-gradient(135deg, var(--njf-ph-alt) 0 6px, var(--njf-ph-line) 6px 7px);
}

.njf-ph .njf-ph__swatch.is-selected .njf-ph__face {
	box-shadow: 0 0 0 2px var(--njf-ph-bg), 0 0 0 3px var(--njf-ph-fg);
}

.njf-ph .njf-ph__swatch:hover:not(.is-selected) .njf-ph__face {
	box-shadow: 0 0 0 2px var(--njf-ph-bg), 0 0 0 3px var(--njf-ph-faint);
}

.njf-ph .njf-ph__swatch input:focus-visible + .njf-ph__face {
	outline: 2px solid var(--njf-ph-fg);
	outline-offset: 5px;
}

.njf-ph .njf-ph__swatch.is-unavailable .njf-ph__face {
	opacity: 0.45;
	background-image: linear-gradient(135deg, transparent calc(50% - 1px), var(--njf-ph-fg) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}

.njf-ph .njf-ph__tip {
	position: absolute;
	bottom: calc(100% + 12px);
	left: 50%;
	z-index: 3;
	padding: 8px 16px;
	border-radius: 50px;
	background: var(--njf-ph-fg);
	color: var(--njf-ph-bg);
	box-shadow: 0 4px 16px -4px rgb(0 0 0 / 20%);
	font-size: 0.75rem;
	line-height: 1.6;
	white-space: nowrap;
	transform: translateX(-50%);
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.15s;
	pointer-events: none;
}

@media (hover: hover) {
	.njf-ph .njf-ph__swatch:hover .njf-ph__tip {
		visibility: visible;
		opacity: 1;
	}
}

.njf-ph .njf-ph__pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 56px;
	padding: 8px 16px;
	border: 1px solid var(--njf-ph-line);
	border-radius: var(--njf-ph-r);
	background: var(--njf-ph-bg);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--njf-ph-fg);
	cursor: pointer;
	user-select: none;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.njf-ph .njf-ph__pill:hover {
	border-color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__pill:has(input:focus-visible) {
	outline: 2px solid var(--njf-ph-fg);
	outline-offset: 2px;
}

.njf-ph .njf-ph__pill.is-selected {
	border-color: var(--njf-ph-fg);
	background: var(--njf-ph-fg);
	color: var(--njf-ph-bg);
}

.njf-ph .njf-ph__pill.is-unavailable span {
	text-decoration: line-through;
	opacity: 0.55;
}

/* ---- WooCommerce form underneath ---- */
.njf-ph .variations_form .variations,
.njf-ph .variations_form .reset_variations,
.njf-ph .variations_form .woocommerce-variation-price,
.njf-ph .variations_form .woocommerce-variation-description {
	display: none !important;
}

.njf-ph--no-qty .njf-ph__buy .quantity {
	display: none !important;
}

.njf-ph .njf-ph__buy form.cart {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 10px;
}

.njf-ph .njf-ph__buy .woocommerce-variation-add-to-cart,
.njf-ph .njf-ph__buy form.cart:not(.variations_form) {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.njf-ph .njf-ph__buy .quantity .qty {
	width: 72px;
	min-height: 50px;
	border: 1px solid var(--njf-ph-line);
	border-radius: var(--njf-ph-r);
	background: transparent;
	color: var(--njf-ph-fg);
	text-align: center;
}

.njf-ph .njf-ph__buy .single_add_to_cart_button.button,
.njf-ph .njf-ph__buy .single_add_to_cart_button.button:hover,
.njf-ph .njf-ph__buy .single_add_to_cart_button.button:focus {
	flex: 1 1 100%;
	min-height: 50px;
	padding: 16px 24px;
	border: 0;
	border-radius: var(--njf-ph-r);
	background: var(--njf-ph-fg);
	color: var(--njf-ph-bg);
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: opacity 0.2s;
}

.njf-ph--no-qty .njf-ph__buy .single_add_to_cart_button {
	flex-basis: 100%;
}

.njf-ph .njf-ph__buy .quantity + .single_add_to_cart_button {
	flex: 1 1 0;
}

.njf-ph .njf-ph__buy .single_add_to_cart_button.button:hover {
	opacity: 0.85;
}

.njf-ph .njf-ph__buy .single_add_to_cart_button.disabled,
.njf-ph .njf-ph__buy .single_add_to_cart_button.loading {
	opacity: 0.5;
	cursor: not-allowed;
}

.njf-ph .njf-ph__buy .single_add_to_cart_button.loading {
	cursor: progress;
}

.njf-ph .njf-ph__buy .njf-ph__buynow,
.njf-ph .njf-ph__buy .njf-ph__buynow:focus {
	flex: 1 1 100%;
	min-height: 50px;
	padding: 15px 24px;
	border: 1.5px solid var(--njf-ph-fg);
	border-radius: var(--njf-ph-r);
	background: transparent;
	color: var(--njf-ph-fg);
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.njf-ph .njf-ph__buy .njf-ph__buynow:hover {
	background: var(--njf-ph-fg);
	color: var(--njf-ph-bg);
}

.njf-ph .njf-ph__buy .njf-ph__buynow:disabled {
	opacity: 0.5;
}

.njf-ph .njf-ph__buy p.stock.stock {
	margin: 0;
	font-size: 0.875rem;
	color: var(--njf-ph-muted);
}

.njf-ph .njf-ph__buy p.stock.out-of-stock {
	color: var(--njf-ph-fg);
	font-weight: 600;
}

.njf-ph .njf-ph__status {
	margin: 0;
	font-size: 0.875rem;
	color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__status:empty {
	display: none;
}

.njf-ph .njf-ph__delivery {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 2px 0 0;
	font-size: 14px;
	font-weight: 600;
}

.njf-ph .njf-ph__dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #22a722;
	flex-shrink: 0;
}

.njf-ph .njf-ph__buy {
	margin-bottom: 20px;
}

.njf-ph .njf-ph__extra:empty {
	display: none;
}

/* ---- Trust ---- */
.njf-ph .njf-ph__trust {
	margin: 0 0 24px;
	padding: 8px 0 0;
	border-top: 1px solid var(--njf-ph-line);
	list-style: none;
}

.njf-ph .njf-ph__trust-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 8px 6px;
	margin-inline: -6px;
	border-radius: var(--njf-ph-r);
	color: inherit;
	text-decoration: none;
}

.njf-ph a.njf-ph__trust-item:hover {
	background: var(--njf-ph-alt);
}

.njf-ph .njf-ph__trust-icon {
	display: flex;
	flex-shrink: 0;
	color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__trust-item strong {
	display: block;
	margin-bottom: 2px;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__trust-item strong + span {
	display: block;
	font-size: 12px;
	line-height: 1.35;
	color: var(--njf-ph-muted);
}

/* ---- Fit guide ---- */
.njf-ph .njf-ph__fit-heading {
	margin: 0 0 16px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__fit-row {
	margin-bottom: 18px;
}

.njf-ph .njf-ph__fit-name {
	margin: 0 0 8px;
	font-size: 0.8125rem;
	font-weight: 600;
}

.njf-ph .njf-ph__fit-track {
	position: relative;
	height: 6px;
	margin-bottom: 6px;
	border-radius: 3px;
	background: var(--njf-ph-line);
}

.njf-ph .njf-ph__fit-track span {
	position: absolute;
	inset: 0 auto 0 0;
	border-radius: 3px;
	background: var(--njf-ph-fg);
}

.njf-ph .njf-ph__fit-scale {
	display: flex;
	justify-content: space-between;
	margin: 0;
	font-size: 0.6875rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--njf-ph-muted);
}

/* ---- Dialogs ---- */
.njf-ph .njf-ph__dialog {
	width: min(600px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	padding: 24px;
	border: 0;
	border-radius: 8px;
	background: var(--njf-ph-alt);
	color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__dialog::backdrop {
	background: rgb(0 0 0 / 50%);
}

.njf-ph .njf-ph__dialog-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.njf-ph .njf-ph__dialog-head h2 {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__close,
.njf-ph .njf-ph__close:hover,
.njf-ph .njf-ph__close:focus {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--njf-ph-muted);
	cursor: pointer;
}

.njf-ph .njf-ph__close:hover {
	color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__table-wrap {
	overflow-x: auto;
}

.njf-ph .njf-ph__table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.njf-ph .njf-ph__table th,
.njf-ph .njf-ph__table td {
	padding: 0.75rem 1rem;
	border: 0;
	border-top: 1px solid var(--njf-ph-line);
	background: none;
	text-align: left;
	color: var(--njf-ph-muted);
}

.njf-ph .njf-ph__table thead th {
	border-top: 0;
	border-bottom: 2px solid var(--njf-ph-line);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__table tbody th {
	font-weight: 600;
	white-space: nowrap;
	color: var(--njf-ph-fg);
}

.njf-ph .njf-ph__note {
	margin: 0.75rem 0 0;
	font-size: 0.8125rem;
	color: var(--njf-ph-muted);
}

.njf-ph .njf-ph__guide-img {
	display: block;
	width: 100%;
	height: auto;
}

.njf-ph .njf-ph__lightbox {
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgb(0 0 0 / 93%);
	color: #fff;
}

.njf-ph .njf-ph__lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
}

.njf-ph .njf-ph__lightbox::backdrop {
	background: transparent;
}

.njf-ph .njf-ph__lb-img {
	max-width: min(92vw, 1200px);
	max-height: 88vh;
	object-fit: contain;
	user-select: none;
}

.njf-ph .njf-ph__lb-btn,
.njf-ph .njf-ph__lb-btn:hover,
.njf-ph .njf-ph__lb-btn:focus {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / 12%);
	font-size: 30px;
	line-height: 1;
	color: #fff;
	cursor: pointer;
}

.njf-ph .njf-ph__lb-btn:hover {
	background: rgb(255 255 255 / 22%);
}

.njf-ph .njf-ph__lb-btn[hidden] {
	display: none;
}

.njf-ph .njf-ph__lb-close {
	top: 14px;
	right: 14px;
	width: 38px;
	height: 38px;
	font-size: 22px;
}

.njf-ph .njf-ph__lb-prev {
	top: 50%;
	left: 14px;
	transform: translateY(-50%);
}

.njf-ph .njf-ph__lb-next {
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
}

.njf-ph .njf-ph__lb-count {
	position: absolute;
	bottom: 14px;
	left: 50%;
	margin: 0;
	font-size: 12px;
	letter-spacing: 0.04em;
	color: rgb(255 255 255 / 60%);
	transform: translateX(-50%);
}

/* ---- Sticky bar (moved to <body> by the script) ---- */
.njf-ph__sticky {
	--njf-ph-fg: var(--njf-fg, #111);
	--njf-ph-bg: var(--njf-bg, #fff);

	position: fixed;
	top: calc(var(--njf-announcement-height, 0px) + var(--wp-admin--admin-bar--height, 0px));
	right: 0;
	left: 0;
	z-index: 900;
	border-bottom: 1px solid color-mix(in srgb, var(--njf-ph-fg) 18%, transparent);
	background: var(--njf-ph-bg);
	color: var(--njf-ph-fg);
	box-shadow: 0 2px 12px rgb(0 0 0 / 8%);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.njf-ph__sticky.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.njf-ph__sticky .njf-ph__sticky-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	max-width: 1280px;
	height: 80px;
	margin: 0 auto;
	padding: 0 40px;
}

.njf-ph__sticky .njf-ph__sticky-meta {
	flex: 1;
	min-width: 0;
}

.njf-ph__sticky p {
	margin: 0;
	line-height: 1.25;
}

.njf-ph__sticky .njf-ph__sticky-name {
	overflow: hidden;
	font-size: 1.0625rem;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.njf-ph__sticky .njf-ph__sticky-type,
.njf-ph__sticky .njf-ph__sticky-variant {
	font-size: 0.9375rem;
	color: color-mix(in srgb, var(--njf-ph-fg) 62%, transparent);
	white-space: nowrap;
}

.njf-ph__sticky .njf-ph__sticky-variant:empty {
	display: none;
}

.njf-ph__sticky .njf-ph__sticky-thumb {
	width: 62px;
	height: 62px;
	object-fit: cover;
	border-radius: 4px;
}

.njf-ph__sticky .njf-ph__sticky-price {
	display: flex;
	gap: 6px;
	align-items: baseline;
	font-size: 1.125rem;
	font-weight: 700;
	white-space: nowrap;
}

.njf-ph__sticky .njf-ph__sticky-btn,
.njf-ph__sticky .njf-ph__sticky-btn:hover,
.njf-ph__sticky .njf-ph__sticky-btn:focus {
	margin-left: 16px;
	padding: 18px 36px;
	border: 0;
	border-radius: 4px;
	background: var(--njf-ph-fg);
	color: var(--njf-ph-bg);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
}

.njf-ph__sticky .njf-ph__sticky-btn:hover {
	opacity: 0.85;
}

/* ---- Tablets and phones: one column, swipe gallery ---- */
@media (max-width: 989px) {
	/* Never let the photo carousel widen the page (phones zoom out to fit it). */
	.njf-ph {
		padding: 0;
		max-width: 100vw;
		overflow-x: clip;
	}

	.njf-ph .njf-ph__gallery,
	.njf-ph .njf-ph__media {
		max-width: 100%;
	}

	.njf-ph .njf-ph__cols {
		grid-template-columns: minmax(0, 1fr);
		gap: 0;
	}

	.njf-ph .njf-ph__media {
		display: flex;
		gap: 0;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		overscroll-behavior-x: contain;
	}

	.njf-ph .njf-ph__media::-webkit-scrollbar {
		display: none;
	}

	.njf-ph .njf-ph__cell {
		flex: 0 0 100%;
		scroll-snap-align: start;
	}

	.njf-ph .njf-ph__zoom {
		opacity: 0.75;
	}

	.njf-ph .njf-ph__dots:not([hidden]) {
		display: flex;
		justify-content: center;
		gap: 4px;
		padding: 10px 12px;
		overflow: hidden;
	}

	.njf-ph .njf-ph__dot-btn,
	.njf-ph .njf-ph__dot-btn:hover,
	.njf-ph .njf-ph__dot-btn:focus {
		flex-shrink: 0;
		width: 14px;
		height: 3px;
		min-height: 0;
		padding: 0;
		border: 0;
		border-radius: 2px;
		background: var(--njf-ph-line);
		cursor: pointer;
	}

	.njf-ph .njf-ph__dot-btn.is-active {
		background: var(--njf-ph-fg);
	}

	.njf-ph .njf-ph__info {
		position: static;
		padding: 16px 24px 40px;
	}

	/* Phones: options and buttons first, description after the trust items (as the source theme). */
	.njf-ph .njf-ph__desc {
		order: 7;
		margin: 0;
		padding: 0 0 16px;
		border-bottom: 1px solid var(--njf-ph-line);
	}

	.njf-ph .njf-ph__trust {
		order: 6;
	}

	.njf-ph .njf-ph__fit {
		order: 8;
		margin-top: 16px;
	}

	.njf-ph__sticky .njf-ph__sticky-inner {
		height: 72px;
		padding: 0 16px;
		gap: 12px;
	}

	.njf-ph__sticky .njf-ph__sticky-meta {
		display: none;
	}

	.njf-ph__sticky .njf-ph__sticky-thumb {
		order: -1;
		width: 56px;
		height: 56px;
	}

	.njf-ph__sticky .njf-ph__sticky-col {
		flex: 1;
		min-width: 0;
	}

	.njf-ph__sticky .njf-ph__sticky-price {
		font-size: 1rem;
	}

	.njf-ph__sticky .njf-ph__sticky-btn,
	.njf-ph__sticky .njf-ph__sticky-btn:hover,
	.njf-ph__sticky .njf-ph__sticky-btn:focus {
		margin-left: 0;
		padding: 14px 18px;
		font-size: 0.875rem;
	}
}

@media (max-width: 749px) {
	.njf-ph .njf-ph__info {
		padding-inline: 16px;
	}

	.njf-ph .njf-ph__swatches {
		gap: 9px;
	}

	.njf-ph .njf-ph__table {
		font-size: 0.8125rem;
	}

	.njf-ph .njf-ph__table th,
	.njf-ph .njf-ph__table td {
		padding: 0.625rem 0.5rem;
	}

	.njf-ph .njf-ph__lb-prev {
		left: 8px;
	}

	.njf-ph .njf-ph__lb-next {
		right: 8px;
	}
}

/* WordPress's toolbar scrolls away on narrow screens, so only the fixed announcement bar counts. */
@media (max-width: 600px) {
	.njf-ph__sticky {
		top: var(--njf-announcement-height, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.njf-ph__sticky,
	.njf-ph__sticky.is-visible {
		transition: none;
	}
}
