/* ════════════════════════════════════════════════════
   CARRUSEL DE SUBCATEGORÍAS (arriba del loop de productos)
   Ver fitness-pro-category-carousel.php - solo aparece si la
   categoría actual tiene hijas (hoy: Línea Residencial).
════════════════════════════════════════════════════ */

.fp-cat-carousel {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 32px;
}

.fp-cat-carousel-track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	flex: 1 1 auto;
	padding: 4px 2px 12px;
	/* Oculta la barra de scroll nativa - el swipe sigue funcionando,
	   la navegación visible queda a cargo de las flechas/gesto táctil. */
	scrollbar-width: none;
}

.fp-cat-carousel-track::-webkit-scrollbar {
	display: none;
}

/* 8 visibles en escritorio: ancho = (100% - 7 gaps) / 8. */
.fp-cat-carousel-item {
	flex: 0 0 calc((100% - 7 * 16px) / 8);
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	text-decoration: none;
	gap: 10px;
}

.fp-cat-carousel-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 104px;
	border-radius: 50%;
	background: #f4f4f2;
	border: 1px solid #e4e4e1;
	overflow: hidden;
	flex-shrink: 0;
	transition: border-color .15s ease, transform .15s ease;
}

.fp-cat-carousel-item:hover .fp-cat-carousel-icon {
	border-color: var(--theme-palette-color-1, #FA0000);
	transform: translateY(-2px);
}

.fp-cat-carousel-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fp-cat-carousel-icon-fallback {
	font-family: 'Fjalla One', sans-serif;
	font-size: 28px;
	color: var(--theme-palette-color-1, #FA0000);
}

.fp-cat-carousel-name {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #1a1a1a;
	line-height: 1.3;
}

/* Ocultas por defecto - fitness-pro-category-carousel/category-carousel.js
   les agrega .fp-cat-carousel--scrollable al contenedor solo cuando el
   contenido realmente desborda el ancho visible (si entran las 8/3
   categorías sin necesidad de deslizar, no tiene sentido mostrarlas). */
.fp-cat-carousel-arrow {
	display: none;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #e4e4e1;
	background: #fff;
	color: #1a1a1a;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease;
}

.fp-cat-carousel--scrollable .fp-cat-carousel-arrow {
	display: flex;
}

.fp-cat-carousel-arrow:hover {
	border-color: var(--theme-palette-color-1, #FA0000);
	color: var(--theme-palette-color-1, #FA0000);
}

/* ── RESPONSIVE ──
   3 visibles en mobile: ancho = (100% - 2 gaps) / 3. Las flechas se
   ocultan - el carrusel se desliza con el dedo directamente
   (overflow-x + scroll-snap ya lo permiten sin JS). */
@media (max-width: 768px) {
	.fp-cat-carousel-item {
		flex: 0 0 calc((100% - 2 * 16px) / 3);
	}

	.fp-cat-carousel-icon {
		width: 64px;
		height: 64px;
	}

	.fp-cat-carousel-name {
		font-size: 11px;
	}

	.fp-cat-carousel-arrow {
		display: none !important;
	}
}
