.csw-fancy-gallery {
	position: relative;
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}
.csw-fancy-gallery .thumb {
	position: absolute;
	box-sizing: border-box;
	padding: 4px;
	transition: opacity 0.4s ease, top 0.4s ease, left 0.4s ease;
}

.csw-fancy-gallery .thumb-inner {
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: var(--csw-sm-radius);
	box-shadow: var(--csw-shadow);
	position: relative;
	cursor: zoom-in;
	background-color: #f8fafc;


	transform: translateY(0);
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
	z-index: 1;
}

.csw-fancy-gallery .thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: scale(1);
	filter: brightness(1);


	will-change: transform, filter;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;


	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}
.csw-fancy-gallery .thumb:hover {
	z-index: 5;
}

.csw-fancy-gallery .thumb:hover .thumb-inner {
	transform: translateY(-5px);
	box-shadow: var(--csw-shadow-hover);
}

.csw-fancy-gallery .thumb:hover img {
	transform: scale(1.04);
	filter: brightness(1.03);
}


.csw-fancy-gallery .video-thumb::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(1);
	width: 52px;
	height: 52px;
	background: var(--csw-bg-box) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23A80A60'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") no-repeat center/22px;
	border-radius: 50%;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
	opacity: 0.95;
	will-change: transform, background-color;
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease, box-shadow 0.3s ease;
	z-index: 3;
}

.csw-fancy-gallery .video-thumb:hover::after {
	transform: translate(-50%, -50%) scale(1.1);
	background-color: var(--csw-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
	box-shadow: 0 8px 20px rgba(214, 55, 130, 0.35);
}
.csw-fancy-gallery .thumb.is-hidden {
	opacity: 0;
	transform: scale(0.85);
	pointer-events: none;
}
.csw-fancy-gallery .thumb          { width: 16.666%; height: 180px; }
.csw-fancy-gallery .thumb.width-2   { width: 33.333%; height: 180px; }
.csw-fancy-gallery .thumb.height-2  { width: 16.666%; height: 360px; }
.csw-fancy-gallery .thumb.is-giant  { width: 33.333%; height: 360px; }
.gallery-filters {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-bottom: 35px;
	flex-wrap: wrap;
}

.gallery-filters .filter-btn {
	background-color: var(--csw-bg-box);
	color: var(--csw-text-muted);
	border: 1px solid var(--csw-line-color);
	padding: 10px 24px;
	border-radius: var(--csw-radius);
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	cursor: pointer;
	transition: var(--csw-transition);
}

.gallery-filters .filter-btn:hover {
	color: var(--csw-primary);
	border-color: var(--csw-primary);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(168, 10, 96, 0.08);
}

.gallery-filters .filter-btn.active {
	background-color: var(--csw-primary);
	color: var(--csw-text-light);
	border-color: var(--csw-primary);
	box-shadow: 0 8px 20px -4px rgba(168, 10, 96, 0.35);
}



@media (max-width: 992px) {
	.csw-fancy-gallery .thumb          { width: 25%; height: 160px; }
	.csw-fancy-gallery .thumb.width-2   { width: 50%; height: 160px; }
	.csw-fancy-gallery .thumb.height-2  { width: 25%; height: 320px; }
	.csw-fancy-gallery .thumb.is-giant  { width: 50%; height: 320px; }
}


@media (max-width: 768px) {
	.csw-fancy-gallery .thumb          { width: 33.333%; height: 130px; }
	.csw-fancy-gallery .thumb.width-2   { width: 66.666%; height: 130px; }
	.csw-fancy-gallery .thumb.height-2  { width: 33.333%; height: 260px; }
	.csw-fancy-gallery .thumb.is-giant  { width: 66.666%; height: 260px; }


	.gallery-filters { margin-bottom: 25px; gap: 8px; }
	.gallery-filters .filter-btn { padding: 8px 16px; font-size: 12px; }
}


@media (max-width: 480px) {
	.csw-fancy-gallery .thumb          { width: 33.333%; height: 100px; }
	.csw-fancy-gallery .thumb.width-2   { width: 66.666%; height: 100px; }
	.csw-fancy-gallery .thumb.height-2  { width: 33.333%; height: 200px; }
	.csw-fancy-gallery .thumb.is-giant  { width: 66.666%; height: 200px; }


	.csw-fancy-gallery .thumb { padding: 4px; }


	.csw-fancy-gallery .thumb:hover .thumb-inner {
		transform: none !important;
	}
}