/*
 * Jahanara Product Gallery
 * Scoped, dependency-free styles for the Elementor widget and its lightbox.
 */

.jpg-gallery,
.jpg-gallery *,
.jpg-lightbox,
.jpg-lightbox * {
	box-sizing: border-box;
}

.jpg-gallery {
	--jpg-accent: #006039;
	--jpg-lightbox-bg: #0b0f0d;
	--jpg-thumb-size: 72px;
	--jpg-wm-columns: 2;
	--jpg-wm-image-width: 100px;
	--jpg-wm-image-rotation: 0deg;
	--jpg-wm-opacity: 0.28;
	--jpg-wm-text-color: #fff;
	--jpg-wm-text-rotation: 0deg;
	--jpg-wm-text-size: 18px;
	direction: rtl;
	font-family: inherit;
	max-width: 100%;
	position: relative;
	width: 100%;
}

.jpg-gallery button,
.jpg-lightbox button {
	font: inherit;
}

.jpg-gallery [hidden],
.jpg-lightbox [hidden] {
	display: none !important;
}

.jpg-gallery button:focus-visible,
.jpg-lightbox button:focus-visible {
	outline: 3px solid var(--jpg-accent);
	outline: 3px solid color-mix(in srgb, var(--jpg-accent) 70%, #fff);
	outline-offset: 2px;
}

.jpg-gallery__title {
	color: #1f2937;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.6;
	margin: 0 0 12px;
	padding: 0;
	text-align: start;
}

.jpg-gallery__body {
	min-width: 0;
	position: relative;
}

.jpg-gallery--compact .jpg-gallery__body {
	max-width: 100%;
	overflow: hidden;
}

.jpg-lightbox[dir="ltr"] .jpg-lightbox__nav svg {
	transform: scaleX(-1);
}

.jpg-gallery__thumb svg,
.jpg-lightbox svg {
	fill: none;
	height: 21px;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.9;
	width: 21px;
}

.jpg-gallery__thumb-play svg,
.jpg-gallery__thumb .jpg-gallery__video-placeholder svg {
	fill: currentColor;
}

.jpg-gallery__thumbs {
	display: flex;
	gap: 9px;
	margin: 0;
	max-width: 100%;
	overflow-x: auto;
	padding: 2px 2px 5px;
	scroll-behavior: smooth;
	scroll-snap-type: x proximity;
	scrollbar-color: rgba(107, 114, 128, 0.32) transparent;
	scrollbar-width: thin;
}

.jpg-gallery__thumb {
	appearance: none;
	background: #f7f9f8;
	border: 1px solid #dfe6e2;
	border-radius: 10px;
	cursor: pointer;
	display: block;
	flex: 0 0 var(--jpg-thumb-size);
	height: var(--jpg-thumb-size);
	overflow: hidden;
	padding: 3px;
	position: relative;
	scroll-snap-align: start;
	transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 160ms ease;
	width: var(--jpg-thumb-size);
}

.jpg-gallery--compact .jpg-gallery__thumb:first-of-type:nth-last-of-type(1) {
	--jpg-thumb-size: clamp(92px, 28vw, 150px);
}

.jpg-gallery--compact .jpg-gallery__thumb:first-of-type:nth-last-of-type(2),
.jpg-gallery--compact .jpg-gallery__thumb:first-of-type:nth-last-of-type(2) ~ .jpg-gallery__thumb {
	--jpg-thumb-size: clamp(82px, 23vw, 120px);
}

.jpg-gallery__thumb:hover {
	border-color: color-mix(in srgb, var(--jpg-accent) 48%, #dfe6e2);
	box-shadow: 0 5px 16px rgba(15, 23, 42, 0.1);
	transform: translateY(-1px);
}

.jpg-gallery__thumb.is-active {
	border-color: var(--jpg-accent);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--jpg-accent) 18%, transparent);
}

.jpg-gallery__thumb img {
	display: block;
	height: 100%;
	margin: 0;
	object-fit: cover;
	width: 100%;
}

