/* gCampaner - Woo Slider on Category - CSS */

.gcampaner-product-image-slider-link {
	display: block !important;
	text-decoration: none;
	color: inherit;
	width: 100%;
	position: relative;
}

.gcampaner-product-image-slider {
	position: relative;
	overflow: hidden;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	touch-action: pan-x pan-y pinch-zoom; /* Permitir pinch-zoom */
	display: block;
	width: 100%;
}

.gcampaner-product-image-slider:active {
	cursor: grabbing;
}

.gcampaner-product-image-slider .gcampaner-slider-images {
	position: relative;
	width: 100%;
	padding-bottom: 150%; /* Mantém a proporção 2:3 (1:1.5) - igual ao Flatsome */
	touch-action: pan-x pan-y pinch-zoom; /* Permitir pinch-zoom */
	overflow: hidden;
}

.gcampaner-product-image-slider .gcampaner-slider-wrapper {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	transition: transform 500ms ease-in-out;
	will-change: transform;
}

.gcampaner-product-image-slider .gcampaner-slider-image {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: auto; /* Mudado de 'none' para 'auto' para permitir interação */
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

.gcampaner-product-image-slider .gcampaner-slider-indicators {
	position: absolute;
	bottom: 10px;
	left: 10px;
	right: 10px;
	display: flex;
	gap: 4px;
	z-index: 10;
	justify-content: center;
}

.gcampaner-product-image-slider .gcampaner-slider-indicator {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	background: rgba(255, 255, 255, 0.4);
	cursor: pointer;
	border-radius: 50%;
	transition: background 0.3s ease;
}

.gcampaner-product-image-slider .gcampaner-slider-indicator.active {
	background: rgba(255, 255, 255, 1);
}

/* Ocultar .box-image quando o slider estiver ativo */
.product:has(.gcampaner-product-image-slider-link) .box-image,
.product:has(.gcampaner-product-image-slider) .box-image,
.product-small:has(.gcampaner-product-image-slider-link) .box-image,
.product-small:has(.gcampaner-product-image-slider) .box-image,
li.product:has(.gcampaner-product-image-slider-link) .box-image,
li.product:has(.gcampaner-product-image-slider) .box-image {
	display: none !important;
}

/* Fallback para navegadores sem suporte a :has() - será aplicado via JavaScript */
.product.gcampaner-has-slider .box-image,
.product-small.gcampaner-has-slider .box-image,
li.product.gcampaner-has-slider .box-image {
	display: none !important;
}

/* Corrigir height gigante no box-text de produtos sem slider */
.product:not(:has(.gcampaner-product-image-slider-link)):not(:has(.gcampaner-product-image-slider)) .box-text.box-text-products,
.product-small:not(:has(.gcampaner-product-image-slider-link)):not(:has(.gcampaner-product-image-slider)) .box-text.box-text-products,
li.product:not(:has(.gcampaner-product-image-slider-link)):not(:has(.gcampaner-product-image-slider)) .box-text.box-text-products {
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
}

/* Fallback para navegadores sem suporte a :has() */
.product:not(.gcampaner-has-slider) .box-text.box-text-products,
.product-small:not(.gcampaner-has-slider) .box-text.box-text-products,
li.product:not(.gcampaner-has-slider) .box-text.box-text-products {
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
}

