/**
 * MAXTECNO home carousel — Gemini fidelity + overrides vs Impreza.
 * Scope: .maxtecno-home-carousel only (no afecta shop/652).
 * v1.4.1 — anti-FOUC fuerte: invisible hasta Swiper ready + ancho pre-reservado.
 */
.maxtecno-home-carousel.innovative-gamer-carousel {
	--brand-purple: #5c18cf;
	--brand-dark: #251445;
	--brand-neon: #d5ff00;
	--text-dark: #251445;
	--text-light: #ffffff;
	--font-main: "Montserrat", "Segoe UI", sans-serif;
	--mhc-arrow-space: 56px;
	--mhc-shadow-pad: 36px;
	--mhc-per-view: 4;
	--mhc-mobile: 2.5;
	--mhc-tablet: 3;
	--mhc-slide-w: calc(100% / var(--mhc-per-view));

	font-family: var(--font-main) !important;
	padding: 12px var(--mhc-arrow-space) 8px !important;
	max-width: 1800px;
	margin: 0 auto !important;
	overflow: visible !important;
	position: relative;
	box-sizing: border-box;
	isolation: isolate;
}

/* Vars desde data-* (cubre shortcodes sin style inline) */
.maxtecno-home-carousel[data-per-view="3"],
.maxtecno-home-carousel[data-per-view="3.0"] { --mhc-per-view: 3; --mhc-tablet: 2; }
.maxtecno-home-carousel[data-per-view="4"],
.maxtecno-home-carousel[data-per-view="4.0"] { --mhc-per-view: 4; --mhc-tablet: 3; }
.maxtecno-home-carousel[data-per-view="5"],
.maxtecno-home-carousel[data-per-view="5.0"] { --mhc-per-view: 5; --mhc-tablet: 4; }
.maxtecno-home-carousel[data-per-view="6"],
.maxtecno-home-carousel[data-per-view="6.0"] { --mhc-per-view: 6; --mhc-tablet: 4; }
.maxtecno-home-carousel[data-mobile="2"],
.maxtecno-home-carousel[data-mobile="2.0"] { --mhc-mobile: 2; }
.maxtecno-home-carousel[data-mobile="2.5"] { --mhc-mobile: 2.5; }
.maxtecno-home-carousel[data-mobile="3"],
.maxtecno-home-carousel[data-mobile="3.0"] { --mhc-mobile: 3; }

@media (max-width: 1023px) {
	.maxtecno-home-carousel.innovative-gamer-carousel {
		--mhc-slide-w: calc(100% / var(--mhc-tablet));
	}
}

@media (max-width: 767px) {
	.maxtecno-home-carousel.innovative-gamer-carousel {
		--mhc-slide-w: calc(100% / var(--mhc-mobile));
	}
}

.maxtecno-home-carousel *,
.maxtecno-home-carousel *::before,
.maxtecno-home-carousel *::after {
	box-sizing: border-box;
}

/* Clip solo horizontal: padding vertical deja respirar sombras/glow */
.maxtecno-home-carousel .swiper.maxtecno-product-swiper {
	width: 100%;
	padding: var(--mhc-shadow-pad) 2px calc(var(--mhc-shadow-pad) + 48px) !important;
	margin: 0 !important;
	overflow: hidden !important;
}

.maxtecno-home-carousel .swiper-wrapper {
	align-items: stretch !important;
}

.maxtecno-home-carousel .swiper-slide {
	height: auto !important;
	display: flex !important;
	perspective: 1000px;
	overflow: visible;
}

/*
 * Anti-FOUC: Swiper pone width:100% hasta init → 1ª card gigante.
 * 1) Reservamos ancho YA. 2) Invisible hasta .is-ready (JS) / .swiper-initialized.
 */
.maxtecno-home-carousel:not(.is-ready) {
	opacity: 0;
	visibility: hidden;
	/* reserva alto aproximado para no saltar el layout de la página */
	min-height: 420px;
}

.maxtecno-home-carousel.is-ready {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.18s ease;
}

.maxtecno-home-carousel .maxtecno-product-swiper:not(.swiper-initialized) .swiper-wrapper {
	display: flex !important;
	flex-wrap: nowrap !important;
}

.maxtecno-home-carousel .maxtecno-product-swiper:not(.swiper-initialized) .swiper-slide {
	width: var(--mhc-slide-w) !important;
	max-width: var(--mhc-slide-w) !important;
	flex: 0 0 var(--mhc-slide-w) !important;
	box-sizing: border-box !important;
}

