/* ================================================================
   Product Gallery Widget — productGallery.css
   ================================================================ */

/* ── Main area ── */
.pg-wrapper {
	position: relative;
}

.pg-main-area {
	position: relative;
}

.pg-badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	background: #1A52A0;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 5px 13px;
	pointer-events: none;
	line-height: 1.4;
}

.pg-main-wrap {
	position: relative;
	cursor: zoom-in;
	border: 1px solid #e2e2e2;
	border-radius: 6px;
	overflow: hidden;
	outline: none;
	aspect-ratio: 1 / 1;
}
.pg-main-wrap:focus-visible {
	box-shadow: 0 0 0 2px rgba(26, 82, 118, 0.35);
}

.pg-main-media {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width:100%;
	height:100%;
}

.pg-main-img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	display: block;
	object-fit: contain;
	transition: opacity 0.18s ease;
}

/* Zoom icon — bottom-right of main image area */
.pg-zoom-icon {
	position: absolute;
	bottom: 10px;
	right: 10px;
	z-index: 2;
	background: rgba(255, 255, 255, 0.88);
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #213946;
	pointer-events: none;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Video placeholder shown in main gallery (not a player — opens lightbox on click).
   Kept in-flow with its own ratio: if theme/Elementor rules override the
   aspect-ratio on .pg-main-wrap, an absolute placeholder would collapse the
   wrap to zero height and the content below would overlap the gallery. */
.pg-main-video-placeholder {
	position: relative;
	width: 100%;
	max-height: 100%;
	aspect-ratio: 13 / 10;
	background: #111;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.pg-main-video-thumb {
	
	inset: 0;
	width: 100% !important;   /* !important: themes force img { height: auto } */
	height: 100% !important;
	object-fit: cover;
	opacity: 0.6;
}

.pg-main-play-btn {
	position: absolute;
	z-index: 1;
	width: 72px;
	height: 72px;
	background: rgba(255, 255, 255, 0.92);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #cc181e;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
	transition: transform 0.15s, box-shadow 0.15s;
}
.pg-main-wrap:hover .pg-main-play-btn {
	transform: scale(1.08);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}
.pg-main-play-btn svg {
	width: 34px;
	height: 34px;
	margin-left: 4px;
}

/* ── Pagination dots (mobile only — shown under 768px) ── */
.pg-dots {
	display: none;
}

/* ── Thumbnail strip ── */
.pg-thumbs-wrap {
	margin-top: 10px;
}

.pg-thumbs-swiper .swiper-slide {
	width: 72px !important;
	height: 72px;
	cursor: pointer;
	border: 2px solid #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
	flex-shrink: 0;
	position: relative;
	background: #f5f5f5;
	transition: border-color 0.15s;
	outline: none;
}
.pg-thumbs-swiper .swiper-slide:hover {
	border-color: #999;
}
.pg-thumbs-swiper .swiper-slide.is-active {
	border-color: #1a73e8;
}
.pg-thumbs-swiper .swiper-slide:focus-visible {
	box-shadow: 0 0 0 2px rgba(26, 82, 118, 0.35);
}
.pg-thumbs-swiper .swiper-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.pg-thumb-placeholder {
	width: 100%;
	height: 100%;
	background: #2c2c2c;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 18px;
}

.pg-thumb-video-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.28);
}

.pg-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #cc181e;
    font-size: 16px;
    pointer-events: none;
    width: 30px;
    height: 30px;
    background-color: white;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ================================================================
   Lightbox
   ================================================================ */

.pg-lb-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	z-index: 10998;
}
.pg-lb-overlay[hidden] { display: none; }

.pg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.pg-lightbox[hidden] { display: none; }

.pg-lb-modal {
	position: relative;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
	width: 100%;
	max-width: 1060px;
	height: 85vh;
	max-height: 820px;
	overflow: hidden;
}

/* ── Close button ── */
.pg-lb-close {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 20;
	background: rgba(0, 0, 0, 0.06);
	border: none;
	color: #333;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 10px 6px;
	border-radius: 4px;
	transition: background 0.15s;
}
.pg-lb-close:hover { background: rgba(0, 0, 0, 0.14); }

