/* Galería producto BYO — independiente de WooCommerce Flexslider */

.elementor-widget-byo_product_gallery .elementor-widget-container {
	padding: 0 !important;
	border: none !important;
	box-shadow: none !important;
	background: transparent !important;
}

.byo-product-gallery {
	width: 100%;
	max-width: 100%;
}

.byo-product-gallery__main {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 0;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	overflow: hidden;
	cursor: zoom-in;
}

.byo-product-gallery__main-img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	max-height: min(42vw, 420px);
	object-fit: contain;
	object-position: center;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	image-rendering: auto;
	transform: scale(1);
	transform-origin: center center;
	transition: transform 0.35s ease;
	will-change: transform;
}

.byo-product-gallery__main.is-zoomed .byo-product-gallery__main-img {
	transition: transform 0.25s ease;
}

.byo-product-gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(var(--byo-pg-cols, 5), minmax(0, 1fr));
	gap: 8px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
	width: 100%;
	max-width: 100%;
}

.byo-product-gallery__thumb-item {
	margin: 0;
	padding: 0;
	background: transparent !important;
	border: none !important;
}

.byo-product-gallery .byo-product-gallery__thumb {
	display: block;
	width: 100%;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none !important;
	cursor: pointer;
	overflow: hidden;
}

.byo-product-gallery .byo-product-gallery__thumb:hover,
.byo-product-gallery .byo-product-gallery__thumb:focus,
.byo-product-gallery .byo-product-gallery__thumb:focus-visible,
.byo-product-gallery .byo-product-gallery__thumb.is-active {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
}

.byo-product-gallery__thumb img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	object-position: center;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	opacity: 1 !important;
	filter: none !important;
}

.elementor-widget-byo_product_gallery .flex-control-thumbs li img,
.elementor-widget-byo_product_gallery .byo-product-gallery__thumb img {
	opacity: 1 !important;
	border: none !important;
	background: transparent !important;
}

@media (max-width: 1024px) {
	.byo-product-gallery__main-img {
		max-height: min(48vw, 380px);
	}

	.byo-product-gallery__thumbs {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (hover: none), (max-width: 767px) {
	.byo-product-gallery__main {
		cursor: default;
	}

	.byo-product-gallery__main-img {
		transform: none !important;
		transition: none !important;
	}
}

@media (max-width: 767px) {
	.byo-product-gallery__main-img {
		max-height: min(78vw, 340px);
	}

	.byo-product-gallery__thumbs {
		display: flex;
		flex-wrap: nowrap;
		gap: 8px;
		margin-top: 10px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
		padding-bottom: 2px;
	}

	.byo-product-gallery__thumb-item {
		flex: 0 0 64px;
		width: 64px;
	}
}