/* Si JS falla: mostrar igual a los 2.5s (no dejar vacío eterno) */
@keyframes mhc-reveal-fallback {
	to {
		opacity: 1;
		visibility: visible;
	}
}
.maxtecno-home-carousel:not(.is-ready) {
	animation: mhc-reveal-fallback 0s 2.5s forwards;
}

.maxtecno-home-carousel .swiper-slide > .category-card,
.maxtecno-home-carousel .swiper-slide > .product-card {
	width: 100%;
	height: 100%;
	min-height: 0;
}

/* ========== Category 3D ========== */
.maxtecno-home-carousel .category-card {
	background-color: var(--brand-dark) !important;
	background-image: linear-gradient(135deg, rgba(92, 24, 207, 0.45) 0%, rgba(37, 20, 69, 0.85) 100%) !important;
	background-size: cover !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	border-radius: 24px !important;
	padding: 40px 20px !important;
	display: flex !important;
	flex-direction: column !important;
	justify-content: center !important;
	align-items: center !important;
	text-align: center !important;
	color: var(--text-light) !important;
	box-shadow:
		0 18px 40px rgba(92, 24, 207, 0.45),
		0 0 0 2px var(--brand-neon),
		0 0 24px rgba(213, 255, 0, 0.3) !important;
	position: relative !important;
	border: 2px solid var(--brand-neon) !important;
	transform-style: preserve-3d;
	transition: transform 0.35s ease, box-shadow 0.35s ease;
	overflow: hidden;
	will-change: transform;
	z-index: 2;
}

.maxtecno-home-carousel .category-card:hover {
	transform: translateY(-4px) scale(1.015);
	box-shadow:
		0 24px 50px rgba(92, 24, 207, 0.55),
		0 0 0 2px var(--brand-neon),
		0 0 32px rgba(213, 255, 0, 0.45) !important;
	z-index: 4;
}

.maxtecno-home-carousel .category-card::before {
	content: "";
	position: absolute;
	inset: -2px;
	border-radius: 26px;
	background: linear-gradient(135deg, rgba(213, 255, 0, 0.35), transparent 40%, rgba(92, 24, 207, 0.4));
	opacity: 0.7;
	z-index: 0;
	pointer-events: none;
	filter: blur(8px);
}

.maxtecno-home-carousel .category-card::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 22px;
	box-shadow: inset 0 0 36px rgba(213, 255, 0, 0.35);
	pointer-events: none;
	z-index: 1;
}

.maxtecno-home-carousel .category-card > * {
	position: relative;
	z-index: 2;
}

.maxtecno-home-carousel .category-card h2,
.maxtecno-home-carousel .category-card .category-card__title {
	font-size: clamp(1.6rem, 2.4vw, 2.35rem) !important;
	font-weight: 900 !important;
	margin: 0 0 10px !important;
	padding: 0 !important;
	text-transform: uppercase !important;
	line-height: 1.1 !important;
	letter-spacing: 0.02em;
	text-shadow: 0 0 18px rgba(213, 255, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.45) !important;
	transform: translateZ(40px);
	color: #ffffff !important;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
}

.maxtecno-home-carousel .category-card p,
.maxtecno-home-carousel .category-card .category-card__subtitle {
	font-size: 1rem !important;
	font-weight: 600 !important;
	margin: 0 0 26px !important;
	padding: 0 !important;
	color: #e0d4ff !important;
	background: none !important;
	transform: translateZ(20px);
	text-shadow: 1px 1px 4px rgba(37, 20, 69, 0.85);
}

.maxtecno-home-carousel a.btn-neon-outline,
.maxtecno-home-carousel .btn-neon-outline {
	border: 2px solid var(--brand-neon) !important;
	color: var(--brand-dark) !important;
	background: var(--brand-neon) !important;
	background-image: none !important;
	padding: 12px 32px !important;
	border-radius: 50px !important;
	font-weight: 900 !important;
	font-size: 0.95rem !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	letter-spacing: 0.04em;
	transition: all 0.3s ease !important;
	transform: translateZ(30px);
	box-shadow: 0 0 22px rgba(213, 255, 0, 0.5) !important;
	display: inline-block !important;
	line-height: 1.2 !important;
}

.maxtecno-home-carousel a.btn-neon-outline:hover,
.maxtecno-home-carousel .btn-neon-outline:hover {
	background: #ffffff !important;
	color: var(--brand-dark) !important;
	border-color: #ffffff !important;
	box-shadow: 0 0 32px rgba(255, 255, 255, 0.85) !important;
}

