/*!
 * Hostnauta Category Carousel
 * Version: 1.0.0
 * License: GPL-2.0+
 */

.hcc-wrapper {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.hcc-wrapper *,
.hcc-wrapper *::before,
.hcc-wrapper *::after {
	box-sizing: border-box;
}

.hcc-swiper {
	width: 100%;
	overflow: hidden;
}

.hcc-slide {
	height: auto;
	display: flex;
}

/* ITEM (tarjeta) */
.hcc-item {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 72px;
	padding: 18px 24px 18px 20px;
	background-color: #ffffff;
	border: 1px solid #ececec;
	border-radius: 12px;
	text-decoration: none !important;
	color: inherit;
	transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, border-color .25s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
	cursor: pointer;
}

.hcc-item:hover,
.hcc-item:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
	outline: none;
}

.hcc-item:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ÍCONO */
.hcc-item__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	margin-right: 14px;
	line-height: 1;
}

.hcc-item__icon svg,
.hcc-item__icon i {
	width: 36px;
	height: 36px;
	font-size: 36px;
	display: inline-block;
	color: #1f1f1f;
	transition: color .25s ease, fill .25s ease;
}

.hcc-item__icon img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	display: block;
	background: #f6f7f9;
}

/* Formas de imagen — aplicadas a la imagen, no al ícono */
.hcc-shape-rounded .hcc-item__icon img { border-radius: 8px; }
.hcc-shape-circle  .hcc-item__icon img { border-radius: 50%; }
.hcc-shape-square  .hcc-item__icon img { border-radius: 0; }

/* Cuando el item proviene de WooCommerce, hacemos la imagen un poco más grande */
.hcc-source-woocommerce .hcc-item__icon img {
	width: 48px;
	height: 48px;
}

/* TEXTO */
.hcc-item__body {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 auto;
}

.hcc-item__label {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	color: #1f1f1f;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color .25s ease;
}

.hcc-item__count {
	font-size: 12px;
	line-height: 1.3;
	margin-top: 2px;
	color: #6c757d;
	opacity: .9;
}

/* NAVEGACIÓN */
.hcc-nav {
	position: absolute;
	top: 50%;
	width: 42px;
	height: 42px;
	transform: translateY(-50%);
	background: #ffffff;
	border: 1px solid #ececec;
	border-radius: 50%;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	z-index: 10;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
	transition: background-color .2s ease, transform .2s ease, opacity .2s ease;
}

.hcc-nav:hover {
	background-color: #f5f5f5;
}

.hcc-nav:focus-visible {
	outline: 2px solid #1f1f1f;
	outline-offset: 2px;
}

.hcc-nav svg {
	width: 50%;
	height: 50%;
	fill: #1f1f1f;
	pointer-events: none;
}

.hcc-nav--prev {
	left: -8px;
}

.hcc-nav--next {
	right: -8px;
}

.hcc-nav.swiper-button-disabled {
	opacity: 0;
	pointer-events: none;
}

/* PAGINACIÓN */
.hcc-pagination {
	position: relative;
	margin-top: 16px;
	text-align: center;
}

.hcc-pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background: #c0c0c0;
	opacity: 1;
	margin: 0 4px;
	transition: background-color .2s ease, transform .2s ease;
}

.hcc-pagination .swiper-pagination-bullet-active {
	background: #1f1f1f;
	transform: scale(1.2);
}

/* RTL */
.hcc-wrapper[dir="rtl"] .hcc-item__icon {
	margin-right: 0;
	margin-left: 14px;
}

.hcc-wrapper[dir="rtl"] .hcc-nav--prev {
	left: auto;
	right: -8px;
}

.hcc-wrapper[dir="rtl"] .hcc-nav--next {
	right: auto;
	left: -8px;
}

/* AVISO VACÍO (edit-mode) */
.hcc-empty {
	padding: 24px;
	text-align: center;
	background: #fafafa;
	border: 1px dashed #d0d0d0;
	border-radius: 12px;
	color: #6c757d;
	font-size: 14px;
}

/* RESPONSIVE: ajustes finos */
@media (max-width: 767px) {
	.hcc-item {
		min-height: 64px;
		padding: 14px 16px;
	}

	.hcc-item__icon svg,
	.hcc-item__icon i,
	.hcc-item__icon img {
		width: 28px;
		height: 28px;
		font-size: 28px;
	}

	.hcc-item__label {
		font-size: 13px;
	}

	.hcc-nav {
		width: 36px;
		height: 36px;
	}

	.hcc-nav--prev { left: 4px; }
	.hcc-nav--next { right: 4px; }
}

/* Accesibilidad: prefer-reduced-motion */
@media (prefers-reduced-motion: reduce) {
	.hcc-item,
	.hcc-item__label,
	.hcc-item__icon svg,
	.hcc-item__icon i,
	.hcc-nav,
	.hcc-pagination .swiper-pagination-bullet {
		transition: none !important;
	}
}
