/* Gallery: filters, grid, lightbox */

.scs-gallery__hero {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px;
	padding-top: clamp(40px, 4vw, 56px); padding-bottom: 32px;
}
.scs-gallery__copy { flex: 1 1 560px; display: flex; flex-direction: column; gap: 16px; }
.scs-gallery__art { flex: 0 0 auto; display: flex; align-items: flex-end; gap: 6px; }
.scs-gallery__santa { width: 120px; }
.scs-gallery__bunny { width: 54px; }

.scs-gallery__filters { display: flex; flex-direction: column; gap: 16px; padding-bottom: 28px; }
.scs-gallery__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.scs-gallery__row-label { font-weight: 700; font-size: 15px; min-width: 64px; }
.scs-gallery__row .scs-pills { flex: 1 1 0; min-width: 0; }
.scs-gallery__row .scs-pill { font-weight: 600; }
.scs-gallery__row .scs-pill .scs-count {
	display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 6px;
	border-radius: var(--scs-pill); background: rgba(32, 60, 59, .08); opacity: 1;
}
.scs-gallery__row .scs-pill[aria-current="true"] .scs-count { background: rgba(255, 248, 238, .2); }
.scs-gallery__status { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; min-height: 32px; }
.scs-gallery__count { font-size: 15px; color: var(--scs-ink-soft); }
.scs-gallery__reset { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; font-size: 15px; }

.scs-gallery__body { padding-bottom: 80px; }
.scs-gallery__grid {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 22px;
}
.scs-gallery__tile {
	width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: left;
	display: flex; flex-direction: column; gap: 10px; font: inherit; color: inherit; text-decoration: none;
	transition: transform .15s ease; border-radius: 10px;
}
.scs-gallery__tile:hover { transform: translateY(-3px); color: inherit; }
.scs-gallery__tile:focus-visible { outline: 3px solid var(--scs-teal); outline-offset: 4px; }
.scs-gallery__frame {
	position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px;
	width: 100%; aspect-ratio: 4 / 3; min-height: 0; border-radius: 8px; overflow: hidden;
}
.scs-gallery__frame:not(.scs-photo-ph) { background: var(--scs-paper-2); }
.scs-gallery__frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scs-gallery__staging { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--scs-ink-soft); }
.scs-gallery__caption { font-size: 16px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.scs-gallery__meta { font-size: 14px; color: var(--scs-ink-soft); margin-top: -4px; }

.scs-gallery__empty {
	padding: clamp(32px, 5vw, 60px); text-align: center; border: 2px dashed var(--scs-rule); border-radius: 18px;
	display: flex; flex-direction: column; gap: 14px; align-items: center;
}
.scs-gallery__empty .scs-h3 { font-size: clamp(22px, 2vw + 12px, 28px); }
.scs-gallery__removal { margin-top: 40px; font-size: 15px; color: var(--scs-ink-soft); }

/* Lightbox (native dialog) */
.scs-lightbox {
	width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
	background: rgba(20, 38, 37, .94); color: var(--scs-cream);
}
.scs-lightbox::backdrop { background: rgba(20, 38, 37, .6); }
.scs-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.scs-lightbox__inner {
	width: min(1104px, 100%); box-sizing: border-box; display: flex; flex-direction: column; gap: 16px;
	padding: max(16px, env(safe-area-inset-top)) clamp(12px, 3vw, 32px) max(16px, env(safe-area-inset-bottom));
}
.scs-lightbox__top { display: flex; justify-content: space-between; align-items: center; }
.scs-lightbox__count { font-size: 15px; font-weight: 700; }
.scs-lightbox__close, .scs-lightbox__nav {
	flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; padding: 0;
}
.scs-lightbox__close { width: 52px; height: 52px; border: 2px solid var(--scs-cream); background: transparent; color: var(--scs-cream); }
.scs-lightbox__close:hover { background: rgba(255, 245, 229, .12); }
.scs-lightbox__nav { width: 56px; height: 56px; border: var(--scs-border); background: var(--scs-paper); color: var(--scs-ink); }
.scs-lightbox__nav:hover { background: #FFF0D6; }
.scs-lightbox :focus-visible { outline: 3px solid var(--scs-sun); outline-offset: 3px; }
.scs-lightbox__stage { display: flex; align-items: center; gap: 16px; }
.scs-lightbox__figure { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.scs-lightbox__media {
	position: relative; display: flex; align-items: center; justify-content: center;
	max-height: calc(100dvh - 220px); aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden;
}
.scs-lightbox__media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.scs-lightbox__media .scs-photo-ph { border-radius: 10px; flex-direction: column; gap: 10px; }
.scs-lightbox__media .scs-ph { font-size: 18px; }
.scs-lightbox__media.is-loading::after {
	content: ""; position: absolute; width: 36px; height: 36px; border-radius: 50%;
	border: 3px solid var(--scs-cream); border-right-color: transparent; animation: scs-spin .8s linear infinite;
}
.scs-lightbox__error { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 24px; }
.scs-lightbox__caption { font-size: 18px; text-align: center; overflow-wrap: anywhere; }

@media (max-width: 700px) {
	.scs-gallery__santa { width: 84px; }
	.scs-gallery__bunny { width: 40px; }
	.scs-gallery__row-label { min-width: 100%; }
	.scs-lightbox__stage { flex-wrap: wrap; justify-content: center; }
	.scs-lightbox__figure { flex: 1 1 100%; order: -1; }
	.scs-lightbox__media { max-height: calc(100dvh - 260px); }
	.scs-lightbox__nav { width: 52px; height: 52px; }
	.scs-lightbox__stage { column-gap: 32px; }
}