/* ========== Product cards ========== */
.maxtecno-home-carousel .product-card {
	background: #ffffff !important;
	backdrop-filter: blur(10px);
	border-radius: 24px !important;
	display: flex !important;
	flex-direction: column !important;
	box-shadow: 0 14px 36px rgba(37, 20, 69, 0.14) !important;
	border: 1px solid rgba(92, 24, 207, 0.12) !important;
	position: relative;
	transform-style: preserve-3d;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	will-change: transform;
	z-index: 1;
}

.maxtecno-home-carousel .product-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 44px rgba(92, 24, 207, 0.24) !important;
	z-index: 3;
}

.maxtecno-home-carousel .product-card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 24px;
	background: rgba(213, 255, 0, 0.05);
	border: 1px solid rgba(213, 255, 0, 0.45);
	box-shadow: inset 0 0 22px rgba(213, 255, 0, 0.12);
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
	z-index: 5;
}

.maxtecno-home-carousel .product-card:hover::before {
	opacity: 1;
}

.maxtecno-home-carousel .badge-stock {
	position: absolute !important;
	top: 14px !important;
	left: 14px !important;
	background: var(--brand-dark) !important;
	padding: 5px 12px !important;
	border-radius: 50px !important;
	font-size: 0.7rem !important;
	font-weight: 800 !important;
	color: var(--brand-neon) !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
	z-index: 10 !important;
	transform: translateZ(30px);
	border: 1px solid var(--brand-purple) !important;
	line-height: 1.2 !important;
}

.maxtecno-home-carousel .badge-stock .dot {
	width: 6px;
	height: 6px;
	background-color: var(--brand-neon);
	border-radius: 50%;
	box-shadow: 0 0 10px var(--brand-neon);
	animation: maxtecno-mhc-pulse 1.5s infinite;
	flex-shrink: 0;
}

@keyframes maxtecno-mhc-pulse {
	0%,
	100% {
		opacity: 1;
		box-shadow: 0 0 10px var(--brand-neon);
	}
	50% {
		opacity: 0.4;
		box-shadow: 0 0 2px var(--brand-neon);
	}
}

.maxtecno-home-carousel a.card-img-wrapper,
.maxtecno-home-carousel .card-img-wrapper {
	padding: 6px 8px 0 !important;
	width: 100% !important;
	height: auto !important;
	max-height: none !important;
	aspect-ratio: 1 / 1 !important;
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	border-radius: 20px 20px 0 0 !important;
	overflow: hidden !important;
	background: #fff !important;
	flex-shrink: 0;
	margin: 0 auto;
}

.maxtecno-home-carousel .card-img-wrapper img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	object-fit: contain !important;
	object-position: center !important;
	aspect-ratio: 1 / 1;
	display: block !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.maxtecno-home-carousel .card-info {
	padding: 2px 10px 2px !important;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 0;
	transform: translateZ(20px);
	background: transparent !important;
}

.maxtecno-home-carousel .product-sku {
	font-size: 0.55rem !important;
	color: #666 !important;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1.1 !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em;
}

.maxtecno-home-carousel .product-title,
.maxtecno-home-carousel h3.product-title {
	font-size: 0.78rem !important;
	font-weight: 900 !important;
	color: var(--text-dark) !important;
	margin: 2px 0 0 !important;
	line-height: 1.2 !important;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-transform: uppercase !important;
	background: none !important;
	min-height: 0;
}

.maxtecno-home-carousel .product-title a {
	color: inherit !important;
	text-decoration: none !important;
	box-shadow: none !important;
	background: none !important;
}

