.wspg-gallery {
	--wspg-border: #e5e7eb;
	--wspg-text: #111827;
	--wspg-muted: #6b7280;
	--wspg-surface: #ffffff;
	--wspg-surface-alt: #f8fafc;
	--wspg-radius: 14px;
	--wspg-thumb-size: 72px;
	--wspg-mobile-thumb-size: 58px;
	--wspg-arrow-size: 40px;
	--wspg-thumb-gap: 10px;
	--wspg-thumb-padding: 6px;
	--wspg-thumb-nav-size: 28px;
	color: var(--wspg-text);
}

.wspg-gallery *,
.wspg-gallery *::before,
.wspg-gallery *::after {
	box-sizing: border-box;
}

.wspg-gallery__layout {
	display: grid;
	grid-template-columns: minmax(0, auto) minmax(0, 1fr);
	align-items: stretch;
	gap: 18px;
}

.wspg-gallery--single-image .wspg-gallery__layout {
	grid-template-columns: minmax(0, 1fr) !important;
}

.wspg-gallery--single-image .wspg-gallery__main {
	grid-column: 1 / -1;
}

.wspg-gallery--thumbs-right .wspg-gallery__layout {
	grid-template-columns: minmax(0, 1fr) minmax(0, auto);
}

.wspg-gallery__thumbs-shell {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: var(--wspg-thumb-size);
	min-width: 0;
}

.wspg-gallery__thumbs-viewport {
	position: relative;
	min-width: 0;
	min-height: 0;
	flex: 1 1 auto;
	overflow: auto;
	overscroll-behavior: contain;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.wspg-gallery__thumbs-viewport::-webkit-scrollbar {
	display: none;
}

.wspg-gallery__thumbs {
	display: flex;
	flex-direction: column;
	gap: var(--wspg-thumb-gap);
}

.wspg-gallery__thumbs-shell[hidden],
.wspg-gallery__arrow[hidden] {
	display: none !important;
}

.wspg-gallery__thumbs-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: var(--wspg-thumb-nav-size);
	padding: 0;
	border: 1px solid var(--wspg-border);
	border-radius: 999px;
	background: var(--wspg-surface);
	color: var(--wspg-text);
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.wspg-gallery__thumbs-nav[hidden] {
	display: none !important;
}

.wspg-gallery__thumbs-nav:disabled {
	opacity: 0.35;
	cursor: default;
}

.wspg-gallery__thumbs-nav span {
	font-size: 18px;
	line-height: 1;
}

.wspg-gallery__thumb {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--wspg-thumb-size);
	height: var(--wspg-thumb-size);
	padding: var(--wspg-thumb-padding);
	border: 1px solid var(--wspg-border);
	border-radius: 12px;
	background: var(--wspg-surface);
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.wspg-gallery__thumb.is-active {
	border-color: var(--wspg-text);
	background: var(--wspg-surface-alt);
}

.wspg-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: calc(var(--wspg-radius) - 8px);
}

.wspg-gallery__main {
	position: relative;
	min-width: 0;
}

.wspg-gallery__viewport {
	overflow: hidden;
	border: 1px solid var(--wspg-border);
	border-radius: var(--wspg-radius);
	background: var(--wspg-surface);
}

.wspg-gallery__track {
	display: flex;
	width: 100%;
	transition: transform var(--wspg-speed, 320ms) ease;
	will-change: transform;
}

.wspg-gallery__slide {
	flex: 0 0 100%;
	min-width: 100%;
}

.wspg-gallery__media {
	position: relative;
	display: grid;
	place-items: center;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	aspect-ratio: 1 / 1;
}

.wspg-gallery--frame-1-1 .wspg-gallery__media {
	aspect-ratio: 1 / 1;
}

.wspg-gallery--frame-4-5 .wspg-gallery__media {
	aspect-ratio: 4 / 5;
}

.wspg-gallery--frame-3-4 .wspg-gallery__media {
	aspect-ratio: 3 / 4;
}

.wspg-gallery__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.wspg-gallery--main-fit-cover .wspg-gallery__media img {
	object-fit: cover;
}

.wspg-gallery--main-fit-contain .wspg-gallery__media img {
	object-fit: contain;
}

.wspg-gallery--main-fit-smart .wspg-gallery__media img {
	object-fit: contain;
}

.wspg-gallery--main-fit-smart .wspg-gallery__media--smart-cover img {
	object-fit: cover;
}

.wspg-gallery--thumb-fit-cover .wspg-gallery__thumb img {
	object-fit: cover;
}

.wspg-gallery--thumb-fit-contain .wspg-gallery__thumb img {
	object-fit: contain;
}

.wspg-gallery--thumb-fit-smart .wspg-gallery__thumb img {
	object-fit: contain;
}

.wspg-gallery--thumb-fit-smart .wspg-gallery__thumb--smart-cover img {
	object-fit: cover;
}

.wspg-gallery__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--wspg-arrow-size);
	height: var(--wspg-arrow-size);
	padding: 0;
	border: 1px solid var(--wspg-border);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--wspg-text);
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.wspg-gallery__arrow:hover {
	background: #ffffff;
	border-color: #cbd5e1;
}

.wspg-gallery__arrow--prev {
	left: 14px;
}

.wspg-gallery__arrow--next {
	right: 14px;
}

.wspg-gallery__arrow span {
	font-size: 28px;
	line-height: 1;
}

.wspg-gallery__zoom-lens {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	width: 150px;
	height: 150px;
	border: 1px solid rgba(17, 24, 39, 0.1);
	background-color: rgba(255, 255, 255, 0.3);
	background-repeat: no-repeat;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, -50%);
	transition: opacity 0.18s ease;
}

