.scg-shell {
	position: relative;
	padding: 0 32px;
	overflow: visible;
	max-width: 100%;
}

.wp-block-gallery.is-style-carousel {
	--scg-gap: 12px;
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: var(--scg-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 8px 18px;
	margin: 0;
	list-style: none;
	scrollbar-width: none;
	position: relative;
}

.wp-block-gallery.is-style-carousel::-webkit-scrollbar {
  display: none;
}

.wp-block-gallery.is-style-carousel::-webkit-scrollbar-thumb {
  display: none;
}

.wp-block-gallery.is-style-carousel > figure,
.wp-block-gallery.is-style-carousel > li {
  flex: 0 0 auto;
  scroll-snap-align: center;
  margin: 0;
  width: clamp(220px, 32vw, 420px);
  position: relative;
}

.wp-block-gallery.is-style-carousel img {
	width: 100%;
	height: clamp(200px, 36vw, 320px);
	object-fit: cover;
	border-radius: 12px;
	display: block;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
	transition: transform 160ms ease, box-shadow 160ms ease;
}

.wp-block-gallery.is-style-carousel figure:hover img,
.wp-block-gallery.is-style-carousel li:hover img {
	transform: scale(1.02);
	box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
}

.wp-block-gallery.is-style-carousel figcaption {
  position: absolute;
  inset: auto 12px 12px 12px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.3;
}

.scg-shell .scg-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	border: none;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	width: 46px;
	height: 46px;
	min-width: 46px;
	min-height: 46px;
	flex: 0 0 auto;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 20;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(4px);
	transition: transform 120ms ease, background 120ms ease, opacity 120ms ease;
	opacity: 0.94;
	align-self: center;
}

.wp-block-gallery.is-style-carousel .scg-nav:hover {
  transform: translateY(-50%) scale(1.05);
  background: rgba(0, 0, 0, 0.8);
}

.wp-block-gallery.is-style-carousel .scg-nav:active {
  transform: translateY(-50%) scale(0.97);
}

.scg-shell .scg-prev {
	left: 0;
	right: auto;
	margin: 0;
}

.scg-shell .scg-next {
	right: 0;
	left: auto;
	margin: 0;
}

.scg-shell .scg-nav::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(-45deg);
  margin-left: 2px;
}

.scg-shell .scg-next::before {
  transform: rotate(135deg);
  margin-left: 0;
}

@media (max-width: 640px) {
	.wp-block-gallery.is-style-carousel {
		--scg-gap: 10px;
		padding: 6px 16px;
	}

  .wp-block-gallery.is-style-carousel > figure,
  .wp-block-gallery.is-style-carousel > li {
    width: clamp(240px, 72vw, 340px);
  }

	.scg-shell .scg-nav {
		width: 38px;
		height: 38px;
		min-width: 38px;
		min-height: 38px;
	}
}

.scg-lightbox {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.scg-lightbox.is-open {
	display: flex;
}

.scg-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(6px);
}

.scg-lightbox__body {
	position: relative;
	max-width: min(90vw, 1080px);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px;
	border-radius: 14px;
	background: rgba(0, 0, 0, 0.65);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
	z-index: 2;
}

.scg-lightbox__body img {
	max-width: 100%;
	max-height: 75vh;
	object-fit: contain;
	border-radius: 10px;
}

.scg-lightbox__caption {
	color: #f1f1f1;
	font-size: 0.95rem;
	line-height: 1.4;
}

.scg-lightbox__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	border: none;
	background: rgba(255, 255, 255, 0.9);
	color: #000;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
	transition: transform 120ms ease, background 120ms ease;
}

.scg-lightbox__close:hover {
	transform: scale(1.04);
	background: #fff;
}

body.scg-lock {
	overflow: hidden;
}