.maxtecno-home-carousel .card-pricing-box {
	background: linear-gradient(180deg, #1c0e35 0%, var(--brand-dark) 100%) !important;
	margin: 0 8px 8px !important;
	padding: 8px 10px !important;
	border-radius: 14px !important;
	color: var(--text-light) !important;
	display: flex !important;
	flex-direction: column !important;
	position: relative;
	transform: translateZ(30px);
	border-top: 2px solid var(--brand-purple) !important;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28) !important;
	z-index: 10;
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.maxtecno-home-carousel .card-pricing-box:hover {
	background: #ffffff !important;
	color: var(--brand-dark) !important;
	border-top-color: var(--brand-neon) !important;
}

.maxtecno-home-carousel .card-pricing-box:hover .price-new {
	color: var(--brand-dark) !important;
}

.maxtecno-home-carousel .card-pricing-box:hover .price-old {
	color: #666666 !important;
}

.maxtecno-home-carousel .card-pricing-box:hover .price-label {
	background: var(--brand-dark) !important;
	color: var(--brand-neon) !important;
}

.maxtecno-home-carousel .card-pricing-box:hover .btn-comprar {
	background: var(--brand-dark) !important;
	color: var(--brand-neon) !important;
}

.maxtecno-home-carousel .price-label {
	background: var(--brand-neon) !important;
	color: var(--brand-dark) !important;
	display: inline-block !important;
	padding: 2px 8px !important;
	border-radius: 50px !important;
	font-size: 0.5rem !important;
	font-weight: 900 !important;
	margin-bottom: 4px !important;
	align-self: flex-start;
	box-shadow: 0 0 8px rgba(213, 255, 0, 0.3);
	letter-spacing: 0.01em;
	line-height: 1.2 !important;
}

.maxtecno-home-carousel .price-old {
	font-size: 0.7rem !important;
	color: #8a859e !important;
	text-decoration: line-through !important;
	font-weight: 600 !important;
	margin: 0 !important;
	line-height: 1.2 !important;
}

.maxtecno-home-carousel .price-new {
	font-size: 1.15rem !important;
	font-weight: 900 !important;
	color: var(--text-light) !important;
	margin: 0 0 6px !important;
	line-height: 1.1 !important;
}

.maxtecno-home-carousel a.btn-comprar,
.maxtecno-home-carousel .btn-comprar {
	background: var(--brand-purple) !important;
	background-image: none !important;
	color: #ffffff !important;
	text-align: center !important;
	text-decoration: none !important;
	padding: 8px !important;
	border-radius: 10px !important;
	font-weight: 900 !important;
	font-size: 0.75rem !important;
	text-transform: uppercase !important;
	position: relative;
	overflow: hidden;
	border: 0 !important;
	box-shadow: none !important;
	line-height: 1.2 !important;
	display: block !important;
	width: 100% !important;
}

/* Densidad per_view 4 y 5: foto grande cuadrada, título completo, SKU pegado */
.maxtecno-home-carousel[data-per-view="4"] .card-img-wrapper,
.maxtecno-home-carousel[data-per-view="4.0"] .card-img-wrapper,
.maxtecno-home-carousel[data-per-view="5"] .card-img-wrapper,
.maxtecno-home-carousel[data-per-view="5.0"] .card-img-wrapper {
	max-height: none !important;
	padding: 4px 6px 0 !important;
	aspect-ratio: 1 / 1 !important;
}

.maxtecno-home-carousel[data-per-view="4"] .card-info,
.maxtecno-home-carousel[data-per-view="4.0"] .card-info,
.maxtecno-home-carousel[data-per-view="5"] .card-info,
.maxtecno-home-carousel[data-per-view="5.0"] .card-info {
	padding: 1px 8px 2px !important;
}

.maxtecno-home-carousel[data-per-view="4"] .product-sku,
.maxtecno-home-carousel[data-per-view="4.0"] .product-sku,
.maxtecno-home-carousel[data-per-view="5"] .product-sku,
.maxtecno-home-carousel[data-per-view="5.0"] .product-sku {
	font-size: 0.5rem !important;
	margin: 0 !important;
	line-height: 1.05 !important;
}

.maxtecno-home-carousel[data-per-view="4"] .product-title,
.maxtecno-home-carousel[data-per-view="4.0"] .product-title {
	font-size: 0.8rem !important;
	-webkit-line-clamp: 4;
	margin-top: 1px !important;
}

.maxtecno-home-carousel[data-per-view="5"] .product-title,
.maxtecno-home-carousel[data-per-view="5.0"] .product-title {
	font-size: 0.72rem !important;
	-webkit-line-clamp: 4;
	margin-top: 1px !important;
}

.maxtecno-home-carousel[data-per-view="5"] .card-pricing-box,
.maxtecno-home-carousel[data-per-view="5.0"] .card-pricing-box {
	margin: 0 5px 5px !important;
	padding: 6px 8px !important;
	border-radius: 12px !important;
}

.maxtecno-home-carousel[data-per-view="5"] .price-label,
.maxtecno-home-carousel[data-per-view="5.0"] .price-label {
	font-size: 0.42rem !important;
	padding: 1px 6px !important;
	margin-bottom: 2px !important;
}

.maxtecno-home-carousel[data-per-view="5"] .price-old,
.maxtecno-home-carousel[data-per-view="5.0"] .price-old {
	font-size: 0.62rem !important;
}

.maxtecno-home-carousel[data-per-view="5"] .price-new,
.maxtecno-home-carousel[data-per-view="5.0"] .price-new {
	font-size: 1.05rem !important;
	margin-bottom: 5px !important;
}

.maxtecno-home-carousel[data-per-view="5"] .btn-comprar,
.maxtecno-home-carousel[data-per-view="5.0"] .btn-comprar {
	padding: 7px !important;
	font-size: 0.68rem !important;
	border-radius: 8px !important;
}

.maxtecno-home-carousel[data-per-view="5"] .category-card,
.maxtecno-home-carousel[data-per-view="5.0"] .category-card {
	padding: 20px 12px !important;
}

.maxtecno-home-carousel[data-per-view="5"] .category-card h2,
.maxtecno-home-carousel[data-per-view="5.0"] .category-card h2 {
	font-size: 1.35rem !important;
}

.maxtecno-home-carousel .btn-comprar::after {
	content: "";
	position: absolute;
	top: -50%;
	left: -60%;
	width: 20%;
	height: 200%;
	background: rgba(255, 255, 255, 0.3);
	transform: rotate(45deg);
	transition: all 0.5s ease;
}

.maxtecno-home-carousel .card-pricing-box:hover .btn-comprar::after {
	left: 150%;
}

/* ========== Nav / dots ========== */
.maxtecno-home-carousel .swiper-button-next,
.maxtecno-home-carousel .swiper-button-prev {
	color: var(--brand-neon) !important;
	background: var(--brand-dark) !important;
	width: 48px !important;
	height: 48px !important;
	margin-top: 0 !important;
	top: 42% !important;
	border-radius: 50% !important;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4), 0 0 12px var(--brand-purple) !important;
	border: 2px solid var(--brand-neon) !important;
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
	z-index: 40 !important;
}

