.svp-gallery {
	display: grid;
	gap: 1.5rem;
}

.svp-gallery__heading {
	margin: 0;
	font-size: clamp(1.8rem, 2.3vw, 2.8rem);
	line-height: 1.1;
}

.svp-gallery__collections {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.svp-gallery__collection-button {
	display: grid;
	width: 100%;
	padding: 0;
	border: 1px solid #cbd5e1;
	border-radius: 18px;
	overflow: hidden;
	background: #fff;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.svp-gallery__collection-button:hover,
.svp-gallery__collection-button:focus,
.svp-gallery__collection-button:focus-visible {
	transform: translateY(-2px);
	border-color: #1d4ed8;
	box-shadow: 0 14px 28px rgba(29, 78, 216, 0.16);
	outline: 3px solid #1d4ed8;
	outline-offset: 2px;
}

.svp-gallery__collection-button[aria-expanded="true"] {
	border-color: #1d4ed8;
}

.svp-gallery__cover {
	aspect-ratio: 4 / 3;
	background: linear-gradient(135deg, #dbeafe, #eff6ff);
}

.svp-gallery__cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.svp-gallery__collection-meta {
	display: grid;
	gap: 0.35rem;
	padding: 1rem;
}

.svp-gallery__collection-title {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.3;
	color: #0f172a;
}

.svp-gallery__collection-description,
.svp-gallery__collection-count {
	margin: 0;
	color: #334155;
	font-size: 0.95rem;
	line-height: 1.45;
}

.svp-gallery__viewer {
	border: 1px solid #cbd5e1;
	border-radius: 20px;
	padding: 1.25rem;
	background: #f8fafc;
}

.svp-gallery__viewer[hidden] {
	display: none !important;
}

.svp-gallery__viewer-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.svp-gallery__viewer-title {
	margin: 0;
	font-size: clamp(1.4rem, 2vw, 2rem);
	line-height: 1.15;
}

.svp-gallery__viewer-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.svp-gallery__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.65rem 1rem;
	border: 1px solid #1d4ed8;
	border-radius: 999px;
	background: #fff;
	color: #0f172a;
	font-weight: 600;
	cursor: pointer;
}

.svp-gallery__button:hover,
.svp-gallery__button:focus,
.svp-gallery__button:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 2px;
	background: #eff6ff;
}

.svp-gallery__stage {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
}

.svp-gallery__figure {
	margin: 0;
	display: grid;
	gap: 0.75rem;
}

.svp-gallery__image-wrap {
	position: relative;
	border-radius: 18px;
	overflow: hidden;
	background: #0f172a;
	aspect-ratio: 16 / 10;
}

.svp-gallery__image-trigger {
	padding: 0;
	border: 0;
	cursor: zoom-in;
}

.svp-gallery__image-trigger:hover,
.svp-gallery__image-trigger:focus,
.svp-gallery__image-trigger:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 3px;
}

.svp-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #0f172a;
}

.svp-gallery__modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 1.5rem;
}

.svp-gallery__modal[hidden] {
	display: none !important;
}

.svp-gallery__modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.82);
}

.svp-gallery__modal-dialog {
	position: relative;
	z-index: 1;
	display: grid;
	gap: 1rem;
	width: min(100%, 1100px);
	max-height: calc(100vh - 3rem);
	padding: 1rem;
	border-radius: 20px;
	background: #ffffff;
	box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
}

.svp-gallery__modal-close {
	justify-self: end;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.65rem 1rem;
	border: 1px solid #1d4ed8;
	border-radius: 999px;
	background: #fff;
	color: #0f172a;
	font-weight: 600;
	cursor: pointer;
}

.svp-gallery__modal-close:hover,
.svp-gallery__modal-close:focus,
.svp-gallery__modal-close:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 2px;
	background: #eff6ff;
}

.svp-gallery__modal-image {
	display: block;
	width: 100%;
	max-width: 100%;
	max-height: calc(100vh - 10rem);
	object-fit: contain;
	margin: 0 auto;
}

.svp-gallery__modal-caption {
	margin: 0;
	color: #334155;
	line-height: 1.5;
}

.svp-gallery__caption {
	margin: 0;
	color: #334155;
	line-height: 1.5;
}

.svp-gallery__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.svp-gallery__status {
	margin: 0;
	color: #334155;
	font-weight: 600;
}

.svp-gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
	gap: 0.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.svp-gallery__thumb-button {
	display: block;
	width: 100%;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	cursor: pointer;
}

.svp-gallery__thumb-button[aria-current="true"] {
	border-color: #1d4ed8;
}

.svp-gallery__thumb-button:hover,
.svp-gallery__thumb-button:focus,
.svp-gallery__thumb-button:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 2px;
}

.svp-gallery__thumb-button img {
	display: block;
	width: 100%;
	height: 76px;
	object-fit: cover;
}

@media (max-width: 699px) {
	.svp-gallery__viewer {
		padding: 1rem;
	}

	.svp-gallery__image-wrap {
		aspect-ratio: 4 / 3;
	}

	.svp-gallery__thumbs {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