.jpg-gallery__video-placeholder {
	align-items: center;
	background: linear-gradient(145deg, #17201c, #0b0f0d);
	color: rgba(255, 255, 255, 0.82);
	display: flex;
	height: 100%;
	justify-content: center;
	width: 100%;
}

.jpg-gallery__thumb-play {
	align-items: center;
	background: rgba(0, 0, 0, 0.62);
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 50%;
	color: #fff;
	display: flex;
	height: 25px;
	justify-content: center;
	left: 50%;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 25px;
}

.jpg-gallery__thumb-play svg {
	height: 13px;
	margin-left: 1px;
	stroke-width: 1.5;
	width: 13px;
}

.jpg-watermark {
	align-items: stretch;
	display: grid;
	grid-template-columns: repeat(var(--jpg-wm-columns), minmax(0, 1fr));
	height: 100%;
	left: 0;
	opacity: var(--jpg-wm-opacity);
	overflow: hidden;
	pointer-events: none;
	position: absolute;
	top: 0;
	user-select: none;
	width: 100%;
	z-index: 5;
}

.jpg-watermark__item {
	align-items: center;
	align-self: center;
	display: flex;
	flex-direction: column;
	gap: 5px;
	justify-content: center;
	justify-self: center;
	max-width: calc(100% - 10px);
}

.jpg-watermark__image {
	display: block;
	height: auto;
	margin: 0;
	max-height: calc(100% - 8px);
	max-width: calc(100% - 8px);
	object-fit: contain;
	transform: rotate(var(--jpg-wm-image-rotation));
	width: var(--jpg-wm-image-width);
}

.jpg-watermark__text {
	color: var(--jpg-wm-text-color);
	font-size: var(--jpg-wm-text-size);
	font-weight: 800;
	line-height: 1.35;
	max-width: 100%;
	overflow: hidden;
	text-align: center;
	text-overflow: ellipsis;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
	transform: rotate(var(--jpg-wm-text-rotation));
	white-space: nowrap;
}

.jpg-watermark--scatter {
	display: block;
}

.jpg-watermark--scatter .jpg-watermark__item {
	position: absolute;
	transform: translate(-50%, -50%);
}

.jpg-watermark--scatter .jpg-watermark__item:nth-child(1) { left: 50%; top: 50%; }
.jpg-watermark--scatter .jpg-watermark__item:nth-child(2) { left: 21%; top: 24%; }
.jpg-watermark--scatter .jpg-watermark__item:nth-child(3) { left: 78%; top: 22%; }
.jpg-watermark--scatter .jpg-watermark__item:nth-child(4) { left: 24%; top: 73%; }
.jpg-watermark--scatter .jpg-watermark__item:nth-child(5) { left: 76%; top: 75%; }
.jpg-watermark--scatter .jpg-watermark__item:nth-child(6) { left: 50%; top: 14%; }
.jpg-watermark--scatter .jpg-watermark__item:nth-child(7) { left: 50%; top: 86%; }
.jpg-watermark--scatter .jpg-watermark__item:nth-child(8) { left: 11%; top: 49%; }
.jpg-watermark--scatter .jpg-watermark__item:nth-child(9) { left: 89%; top: 51%; }
.jpg-watermark--scatter .jpg-watermark__item:nth-child(10) { left: 35%; top: 38%; }
.jpg-watermark--scatter .jpg-watermark__item:nth-child(11) { left: 65%; top: 38%; }
.jpg-watermark--scatter .jpg-watermark__item:nth-child(12) { left: 50%; top: 65%; }

.jpg-gallery--protected,
.jpg-gallery--protected img,
.jpg-lightbox--protected,
.jpg-lightbox--protected img {
	-webkit-touch-callout: none;
	-webkit-user-drag: none;
	user-select: none;
}

.jpg-gallery-placeholder {
	align-items: center;
	background: #f7faf8;
	border: 1px dashed #b8c9c0;
	border-radius: 14px;
	color: #4b5563;
	display: flex;
	flex-direction: column;
	font-family: inherit;
	gap: 5px;
	justify-content: center;
	min-height: 180px;
	padding: 22px;
	text-align: center;
}

.jpg-gallery-placeholder strong {
	color: #1f2937;
	font-size: 15px;
}

.jpg-gallery-placeholder span {
	font-size: 12px;
	line-height: 1.8;
}

/* Full-screen lightbox is appended to body to avoid Elementor overflow/transform clipping. */
.jpg-lightbox[hidden] {
	display: none !important;
}

.jpg-lightbox {
	--jpg-accent: #006039;
	--jpg-lightbox-bg: #0b0f0d;
	--jpg-wm-columns: 2;
	--jpg-wm-image-width: 100px;
	--jpg-wm-image-rotation: 0deg;
	--jpg-wm-opacity: 0.28;
	--jpg-wm-text-color: #fff;
	--jpg-wm-text-rotation: 0deg;
	--jpg-wm-text-size: 18px;
	background: var(--jpg-lightbox-bg);
	color: #fff;
	direction: rtl;
	display: grid;
	font-family: inherit;
	grid-template-rows: auto minmax(0, 1fr) auto auto;
	inset: 0;
	isolation: isolate;
	height: 100vh;
	height: 100dvh;
	overscroll-behavior: contain;
	overflow: hidden;
	position: fixed;
	z-index: 999999;
}

.jpg-lightbox::before {
	background:
		radial-gradient(circle at 20% 20%, rgba(0, 96, 57, 0.18), transparent 31%),
		radial-gradient(circle at 80% 85%, rgba(255, 255, 255, 0.05), transparent 27%);
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
	z-index: -1;
}

.jpg-lightbox__header {
	align-items: center;
	background: rgba(0, 0, 0, 0.18);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	display: flex;
	justify-content: center;
	min-height: 68px;
	padding: 8px 14px;
	position: relative;
}

.jpg-lightbox__toolbar,
.jpg-lightbox__meta {
	align-items: center;
	display: flex;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
}

.jpg-lightbox__toolbar {
	gap: 5px;
	inset-inline-start: 14px;
}

.jpg-lightbox__meta {
	gap: 8px;
	inset-inline-end: 14px;
}

.jpg-lightbox__groups {
	align-items: stretch;
	background: rgba(0, 0, 0, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 14px;
	display: inline-flex;
	max-width: min(44vw, 620px);
	min-width: 0;
	overflow-x: auto;
	padding: 0;
	scrollbar-width: none;
}

.jpg-lightbox__groups::-webkit-scrollbar {
	display: none;
}

.jpg-lightbox__group {
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 0;
	color: #fff;
	cursor: pointer;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.4;
	min-width: 108px;
	opacity: 0.76;
	padding: 11px 18px 13px;
	position: relative;
	transition: background-color 150ms ease, opacity 150ms ease;
	white-space: nowrap;
}

.jpg-lightbox__group + .jpg-lightbox__group {
	border-inline-start: 1px solid rgba(255, 255, 255, 0.18);
}

.jpg-lightbox__group:hover {
	background: rgba(255, 255, 255, 0.06);
	opacity: 1;
}

.jpg-lightbox__group.is-active {
	opacity: 1;
}

.jpg-lightbox__group.is-active::after {
	background: #fff;
	border-radius: 999px 999px 0 0;
	bottom: 0;
	content: "";
	height: 3px;
	left: 50%;
	position: absolute;
	transform: translateX(-50%);
	width: 28px;
}

.jpg-lightbox__group:disabled {
	cursor: default;
}

.jpg-lightbox__counter {
	direction: ltr;
	flex: 0 0 auto;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	opacity: 0.75;
}

.jpg-lightbox__tool,
.jpg-lightbox__nav {
	align-items: center;
	appearance: none;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
	display: flex;
	height: 40px;
	justify-content: center;
	padding: 0;
	transition: background-color 150ms ease, transform 150ms ease;
	width: 40px;
}

.jpg-lightbox__tool {
	border-radius: 10px;
}

.jpg-lightbox__close {
	background: transparent;
	border-color: transparent;
}

.jpg-lightbox__tool:hover,
.jpg-lightbox__nav:hover {
	background: var(--jpg-accent);
}

.jpg-lightbox__tool:active,
.jpg-lightbox__nav:active {
	transform: scale(0.94);
}

.jpg-lightbox__viewport {
	align-items: center;
	display: flex;
	justify-content: center;
	min-height: 0;
	overflow: hidden;
	padding: 10px 76px;
	position: relative;
	touch-action: pan-y;
}

.jpg-lightbox__viewport.is-pinching,
.jpg-lightbox__viewport.is-panning,
.jpg-lightbox__viewport.is-zoomed {
	touch-action: none;
}

.jpg-lightbox__media-frame {
	align-items: center;
	display: flex;
	height: 100%;
	justify-content: center;
	max-height: 100%;
	max-width: 100%;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.jpg-lightbox__media-surface {
	height: 100%;
	max-height: 100%;
	max-width: 100%;
	position: relative;
	transform-origin: center center;
	transition: transform 160ms ease;
	width: 100%;
}

.jpg-lightbox__viewport.is-pinching .jpg-lightbox__media-surface,
.jpg-lightbox__viewport.is-panning .jpg-lightbox__media-surface {
	transition: none;
	will-change: transform;
}

.jpg-lightbox__media-surface > .jpg-lightbox__media {
	background: transparent;
	border: 0;
	display: block;
	height: 100%;
	margin: 0;
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
	width: 100%;
}

.jpg-lightbox__media-surface > iframe,
.jpg-lightbox__media-surface > video {
	background: #000;
}

.jpg-lightbox__video-facade {
	align-items: center;
	background: #080b0a;
	display: flex !important;
	justify-content: center;
	overflow: hidden;
	position: relative;
}

.jpg-lightbox__video-poster {
	display: block;
	height: 100%;
	margin: 0;
	object-fit: contain;
	width: 100%;
}

.jpg-lightbox__video-facade-placeholder {
	align-items: center;
	background: linear-gradient(145deg, #17201c, #080b0a);
	color: rgba(255, 255, 255, 0.7);
	display: flex;
	height: 100%;
	justify-content: center;
	width: 100%;
}

.jpg-lightbox__video-facade-placeholder svg {
	fill: currentColor;
	height: 72px;
	width: 72px;
}

.jpg-lightbox__video-play {
	align-items: center;
	appearance: none;
	background: var(--jpg-accent);
	border: 2px solid rgba(255, 255, 255, 0.82);
	border-radius: 50%;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
	color: #fff;
	cursor: pointer;
	display: flex;
	height: 72px;
	justify-content: center;
	left: 50%;
	padding: 0;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	transition: background-color 150ms ease, transform 150ms ease;
	width: 72px;
	z-index: 6;
}

.jpg-lightbox__video-play:hover {
	background: color-mix(in srgb, var(--jpg-accent) 82%, #fff);
	transform: translate(-50%, -50%) scale(1.05);
}

.jpg-lightbox__video-play:active {
	transform: translate(-50%, -50%) scale(0.96);
}

.jpg-lightbox__video-play svg {
	fill: currentColor;
	height: 34px;
	margin-left: 3px;
	stroke-width: 1.5;
	width: 34px;
}

.jpg-lightbox__media-frame.is-desktop-zoom-enabled .jpg-lightbox__image {
	cursor: zoom-in;
}

.jpg-lightbox__media-frame .jpg-lightbox__image.is-zoomed {
	cursor: zoom-out;
}

.jpg-lightbox__nav {
	border-radius: 50%;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 12;
}

.jpg-lightbox__nav:active {
	transform: translateY(-50%) scale(0.94);
}

.jpg-lightbox__nav--previous {
	right: 18px;
}

.jpg-lightbox__nav--next {
	left: 18px;
}

.jpg-lightbox[dir="ltr"] .jpg-lightbox__nav--previous {
	left: 18px;
	right: auto;
}

.jpg-lightbox[dir="ltr"] .jpg-lightbox__nav--next {
	left: auto;
	right: 18px;
}

.jpg-lightbox__caption {
	align-items: baseline;
	display: flex;
	gap: 9px;
	justify-content: center;
	line-height: 1.7;
	min-height: 35px;
	padding: 4px 20px 8px;
	text-align: center;
}

.jpg-lightbox__caption span {
	font-size: 12px;
	opacity: 0.72;
}

.jpg-lightbox__caption span:empty {
	display: none;
}

.jpg-lightbox__thumbs {
	align-items: center;
	display: flex;
	gap: 7px;
	justify-content: center;
	justify-content: safe center;
	overflow-x: auto;
	padding: 8px 14px 12px;
	scroll-behavior: smooth;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
	scrollbar-width: thin;
}

.jpg-lightbox__thumb {
	appearance: none;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 8px;
	cursor: pointer;
	flex: 0 0 54px;
	height: 54px;
	overflow: hidden;
	padding: 2px;
	position: relative;
	width: 54px;
}

.jpg-lightbox__thumb.is-active {
	border-color: #fff;
	box-shadow: 0 0 0 2px var(--jpg-accent);
}

.jpg-lightbox__thumb img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.jpg-lightbox__thumb-video {
	align-items: center;
	background: #121916;
	color: #fff;
	display: flex;
	height: 100%;
	justify-content: center;
	width: 100%;
}

.jpg-lightbox__thumb-video svg {
	fill: currentColor;
	height: 18px;
	width: 18px;
}

body.jpg-lightbox-open {
	overflow: hidden !important;
}

@media (max-width: 767px) {
	.jpg-gallery {
		--jpg-thumb-size: 58px;
		--jpg-wm-image-width: 62px;
		--jpg-wm-text-size: 12px;
	}

	.jpg-gallery__title {
		font-size: 17px;
	}

	.jpg-gallery__thumbs {
		bottom: auto;
		flex-direction: row;
			margin: 0;
		overflow-x: auto;
		overflow-y: hidden;
		padding: 2px 2px 5px;
		position: static;
		top: auto;
		width: 100%;
	}

	.jpg-watermark__item {
		gap: 3px;
	}

	.jpg-lightbox__header {
		align-items: flex-end;
		min-height: calc(102px + env(safe-area-inset-top));
		padding: calc(54px + env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left));
	}

	.jpg-lightbox__toolbar,
	.jpg-lightbox__meta {
		top: max(8px, env(safe-area-inset-top));
		transform: none;
	}

	.jpg-lightbox__toolbar {
		gap: 3px;
		inset-inline-start: max(8px, env(safe-area-inset-left));
	}

	.jpg-lightbox__meta {
		inset-inline-end: max(8px, env(safe-area-inset-right));
	}

	.jpg-lightbox__groups {
		max-width: calc(100vw - 16px);
	}

	.jpg-lightbox__group {
		font-size: 12px;
		min-width: 94px;
		padding: 9px 13px 11px;
	}

	.jpg-lightbox--without-groups .jpg-lightbox__header {
		align-items: center;
		min-height: calc(54px + env(safe-area-inset-top));
		padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left));
	}

	.jpg-lightbox__tool {
		height: 36px;
		width: 36px;
	}

	.jpg-lightbox__tool[data-jpg-zoom-in],
	.jpg-lightbox__tool[data-jpg-zoom-out],
	.jpg-lightbox__tool[data-jpg-zoom-reset] {
		display: none;
	}

	.jpg-lightbox__viewport {
		padding: 8px 45px;
	}

	.jpg-lightbox__nav {
		height: 36px;
		width: 36px;
	}

	.jpg-lightbox__nav--previous {
		right: 5px;
	}

	.jpg-lightbox__nav--next {
		left: 5px;
	}

	.jpg-lightbox[dir="ltr"] .jpg-lightbox__nav--previous {
		left: 5px;
		right: auto;
	}

	.jpg-lightbox[dir="ltr"] .jpg-lightbox__nav--next {
		left: auto;
		right: 5px;
	}

	.jpg-lightbox__caption {
		display: grid;
		gap: 1px;
		min-height: 42px;
		padding: 3px 10px 6px;
	}

	.jpg-lightbox__video-play {
		height: 60px;
		width: 60px;
	}

	.jpg-lightbox__video-play svg {
		height: 28px;
		width: 28px;
	}

	.jpg-lightbox__caption span {
		font-size: 10px;
	}

	.jpg-lightbox__thumbs {
		justify-content: flex-start;
		padding: 6px max(8px, env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
	}

	.jpg-lightbox__thumb {
		flex-basis: 46px;
		height: 46px;
		width: 46px;
	}
}

@media (max-width: 420px) {
	.jpg-lightbox__tool[data-jpg-fullscreen] {
		display: none;
	}

	.jpg-lightbox__group {
		max-width: 128px;
		min-width: 88px;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jpg-gallery *,
	.jpg-lightbox * {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}