.maxtecno-home-carousel .swiper-button-next:hover,
.maxtecno-home-carousel .swiper-button-prev:hover {
	transform: scale(1.1);
	background: var(--brand-purple) !important;
	box-shadow: 0 0 22px var(--brand-neon) !important;
}

.maxtecno-home-carousel .swiper-button-next:after,
.maxtecno-home-carousel .swiper-button-prev:after {
	font-size: 1.25rem !important;
	font-weight: 900 !important;
	color: var(--brand-neon) !important;
}

.maxtecno-home-carousel > .swiper-button-prev,
.maxtecno-home-carousel .swiper-button-prev {
	left: 4px !important;
}

.maxtecno-home-carousel > .swiper-button-next,
.maxtecno-home-carousel .swiper-button-next {
	right: 4px !important;
}

.maxtecno-home-carousel .swiper-pagination {
	position: relative !important;
	margin-top: 12px !important;
	bottom: auto !important;
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	gap: 12px !important;
	width: 100% !important;
}

.maxtecno-home-carousel .swiper-pagination-bullet {
	width: 16px !important;
	height: 16px !important;
	background-color: #ffffff !important;
	border: 3px solid var(--brand-purple) !important;
	opacity: 1 !important;
	border-radius: 50% !important;
	margin: 0 !important;
	transition: all 0.35s ease !important;
	box-sizing: border-box !important;
}

.maxtecno-home-carousel .swiper-pagination-bullet-active {
	width: 42px !important;
	height: 16px !important;
	background-color: var(--brand-neon) !important;
	border-color: var(--brand-neon) !important;
	border-radius: 20px !important;
}

@media (max-width: 767px) {
	.maxtecno-home-carousel.innovative-gamer-carousel {
		--mhc-arrow-space: 40px;
		--mhc-shadow-pad: 24px;
		padding: 8px var(--mhc-arrow-space) 8px !important;
	}

	.maxtecno-home-carousel .swiper-slide > .category-card,
	.maxtecno-home-carousel .swiper-slide > .product-card {
		min-height: 0;
	}

	.maxtecno-home-carousel .category-card {
		padding: 28px 14px !important;
	}

	.maxtecno-home-carousel .category-card h2 {
		font-size: 1.45rem !important;
	}

	.maxtecno-home-carousel .card-img-wrapper {
		padding: 4px 6px 0 !important;
		aspect-ratio: 1 / 1 !important;
		height: auto !important;
		max-height: none !important;
	}

	.maxtecno-home-carousel .product-title {
		font-size: 0.7rem !important;
		-webkit-line-clamp: 4;
	}

	.maxtecno-home-carousel .price-new {
		font-size: 1.15rem !important;
	}

	.maxtecno-home-carousel .swiper-button-next,
	.maxtecno-home-carousel .swiper-button-prev {
		width: 34px !important;
		height: 34px !important;
	}

	.maxtecno-home-carousel .swiper-button-next:after,
	.maxtecno-home-carousel .swiper-button-prev:after {
		font-size: 0.95rem !important;
	}
}

