/**
 * JT Product Carousel / Grid widget styles.
 *
 * Extracted verbatim from the widget's own inline <style> block - every
 * rule was already fully static (no per-instance dynamic values; --mj-cols
 * and --mj-gap are Elementor-control-driven CSS custom properties, already
 * instance-safe). Scoped by the widget's stable wrapper class
 * (.jt-product-module) instead of the per-instance Elementor element ID.
 */

/* Common Variables */
.jt-product-module {
	position: relative;
	width: 100%;
	max-width: 1920px;
	margin: 0 auto;
}
/* Grid Layout */
.jt-product-module.jt-product-grid .jt-product-track {
	display: grid;
	gap: var(--mj-gap);
	grid-template-columns: repeat(var(--mj-cols, 4), 1fr);
}
/* Slider Layout */
.jt-product-module.jt-product-slider .jt-product-track {
	display: flex;
	gap: var(--mj-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none; /* Firefox */
	padding: 15px calc(var(--mj-gap, 20px) * 2) 0 5px; /* Prevent box-shadow cropping & buffer for peek */
}
.jt-product-module.jt-product-slider .jt-product-track::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.jt-product-module.jt-product-slider .jt-product-item {
	flex: 0 0 calc( (100% / var(--mj-cols, 4)) - var(--mj-gap, 20px) );
	min-width: calc( (100% / var(--mj-cols, 4)) - var(--mj-gap, 20px) );
	scroll-snap-align: start;
}

/* Arrows */
.jt-product-module .jt-nav-arrow {
	position: absolute; top: 40%; transform: translateY(-50%); z-index: 10;
	width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 1px solid #e2e8f0;
	color: #0f172a; box-shadow: 0 4px 12px rgba(0,0,0,0.1); cursor: pointer; display: flex;
	align-items: center; justify-content: center; font-size: 14px; transition: 0.3s;
}
.jt-product-module .jt-nav-arrow:hover { background: #0f172a; color: #fff; }
.jt-product-module .jt-nav-arrow.prev { left: -15px; }
.jt-product-module .jt-nav-arrow.next { right: -15px; }
@media (max-width: 768px) { .jt-product-module .jt-nav-arrow { display: none; } }

/* Some sites' Elementor Global Kit sets a custom Heading (h1-h6) color/size in
   Site Settings -> Global Fonts, which is more specific than a plain widget
   class and silently overrides the shared product-card title on this widget only. */
.jt-product-item .mj-product-name,
.jt-product-item .mj-v2-title,
.jt-product-item .mj-v3-title {
	font-size: var(--mj-shop-title-font-size, 14px) !important;
}
@media (max-width: 1024px) {
	.jt-product-item .mj-v2-title { font-size: 14px !important; }
	.jt-product-item .mj-v3-title { font-size: 12px !important; }
}
