/* ==========================================================================
   LIGHTBOX — współdzielony fullscreen Swiper + moduł Zoom. Chrom na tokenach.
   Ładowany warunkowo tam, gdzie żyje mechanizm (inc/content/lightbox.php):
   karta produktu (is_product) + strony z blokiem „galeria" (has_block).

   Wydzielony z `product-gallery.css` przy uogólnieniu lightboxa (ADR-0039).
   Zasada pliku wg ADR-0032 pkt 3: spójny klaster cross-surface → własny arkusz
   o zasięgu swojej najszerszej powierzchni (NIE globalny — nie renderuje się
   na większości stron).
   ========================================================================== */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: color-mix(in srgb, var(--wp--preset--color--dark) 92%, black);
}
.lightbox[hidden] { display: none; }

.lightbox__swiper { position: absolute; inset: 0; }
.lightbox .swiper-slide {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(1rem, 5vw, 4rem);
}
.lightbox .swiper-zoom-container img {
	max-inline-size: 100%;
	max-block-size: 88vh;
	object-fit: contain;
	background: var(--wp--preset--color--white);
	border-radius: var(--wp--custom--radius--modal);
	padding: clamp(1rem, 4vw, 3rem);
}

.lightbox__close {
	position: absolute;
	inset-block-start: var(--wp--preset--spacing--sm);
	inset-inline-end: var(--wp--preset--spacing--sm);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	inline-size: 3rem;
	block-size: 3rem;
	padding: 0;
	border-radius: var(--wp--custom--radius--circle);
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--bg-alt);
	color: var(--wp--preset--color--dark);
	cursor: pointer;
}
.lightbox__close svg { inline-size: 1.15rem; block-size: 1.15rem; }
.lightbox__close:hover { background: var(--wp--preset--color--white); }

.lightbox__counter {
	position: absolute;
	inset-block-start: var(--wp--preset--spacing--sm);
	inset-inline-start: 50%;
	transform: translateX(-50%);
	z-index: 5;
	padding: 4px 18px 6px;
	border-radius: var(--wp--custom--radius--pill);
	background: color-mix(in srgb, var(--wp--preset--color--bg-alt) 15%, transparent);
	color: var(--wp--preset--color--bg-alt);
	font-size: var(--wp--preset--font-size--body);
	backdrop-filter: blur(4px);
}

.lightbox__hint {
	position: absolute;
	inset-block-end: var(--wp--preset--spacing--sm);
	inset-inline-start: 50%;
	transform: translateX(-50%);
	z-index: 5;
	color: color-mix(in srgb, var(--wp--preset--color--bg-alt) 70%, transparent);
	font-size: var(--wp--preset--font-size--body);
	text-align: center;
	max-inline-size: 90vw;
}

/* Strzałki Swipera na tokeny. */
.lightbox .swiper-button-next,
.lightbox .swiper-button-prev { color: var(--wp--preset--color--bg-alt); }
.lightbox .swiper-button-next::after,
.lightbox .swiper-button-prev::after { font-size: 1.75rem; }
