/* ============================================
   Smart Category Gallery - Frontend Styles
   ============================================ */

/* ---------- Gallery Wrapper ---------- */
.scg-gallery-wrapper {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 0;
}

/* ---------- Filter Bar ---------- */
.scg-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-bottom: 30px;
}

.scg-filter-btn {
	padding: 10px 24px;
	border: 2px solid var(--ts-border, #e0e0e0);
	background: var(--ts-main-bg, #ffffff);
	color: var(--ts-text-color, #333);
	border-radius: 50px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.3s ease;
	outline: none;
	font-family: var(--ts-font-family, Poppins), sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.scg-filter-btn:hover {
	border-color: var(--ts-primary-color, #de1010);
	background: var(--ts-primary-color, #de1010);
	color: var(--ts-text-in-primary-color, #ffffff);
}

.scg-filter-btn.scg-active {
	background: var(--ts-primary-color, #de1010);
	border-color: var(--ts-primary-color, #de1010);
	color: var(--ts-text-in-primary-color, #ffffff);
}

/* ---------- Gallery Grid ---------- */
.scg-gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

/* ---------- Gallery Item ---------- */
.scg-gallery-item {
	transition: transform 0.3s ease, opacity 0.3s ease;
	width: 100%;
	min-width: 0;
}

.scg-gallery-item.scg-hidden {
	display: none !important;
}

/* Override theme img styles */
.scg-gallery-wrapper img {
	max-width: none !important;
	width: auto !important;
	height: auto !important;
}

.scg-image-wrap {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	width: 100% !important;
	display: block !important;
}

.scg-image-wrap img.scg-gallery-img {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	height: 280px !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center center !important;
	transition: transform 0.4s ease;
	vertical-align: middle;
	border: none !important;
	box-shadow: none !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

.scg-image-wrap:hover .scg-gallery-img {
	transform: scale(1.05);
}

/* ---------- Hover Overlay ---------- */
.scg-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.scg-image-wrap:hover .scg-overlay {
	opacity: 1;
}

.scg-zoom-icon {
	color: #ffffff;
	width: 48px;
	height: 48px;
	border: 2px solid #ffffff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Image Title ---------- */
.scg-image-title {
	margin: 10px 0 0;
	padding: 0;
	font-size: 14px;
	font-weight: 500;
	color: #333;
	text-align: center;
}

/* ---------- No Images Message ---------- */
.scg-no-images {
	text-align: center;
	padding: 40px;
	color: #999;
	font-size: 16px;
}

/* ======================================================
   LIGHTBOX
   ====================================================== */

.scg-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.92);
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.scg-lightbox.scg-visible {
	display: flex;
	opacity: 1;
}

.scg-lightbox-content {
	position: relative;
	max-width: 90vw;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.scg-lightbox-content img.scg-lightbox-img {
	max-width: 90vw !important;
	max-height: 80vh !important;
	width: auto !important;
	height: auto !important;
	object-fit: contain !important;
	border-radius: 4px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
}

.scg-lightbox-caption {
	color: #ffffff;
	text-align: center;
	margin-top: 12px;
	font-size: 16px;
}

/* Lightbox Buttons */
.scg-lightbox-close,
.scg-lightbox-prev,
.scg-lightbox-next {
	position: absolute;
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: #ffffff;
	cursor: pointer;
	z-index: 10;
	transition: background 0.2s ease;
	outline: none;
}

.scg-lightbox-close:hover,
.scg-lightbox-prev:hover,
.scg-lightbox-next:hover {
	background: rgba(255, 255, 255, 0.3);
}

.scg-lightbox-close {
	top: 20px;
	right: 20px;
	font-size: 36px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.scg-lightbox-prev,
.scg-lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	font-size: 28px;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.scg-lightbox-prev {
	left: 20px;
}

.scg-lightbox-next {
	right: 20px;
}

/* ======================================================
   RESPONSIVE BREAKPOINTS
   ====================================================== */

/* Tablet */
@media (max-width: 992px) {
	.scg-gallery-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.scg-image-wrap img.scg-gallery-img {
		height: 220px !important;
	}
}

/* Mobile */
@media (max-width: 600px) {
	.scg-gallery-grid {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.scg-image-wrap img.scg-gallery-img {
		height: 220px !important;
	}

	.scg-filter-btn {
		padding: 8px 16px;
		font-size: 13px;
	}

	.scg-lightbox-prev {
		left: 8px;
	}

	.scg-lightbox-next {
		right: 8px;
	}

	.scg-lightbox-close {
		top: 10px;
		right: 10px;
	}
}
