/**
 * VDuma — shared home-style image card + native scroll-snap carousel.
 * Body-class agnostic: usable on any page/module (Product List, Recently
 * View builder modules, etc.) whenever the VDuma header layout is active.
 */

.vduma-carousel-viewport {
	position: relative;
	width: 100%;
}

ul.products.rwot-vduma-image-grid {
	display: flex !important;
	flex-wrap: nowrap !important;
	grid-template-columns: none !important;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	gap: 24px !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	width: 100% !important;
	max-width: 100% !important;
	cursor: grab;
	touch-action: pan-x;
}

ul.products.rwot-vduma-image-grid.is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	user-select: none;
	-webkit-user-select: none;
}

ul.products.rwot-vduma-image-grid.is-dragging a {
	pointer-events: none;
}

ul.products.rwot-vduma-image-grid::-webkit-scrollbar {
	display: none;
}

ul.products.rwot-vduma-image-grid::before,
ul.products.rwot-vduma-image-grid::after {
	display: none !important;
	content: none !important;
}

ul.products.rwot-vduma-image-grid li.product.rwot-vduma-image-card {
	float: none !important;
	clear: none !important;
	margin: 0 !important;
	padding: 0 !important;
	flex: 0 0 calc((100% - 48px) / 3) !important;
	width: calc((100% - 48px) / 3) !important;
	max-width: calc((100% - 48px) / 3) !important;
	min-width: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	border: none !important;
	box-sizing: border-box !important;
	scroll-snap-align: start;
}

/* Home-style image-only cards (portrait thumb + sale badge + hover swap) */
.rwot-vduma-image-card .vduma-pdp-image-card {
	width: 100%;
	border-radius: 0 !important;
	background: transparent;
	overflow: hidden;
	position: relative;
	display: block;
}

.rwot-vduma-image-card .vduma-pdp-image-card-link {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	height: auto;
	position: relative;
	text-decoration: none;
	background: #f3f1ee;
	pointer-events: auto;
	touch-action: manipulation;
}

.rwot-vduma-image-card .vduma-pdp-image-card-imgwrap {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden;
}

.rwot-vduma-image-card .vduma-pdp-image-card-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
	transition: opacity 0.4s ease;
}

.rwot-vduma-image-card .vduma-pdp-image-card-img--primary {
	opacity: 1;
	z-index: 1;
}

.rwot-vduma-image-card .vduma-pdp-image-card-img--hover {
	opacity: 0;
	z-index: 2;
}

.rwot-vduma-image-card:hover .vduma-pdp-image-card-img--hover {
	opacity: 1;
}

.rwot-vduma-image-card:hover .vduma-pdp-image-card-img--primary {
	opacity: 0;
}

.rwot-vduma-image-card .vdouma-sale-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	background: #fff;
	color: #c0392b;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.03em;
	padding: 3px 8px;
	border-radius: 0;
	line-height: 1.3;
}

/* Carousel arrows */
.vduma-carousel-arrow {
	position: absolute;
	top: 38%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid #e8e8e8;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	color: #1a1a1a;
	cursor: pointer;
	z-index: 10;
	padding: 0;
	transition: opacity 0.2s ease, box-shadow 0.2s ease;
	pointer-events: auto;
}

.vduma-carousel-arrow--prev {
	left: 12px;
}

.vduma-carousel-arrow--next {
	right: 12px;
}

.vduma-carousel-arrow:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
}

.vduma-carousel-arrow:disabled {
	opacity: 0.35;
	cursor: default;
	pointer-events: none;
}

@media (max-width: 991.98px) {
	ul.products.rwot-vduma-image-grid {
		gap: 16px !important;
	}

	ul.products.rwot-vduma-image-grid li.product.rwot-vduma-image-card {
		flex: 0 0 calc((100% - 16px) / 2) !important;
		width: calc((100% - 16px) / 2) !important;
		max-width: calc((100% - 16px) / 2) !important;
	}

	.vduma-carousel-arrow {
		display: none;
	}
}

@media (max-width: 575.98px) {
	ul.products.rwot-vduma-image-grid {
		gap: 10px !important;
	}

	ul.products.rwot-vduma-image-grid li.product.rwot-vduma-image-card {
		flex-basis: 78% !important;
		width: 78% !important;
		max-width: 78% !important;
	}
}