/* ── Sidebar (left thumbnail column) ── */
.pg-lb-sidebar {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 112px;
	background: #f7f7f7;
	border-right: 1px solid #e8e8e8;
	overflow-y: auto;
	padding: 10px 8px;
	scrollbar-width: thin;
	scrollbar-color: #ccc transparent;
	z-index: 1;
}
.pg-lb-sidebar::-webkit-scrollbar { width: 4px; }
.pg-lb-sidebar::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.pg-lb-thumbs {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pg-lb-thumb {
	width: 92px;
	height: 92px;
	border: 2px solid #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
	cursor: pointer;
	flex-shrink: 0;
	position: relative;
	background: #fff;
	transition: border-color 0.15s;
	outline: none;
}
.pg-lb-thumb.is-active,
.pg-lb-thumb:hover { border-color: #1a73e8; }
.pg-lb-thumb:focus-visible { box-shadow: 0 0 0 2px rgba(26, 82, 118, 0.35); }
.pg-lb-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

/* ── Main area (right of sidebar) ── */
.pg-lb-main {
	position: absolute;
	inset: 0;
	left: 112px;
	display: flex;
	flex-direction: column;
}
.pg-lb-main.no-sidebar { left: 0; }

.pg-lb-body {
	flex: 1;
	position: relative;
	min-height: 0;
	background: #fff;
}

/* ── Arrows ── */
.pg-lb-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: 1px solid transparent;
	color: #444;
	width: 44px;
	height: 60px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	z-index: 5;
	transition: background 0.15s, border-color 0.15s;
}
.pg-lb-arrow:hover {
	background: #fff;
	border-color: #bbb;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.pg-lb-prev { left: 6px; }
.pg-lb-next { right: 6px; }
.pg-lb-arrow:disabled { opacity: 0.2; cursor: default; pointer-events: none; }

/* ── Media wrap (zoom container) ── */
.pg-lb-media-wrap {
	position: absolute;
	inset: 0;
	overflow: hidden;
	user-select: none;
	-webkit-user-select: none;
}
.pg-lb-media-wrap.is-image { cursor: zoom-in; }
.pg-lb-media-wrap.is-zoomed { cursor: zoom-out; }
.pg-lb-media-wrap.is-video  { cursor: default; }

.pg-lb-img {
	width: 100%;
	height: 100% !important;
	object-fit: contain;
	display: block;
	transform-origin: 0 0;
	transition: opacity 0.18s ease;
	pointer-events: none;
	will-change: transform;
	-webkit-user-drag: none;
}

.pg-lb-video {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.pg-lb-iframe-wrap {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.pg-lb-iframe-wrap iframe {
	width: 100%;
	height: 100%;
	max-height: 100%;
	border: 0;
}

/* ── Footer ── */
.pg-lb-footer {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
	padding: 10px 16px;
	border-top: 1px solid #eee;
	background: #fff;
}

.pg-lb-counter {
	font-size: 13px;
	color: #888;
	margin-right: auto;
}

.pg-offer-btn {
	background: #1A52A0;
	color: #fff;
	border: none;
	padding: 9px 22px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	letter-spacing: 0.02em;
	transition: background 0.18s;
	white-space: nowrap;
}
.pg-offer-btn:hover { filter: brightness(1.12); }

/* ── Body lock ── */
body.pg-open { overflow: hidden; }

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 767px) {
  
    .gallery-container-product{
        aspect-ratio:13/10
    }

	/* Thumbnails → pagination dots */
	.pg-thumbs-wrap {
		display: none;
	}

	.pg-dots {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		margin-top: 14px;
	}
	.pg-dot {
		width: 9px;
		height: 9px;
		padding: 0;
		border: none;
		border-radius: 50%;
		background: #d9d9d9;
		cursor: pointer;
		transition: background 0.15s, transform 0.15s;
	}
	.pg-dot.is-active {
		background: #14253F;
        width: 28px;
        border-radius: 4px;
	}

	.pg-lightbox { padding: 10px; }

	.pg-lb-modal {
		height: 88vh;
		max-height: 88vh;
	}

	/* Sidebar → horizontal strip at bottom */
	.pg-lb-sidebar {
		position: relative;
		left: auto; top: auto; bottom: auto;
		width: 100%;
		height: 82px;
		overflow-x: auto;
		overflow-y: hidden;
		padding: 8px 8px 0;
		border-right: none;
		border-top: 1px solid #e8e8e8;
	}
	.pg-lb-thumbs {
		flex-direction: row;
		gap: 6px;
	}
	.pg-lb-thumb {
		width: 64px;
		height: 64px;
		flex-shrink: 0;
	}

	.pg-lb-main {
		position: absolute;
		inset: 0;
		left: 0;
		bottom: 82px; /* height of thumb strip */
	}
	.pg-lb-main.no-sidebar { bottom: 0; }

	.pg-lb-prev { left: 4px; }
	.pg-lb-next { right: 4px; }

	.pg-lb-arrow {
		width: 36px;
		height: 48px;
	}

	.pg-lb-footer { padding: 8px 12px; }

	.pg-offer-btn {
		font-size: 13px;
		padding: 7px 16px;
		width: 100%;
		justify-content: center;
	}
}
