/*
 * Autoplius-style product lightbox (built by inc/product-lightbox.js).
 * Vertical stack: big image (contain — landscape & portrait both fit) → technical-
 * info panel → thumbnail strip. Full-screen dark overlay, own nav/close/counter.
 */

/* Lock background scroll while the lightbox is open. */
body.printley-lb-open {
	overflow: hidden;
}

.printley-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	flex-direction: column;
	background: rgba(15, 15, 15, .96);
	color: #fff;
	padding: 48px 24px 16px;
	box-sizing: border-box;
}
.printley-lb.is-open {
	display: flex;
}

/* ===== Close ===== */
.printley-lb__close {
	position: absolute;
	top: 12px;
	right: 16px;
	z-index: 3;
	width: 44px;
	height: 44px;
	border: none;
	background: transparent;
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	opacity: .8;
	transition: opacity .15s;
}
.printley-lb__close:hover {
	opacity: 1;
}

/* ===== Stage: big image + arrows ===== */
.printley-lb__stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.printley-lb__figure {
	position: relative;
	/* Fill the stage exactly, so the img's max-height:100% has a real height to
	   resolve against (a content-sized flex parent would leave it unconstrained,
	   letting tall/large images overflow the viewport). */
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.printley-lb__img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;   /* landscape & portrait both display in full */
	border-radius: 4px;
	display: block;
}
.printley-lb__counter {
	position: absolute;
	bottom: 10px;
	right: 10px;
	background: rgba(0, 0, 0, .6);
	font-size: 13px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 20px;
	pointer-events: none;
}

/* Prev / next arrows */
.printley-lb__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 52px;
	height: 52px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s;
}
.printley-lb__nav:hover {
	background: rgba(255, 255, 255, .24);
}
.printley-lb__nav--prev { left: 8px; }
.printley-lb__nav--next { right: 8px; }

/* ===== Technical-info panel (between image and thumbnails) ===== */
.printley-lb__info {
	flex: 0 0 auto;
	max-width: 900px;
	margin: 12px auto 0;
	width: 100%;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: 8px;
	padding: 12px 18px;
	box-sizing: border-box;
}
.printley-lb__info-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}
.printley-lb__info-title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: #fff;
}
.printley-lb__info-price {
	font-size: 16px;
	font-weight: 700;
	color: #f6b52d;
	white-space: nowrap;
}
.printley-lb__info-price del {
	opacity: .6;
	font-weight: 400;
	margin-right: 6px;
}
.printley-lb__info-heading {
	margin-top: 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: uppercase;
	color: #bbb;
}
/* Specs as a two-column label/value grid. */
.printley-lb__specs {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 4px 18px;
	margin: 8px 0 0;
}
.printley-lb__specs dt {
	color: #aaa;
	font-size: 14px;
}
.printley-lb__specs dd {
	margin: 0;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
}
.printley-lb__info-desc {
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: #ddd;
}

/* ===== Thumbnail strip ===== */
.printley-lb__thumbs {
	flex: 0 0 auto;
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
	max-height: 110px;
	overflow-y: auto;
	padding: 12px 0 4px;
}
.printley-lb__thumb {
	width: 78px;
	height: 56px;
	object-fit: cover;
	border-radius: 3px;
	border: 2px solid transparent;
	opacity: .5;
	cursor: pointer;
	transition: opacity .15s, border-color .15s;
}
.printley-lb__thumb:hover {
	opacity: .85;
}
.printley-lb__thumb.is-active {
	opacity: 1;
	border-color: #f6b52d;
}

/* ===== Mobile ===== */
@media (max-width: 600px) {
	.printley-lb {
		padding: 44px 8px 8px;
	}
	.printley-lb__nav {
		width: 40px;
		height: 40px;
		font-size: 26px;
	}
	.printley-lb__info {
		padding: 10px 12px;
	}
	.printley-lb__info-title { font-size: 16px; }
	.printley-lb__thumb { width: 60px; height: 44px; }
}
