/* JMarzTech Gallery Pro — download bar, selection, buy/download buttons. */
.jmz-dlbar {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 0.8em;
	font-size: 0.9em;
}
.jmz-dlbar .jmz-sp {
	flex: 1;
}
.jmz-dl-count {
	color: #888;
}
.jmz-dl-go {
	padding: 0.45em 1em;
	border: 0;
	border-radius: 4px;
	background: #222;
	color: #fff;
	cursor: pointer;
}
.jmz-dl-go[disabled] {
	opacity: 0.4;
	cursor: default;
}
.jmz-dl-go.is-busy {
	opacity: 0.6;
	cursor: progress;
}
.jmz-pick {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3;
	line-height: 0;
	cursor: pointer;
}
.jmz-pick input {
	width: 22px;
	height: 22px;
	margin: 0;
	cursor: pointer;
	accent-color: #222;
	background: #fff;
	border-radius: 3px;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}
.jmz-style-list .jmz-pick {
	top: 8px;
	left: 8px;
	right: auto;
}
.jmz-card.is-picked {
	outline: 3px solid #222;
	outline-offset: -3px;
}
.jmz-dl-note {
	font-size: 0.85em;
	color: #b32d2e;
	flex-basis: 100%;
}
.jmz-btn {
	display: inline-block;
	padding: 0.6em 1.2em;
	border-radius: 4px;
	text-decoration: none;
	font-weight: 600;
	line-height: 1;
}
.jmz-btn-buy {
	background: var(--jmz-buy-bg, #222);
	color: var(--jmz-buy-fg, #fff);
	transition:
		background-color 0.15s,
		color 0.15s;
}
.jmz-btn-buy:hover,
.jmz-btn-buy:focus-visible {
	background: var(--jmz-buy-hover, var(--jmz-buy-bg, #000));
	color: var(--jmz-buy-hover-fg, var(--jmz-buy-fg, #fff));
}
.jmz-btn-download {
	background: #eee;
	color: #222;
}
.jmz-note {
	flex-basis: 100%;
	font-size: 0.8em;
	color: #888;
}

/* ---------- hover effects ---------- */
/* An explicit "None": cancels the base plugin's own zoom as well. */
.jmz-hv-none .jmz-card:hover img {
	transform: none;
}
/* The base plugin applies a fixed 1.03 zoom; every effect here overrides it. */
.jmz-hv-zoom .jmz-card img,
.jmz-hv-zoomout .jmz-card img,
.jmz-hv-tint .jmz-card img,
.jmz-hv-mono .jmz-card img,
.jmz-hv-monorev .jmz-card img,
.jmz-hv-lift .jmz-card img {
	transition:
		transform var(--jmz-hv-ms, 300ms) ease,
		filter var(--jmz-hv-ms, 300ms) ease;
}

.jmz-hv-zoom .jmz-card:hover img,
.jmz-hv-zoomout .jmz-card:hover img {
	transform: scale(var(--jmz-hv-scale, 1.04));
}

/* Tint sits over the photo, under the caption, and never blocks the click. */
.jmz-hv-tint .jmz-card > a {
	position: relative;
}
.jmz-hv-tint .jmz-card > a::after {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: var(--jmz-hv-tint, #6d28d9);
	opacity: 0;
	transition: opacity var(--jmz-hv-ms, 300ms) ease;
	border-radius: inherit;
}
.jmz-hv-tint .jmz-card:hover > a::after {
	opacity: var(--jmz-hv-opacity, 0.4);
}
.jmz-hv-tint .jmz-card:hover img {
	transform: none;
}

.jmz-hv-mono .jmz-card img {
	filter: grayscale(0);
}
.jmz-hv-mono .jmz-card:hover img {
	filter: grayscale(var(--jmz-hv-grey, 1));
	transform: none;
}
/* Its own effect: grey at rest, colour on hover. */
.jmz-hv-monorev .jmz-card img {
	filter: grayscale(var(--jmz-hv-grey, 1));
}
.jmz-hv-monorev .jmz-card:hover img {
	filter: grayscale(0);
	transform: none;
}

.jmz-hv-lift .jmz-card {
	transition:
		transform var(--jmz-hv-ms, 300ms) ease,
		box-shadow var(--jmz-hv-ms, 300ms) ease;
}
.jmz-hv-lift .jmz-card:hover {
	transform: translateY(var(--jmz-hv-lift, -6px));
	box-shadow: var(--jmz-hv-shadow, 0 10px 20px) rgba(22, 18, 31, 0.18);
}
.jmz-hv-lift .jmz-card:hover img {
	transform: none;
}

/* A tap should not leave an effect stuck on, so on touch screens they apply only while pressed. */
@media (hover: none) {
	.jmz-hv-zoom .jmz-card:hover img,
	.jmz-hv-zoomout .jmz-card:hover img,
	.jmz-hv-mono .jmz-card:hover img {
		transform: none;
		filter: none;
	}
	.jmz-hv-monorev .jmz-card:hover img {
		filter: grayscale(var(--jmz-hv-grey, 1));
	}
	.jmz-hv-monorev .jmz-card:active img {
		filter: grayscale(0);
	}
	.jmz-hv-tint .jmz-card:hover > a::after {
		opacity: 0;
	}
	.jmz-hv-lift .jmz-card:hover {
		transform: none;
		box-shadow: none;
	}
	.jmz-hv-zoom .jmz-card:active img,
	.jmz-hv-zoomout .jmz-card:active img {
		transform: scale(var(--jmz-hv-scale, 1.04));
	}
	.jmz-hv-tint .jmz-card:active > a::after {
		opacity: var(--jmz-hv-opacity, 0.4);
	}
	.jmz-hv-lift .jmz-card:active {
		transform: translateY(var(--jmz-hv-lift, -6px));
		box-shadow: var(--jmz-hv-shadow, 0 10px 20px) rgba(22, 18, 31, 0.18);
	}
}

/* Movement is dropped for visitors who ask for reduced motion; colour effects still work. */
@media (prefers-reduced-motion: reduce) {
	.jmz-hv-zoom .jmz-card img,
	.jmz-hv-zoomout .jmz-card img,
	.jmz-hv-tint .jmz-card > a::after,
	.jmz-hv-mono .jmz-card img,
	.jmz-hv-monorev .jmz-card img,
	.jmz-hv-lift .jmz-card {
		transition-duration: 0.01ms;
	}
	.jmz-hv-zoom .jmz-card:hover img,
	.jmz-hv-zoomout .jmz-card:hover img {
		transform: none;
	}
	.jmz-hv-lift .jmz-card:hover {
		transform: none;
	}
}

/* List, wide layout: the selection checkbox belongs over the photo, which sits on the right. */
.jmz-style-list.jmz-list-wide .jmz-pick {
	left: auto;
	right: 10px;
}

/* ---- Item page layouts (Card, Hero, Catalog, Sidebar, Filmstrip, Editorial) ---- */

/* --- Sidebar: info left, larger image right --- */
@media (min-width: 821px) {
	.jmz-s-split-right .jmz-single-layout {
		grid-template-columns: minmax(260px, 1fr) minmax(0, 2.4fr);
	}
	.jmz-s-split-right .jmz-single-image {
		order: 2;
	}
	.jmz-s-split-right .jmz-single-info {
		order: 1;
	}
}

/* --- Card: framed and centred --- */
.jmz-s-card .jmz-single-layout {
	display: block;
	max-width: 820px;
	margin: 0 auto;
	border: 1px solid rgba(127, 127, 127, 0.22);
	border-radius: 12px;
	overflow: hidden;
	background: rgba(127, 127, 127, 0.05);
}
.jmz-s-card .jmz-single-image {
	padding: 0.85rem 0.85rem 0;
}
.jmz-s-card .jmz-single-info {
	padding: 1rem 1.5rem 1.5rem;
}

/* --- Hero: title and details over the image --- */
@media (min-width: 821px) {
	.jmz-s-overlay .jmz-single-layout {
		display: block;
		position: relative;
	}
	.jmz-s-overlay .jmz-hero {
		width: 100%;
		max-height: 72vh;
		object-fit: cover;
		border-radius: 10px;
	}
	/* The scrim darkens the lower part of the photo enough for white text on any image. */
	.jmz-s-overlay .jmz-single-info {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		padding: 6rem 1.75rem 1.5rem;
		color: #fff;
		border-radius: 0 0 10px 10px;
		background: linear-gradient(
			to top,
			rgba(0, 0, 0, 0.88) 0%,
			rgba(0, 0, 0, 0.7) 45%,
			rgba(0, 0, 0, 0) 100%
		);
		text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
	}
	.jmz-s-overlay .jmz-single-info .jmz-title {
		color: #fff;
		margin: 0 0 0.3rem;
	}
	.jmz-s-overlay .jmz-single-info a:not(.jmz-btn) {
		color: #fff;
		text-decoration: underline;
		text-decoration-color: rgba(255, 255, 255, 0.45);
		text-underline-offset: 3px;
	}
	.jmz-s-overlay .jmz-single-info a:not(.jmz-btn):hover {
		text-decoration-color: #fff;
	}
	.jmz-s-overlay .jmz-crumbs,
	.jmz-s-overlay .jmz-meta dt {
		color: rgba(255, 255, 255, 0.78);
		opacity: 1;
	}
	/* A video keeps its controls: the details sit under the player rather than over it. */
	.jmz-s-overlay.jmz-s-video .jmz-single-info {
		position: static;
		padding: 1.25rem 0 0;
		color: inherit;
		background: none;
		text-shadow: none;
		border-radius: 0;
	}
	.jmz-s-overlay.jmz-s-video .jmz-single-info .jmz-title {
		color: inherit;
	}
	.jmz-s-overlay.jmz-s-video .jmz-single-info a:not(.jmz-btn) {
		color: inherit;
		text-decoration-color: currentColor;
	}
	.jmz-s-overlay.jmz-s-video .jmz-crumbs,
	.jmz-s-overlay.jmz-s-video .jmz-meta dt {
		color: #888;
	}
	/* Buttons keep their own colours; the white link colour above must not reach them. */
	.jmz-s-overlay .jmz-single-info .jmz-btn {
		text-shadow: none;
		text-decoration: none;
	}
	/* The crumbs and prev/next live outside the gradient. */
	.jmz-s-overlay .jmz-prevnext {
		margin-top: 0.75rem;
	}
}

/* --- Centred alignment --- */
.jmz-s-align-center .jmz-single-info {
	text-align: center;
}
.jmz-s-align-center .jmz-meta {
	grid-template-columns: auto auto;
	justify-content: center;
	text-align: left;
}

/* --- Field list styles --- */
.jmz-s-fields-table .jmz-meta {
	display: grid;
	grid-template-columns: minmax(0, auto) minmax(0, 1fr);
	gap: 0;
}
.jmz-s-fields-table .jmz-meta dt,
.jmz-s-fields-table .jmz-meta dd {
	margin: 0;
	padding: 0.5rem 0.9rem 0.5rem 0;
	border-top: 1px solid rgba(127, 127, 127, 0.2);
}
.jmz-s-fields-table .jmz-meta dt {
	white-space: nowrap;
	font-weight: 600;
}

.jmz-s-fields-inline .jmz-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 0.8rem;
	font-size: 0.9em;
	opacity: 0.8;
	margin-bottom: 1.25rem;
}
.jmz-s-fields-inline .jmz-meta dt,
.jmz-s-fields-inline .jmz-meta dd {
	display: inline;
	margin: 0;
}
.jmz-s-fields-inline .jmz-meta dd + dt::before {
	content: '·';
	margin-right: 0.8rem;
	opacity: 0.55;
}

/* --- Filmstrip --- */
.jmz-strip {
	display: flex;
	gap: 0.5rem;
	margin: 0.75rem 0 0;
	overflow-x: auto;
	padding-bottom: 0.3rem;
}
.jmz-strip-item {
	flex: 0 0 auto;
	width: 88px;
	line-height: 0;
	border-radius: 4px;
	overflow: hidden;
	opacity: 0.78;
	transition: opacity 0.15s ease;
}
.jmz-strip-item:hover,
.jmz-strip-item:focus {
	opacity: 1;
}
.jmz-strip-item img {
	width: 88px;
	height: 88px;
	object-fit: cover;
}

/* Card: image centred in the frame, details centred as a block, actions left. */
.jmz-s-card .jmz-single-image {
	text-align: center;
}
.jmz-s-card .jmz-single-image a {
	display: inline-block;
}
.jmz-s-card .jmz-hero {
	margin: 0 auto;
}
.jmz-s-card .jmz-actions {
	text-align: left;
}
.jmz-s-card .jmz-title {
	margin-top: 0.75rem;
}

/* Catalog: the image takes what it needs (up to 55%), the table the rest, so the pair spans the
   same measure as the related row beneath it and both share left and right edges. */
.jmz-s-fields-table .jmz-single-layout {
	grid-template-columns: fit-content(55%) minmax(280px, 1fr);
	gap: 2rem;
}

/* Filmstrip heading, matching the "Related" heading the grid uses. */
.jmz-strip-h {
	margin: 1.25rem 0 0.4rem;
	font-size: 1.05em;
}

/* ---------- Pro display layouts ---------- */

/* Justified rows: every photo keeps its shape and each row is the same height, filling the width.
   pro-front.js packs the rows and sets each tile's width (.jmz-jst). Without it, this flex fallback
   sizes tiles in proportion to their photo's ratio (--jmz-ar, set on the card). */
.jmz-style-justified .jmz-grid {
	display: flex;
	flex-wrap: wrap;
	gap: var(--jmz-gap);
}
.jmz-style-justified .jmz-grid::after {
	content: '';
	flex-grow: 999999;
}
.jmz-style-justified .jmz-card {
	flex: calc(var(--jmz-ar, 1.5) * 1000) 1 calc(var(--jmz-ar, 1.5) * var(--jmz-rowh, 220px));
	min-width: 0;
}
.jmz-style-justified .jmz-card img {
	aspect-ratio: var(--jmz-ar, auto);
	object-fit: cover;
}
.jmz-style-justified .jmz-grid.jmz-jst .jmz-card {
	flex: 0 0 auto;
}
.jmz-style-justified .jmz-grid.jmz-jst::after {
	display: none;
}
.jmz-style-justified .jmz-noposter {
	aspect-ratio: 16/9;
}
@media (max-width: 820px) {
	.jmz-style-justified .jmz-card {
		flex-basis: calc(var(--jmz-ar, 1.5) * min(var(--jmz-rowh, 220px), 140px));
	}
}

/* Carousel: one row that scrolls sideways, Columns tiles in view, snapping tile by tile. */
.jmz-style-carousel .jmz-car {
	position: relative;
}
.jmz-style-carousel .jmz-grid {
	display: grid;
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--jmz-cols) - 1) * var(--jmz-gap)) / var(--jmz-cols));
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}
.jmz-style-carousel .jmz-grid::-webkit-scrollbar {
	display: none;
}
.jmz-style-carousel .jmz-card {
	scroll-snap-align: start;
}
@media (max-width: 820px) {
	.jmz-style-carousel .jmz-grid {
		grid-template-columns: none;
		grid-auto-columns: 72%;
	}
}
.jmz-car-btn {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 40px;
	height: 40px;
	margin-top: -20px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: #1d2327;
	font-size: 22px;
	line-height: 40px;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
	transition: opacity 0.2s;
}
.jmz-car-btn:hover,
.jmz-car-btn:focus-visible {
	background: #fff;
}
.jmz-car-prev {
	left: 8px;
}
.jmz-car-next {
	right: 8px;
}
.jmz-car-btn[disabled] {
	opacity: 0;
	pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
	.jmz-style-carousel .jmz-grid {
		scroll-behavior: auto;
	}
}

/* Mosaic: square tiles with every sixth one double size. Dense packing fills the gaps the big
   tiles leave. Captions sit over the photo here, since text under a tile would break the squares. */
.jmz-style-mosaic .jmz-grid {
	grid-auto-flow: dense;
}
.jmz-style-mosaic .jmz-card {
	aspect-ratio: 1;
}
.jmz-style-mosaic .jmz-card:nth-child(6n + 1) {
	grid-column: span 2;
	grid-row: span 2;
}
.jmz-style-mosaic .jmz-card > a,
.jmz-style-mosaic .jmz-card > a > .jmz-noposter {
	height: 100%;
}
.jmz-style-mosaic .jmz-card img {
	width: 100%;
	height: 100% !important; /* the card's inline height:auto would otherwise win */
	aspect-ratio: auto;
	object-fit: cover;
}
.jmz-style-mosaic.jmz-cap-above .jmz-card,
.jmz-style-mosaic.jmz-cap-below .jmz-card {
	overflow: hidden;
}
.jmz-style-mosaic.jmz-cap-above figcaption,
.jmz-style-mosaic.jmz-cap-below figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 0.6em 0.8em;
	color: #fff;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}
.jmz-style-mosaic.jmz-cap-above figcaption .jmz-c1,
.jmz-style-mosaic.jmz-cap-below figcaption .jmz-c1,
.jmz-style-mosaic.jmz-cap-above figcaption .jmz-c2,
.jmz-style-mosaic.jmz-cap-below figcaption .jmz-c2 {
	color: inherit;
}
