/**
 * dg-gallery.css - Modern, Lean Product Gallery Styles for Flatsome Child
 */

:root {
	--dg-primary: #dd9933;
	--dg-primary-hover: #e79c2b;
	--dg-border: #f0f0f0;
	--dg-radius: 8px;
}

/* Main gallery container */
.product-gallery-main {
	position: relative;
	overflow: hidden;
	border-radius: var(--dg-radius);
	background: #fff;
	user-select: none;
	-webkit-user-select: none;
	touch-action: pan-y;
}

.product-gallery-main img.wp-post-image {
	width: 100%;
	height: auto;
	border: 1px solid var(--dg-border);
	border-radius: var(--dg-radius);
	display: block;
	object-fit: contain;
	will-change: transform, opacity;
}

.product-gallery-main a {
	display: block;
	cursor: zoom-in;
}

/* Modern navigation arrows */
.gallery-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(0, 0, 0, 0.06);
	color: #2b2b2b;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
	transition: background 0.25s ease, color 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
	padding: 0;
}

.gallery-arrow:hover {
	background: #ffffff;
	color: var(--dg-primary);
	transform: translateY(-50%) scale(1.08);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}

.gallery-arrow:active {
	transform: translateY(-50%) scale(0.95);
}

.gallery-prev {
	right: 14px;
}

.gallery-next {
	left: 14px;
}

/* Thumbnails grid */
.product-thumbnails.dg-thumbnails {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-top: 12px;
}

.product-thumbnails.dg-thumbnails .thumb {
	display: block;
	text-decoration: none;
	border-radius: 6px;
	overflow: hidden;
}

.product-thumbnails.dg-thumbnails .thumb img {
	width: 100%;
	height: auto;
	border: 2px solid transparent;
	border-radius: 6px;
	opacity: 0.65;
	transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
	display: block;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: #fbfbfb;
}

.product-thumbnails.dg-thumbnails .thumb:hover img {
	opacity: 0.9;
}

.product-thumbnails.dg-thumbnails .thumb.is-active img {
	opacity: 1;
	border-color: var(--dg-primary);
	box-shadow: 0 2px 8px rgba(221, 153, 51, 0.2);
}

/* Lightbox overlay */
.dg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(10, 10, 10, 0.94);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	opacity: 0;
	transition: opacity 0.28s ease;
}

.dg-lightbox.open {
	display: flex;
	opacity: 1;
}

.dg-lightbox-img {
	max-width: 90vw;
	max-height: 86vh;
	object-fit: contain;
	border-radius: 6px;
	cursor: default;
	background: transparent;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
	transition: opacity 0.2s ease, transform 0.25s ease;
}

.dg-lightbox-close {
	position: absolute;
	top: 20px;
	left: 20px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
	z-index: 10;
}

.dg-lightbox-close:hover {
	background: rgba(255, 255, 255, 0.28);
	transform: scale(1.06);
}

.dg-lightbox-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
	z-index: 10;
}

.dg-lightbox-arrow:hover {
	background: rgba(255, 255, 255, 0.26);
	border-color: rgba(255, 255, 255, 0.4);
	transform: translateY(-50%) scale(1.08);
}

.dg-lightbox-prev {
	right: 20px;
}

.dg-lightbox-next {
	left: 20px;
}

.woocommerce-product-gallery {
	opacity: 1 !important;
}