.wspg-gallery--zoom-circle .wspg-gallery__zoom-lens {
	border-radius: 999px;
}

.wspg-gallery--zoom-square .wspg-gallery__zoom-lens {
	border-radius: 16px;
}

.wspg-gallery__media.is-zooming .wspg-gallery__zoom-lens {
	opacity: 1;
}

.wspg-gallery--zoom-off .wspg-gallery__media {
	cursor: default;
}

.wspg-lightbox[hidden] {
	display: none;
}

.wspg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
}

.wspg-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.82);
}

.wspg-lightbox__dialog {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) 56px;
	align-items: center;
	width: min(1100px, calc(100vw - 32px));
	height: min(90vh, 820px);
	margin: 5vh auto;
}

.wspg-lightbox__stage {
	display: grid;
	place-items: center;
	height: 100%;
}

.wspg-lightbox__image {
	display: block;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.wspg-lightbox__close,
.wspg-lightbox__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #ffffff;
	cursor: pointer;
}

.wspg-lightbox__close:focus-visible,
.wspg-lightbox__nav:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
}

.wspg-lightbox__close {
	position: absolute;
	top: 12px;
	right: 12px;
}

.wspg-lightbox__close span,
.wspg-lightbox__nav span {
	font-size: 28px;
	line-height: 1;
}

.wspg-lightbox-open {
	overflow: hidden;
}

@media (min-width: 768px) {
	.wspg-gallery--thumbs-right .wspg-gallery__thumbs-shell {
		order: 2;
	}

	.wspg-gallery--thumbs-bottom .wspg-gallery__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.wspg-gallery--thumbs-bottom .wspg-gallery__thumbs-shell {
		order: 2;
		flex-direction: row;
		align-items: center;
		width: 100%;
		max-width: 100%;
	}

	.wspg-gallery--thumbs-bottom .wspg-gallery__thumbs-viewport {
		width: 100%;
	}

	.wspg-gallery--thumbs-bottom .wspg-gallery__thumbs {
		order: 2;
		flex-direction: row;
	}

	.wspg-gallery--thumbs-left .wspg-gallery__thumbs-viewport,
	.wspg-gallery--thumbs-right .wspg-gallery__thumbs-viewport {
		max-height: 520px;
	}

	.wspg-gallery--thumbs-bottom .wspg-gallery__thumbs-nav {
		width: var(--wspg-thumb-nav-size);
		min-width: var(--wspg-thumb-nav-size);
		height: var(--wspg-thumb-size);
	}
}

@media (max-width: 767px) {
	.wspg-gallery__layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.wspg-gallery__thumbs-shell {
		width: 100%;
	}

	.wspg-gallery__thumbs {
		order: 2;
		flex-direction: row;
		gap: 8px;
	}

	.wspg-gallery--mobile-thumbs-off .wspg-gallery__thumbs-shell {
		display: none;
	}

	.wspg-gallery__thumbs-viewport {
		width: 100%;
	}

	.wspg-gallery--mobile-thumbs-bottom .wspg-gallery__thumbs-viewport {
		padding-bottom: 2px;
	}

	.wspg-gallery__thumb {
		flex: 0 0 var(--wspg-mobile-thumb-size);
		width: var(--wspg-mobile-thumb-size);
		height: var(--wspg-mobile-thumb-size);
	}

	.wspg-gallery--mobile-thumbs-bottom .wspg-gallery__layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.wspg-gallery--mobile-thumbs-left .wspg-gallery__layout {
		grid-template-columns: var(--wspg-mobile-thumb-size) minmax(0, 1fr);
		align-items: stretch;
	}

	.wspg-gallery--mobile-thumbs-left .wspg-gallery__thumbs-shell {
		order: 0;
		width: var(--wspg-mobile-thumb-size);
		align-self: stretch;
	}

	.wspg-gallery--mobile-thumbs-right .wspg-gallery__layout {
		grid-template-columns: minmax(0, 1fr) var(--wspg-mobile-thumb-size);
		align-items: stretch;
	}

	.wspg-gallery--mobile-thumbs-right .wspg-gallery__thumbs-shell {
		order: 2;
		width: var(--wspg-mobile-thumb-size);
		align-self: stretch;
	}

	.wspg-gallery--mobile-thumbs-left .wspg-gallery__thumbs,
	.wspg-gallery--mobile-thumbs-right .wspg-gallery__thumbs {
		flex-direction: column;
	}

	.wspg-gallery--mobile-thumbs-left .wspg-gallery__thumbs-viewport,
	.wspg-gallery--mobile-thumbs-right .wspg-gallery__thumbs-viewport {
		max-height: 100%;
	}

	.wspg-gallery--mobile-thumbs-left .wspg-gallery__thumbs-nav,
	.wspg-gallery--mobile-thumbs-right .wspg-gallery__thumbs-nav {
		width: 100%;
		height: 22px;
	}

	.wspg-gallery--mobile-thumbs-bottom .wspg-gallery__thumbs-nav {
		width: 22px;
		min-width: 22px;
		height: var(--wspg-mobile-thumb-size);
	}

	.wspg-gallery__arrow {
		width: 36px;
		height: 36px;
	}

	.wspg-gallery__zoom-lens {
		display: none;
	}

	.wspg-lightbox__dialog {
		grid-template-columns: 44px minmax(0, 1fr) 44px;
		width: calc(100vw - 16px);
		height: 86vh;
		margin: 7vh auto;
	}
}
