/* Esports Elit - Pestanyes de categoria (front)
 * Colors i mides es poden canviar amb variables CSS des del tema:
 * .ee-ct { --ee-accent: #029aff; }
 */
.ee-ct {
	--ee-accent: #029aff;
	--ee-accent-text: #fff;
	--ee-pill-bg: #efefef;
	--ee-pill-text: #333;
	--ee-card-bg: #fff;
	--ee-card-border: #ececec;
	--ee-media-bg: #f3f3f3;
	--ee-muted: #8a8a8a;
	--ee-gap: 20px;
	--ee-radius: 12px;
	margin: 0 auto;
}

/* Pestanyes: una sola fila; al mòbil es desplacen horitzontalment. */
.ee-ct__tabs {
	display: flex;
	justify-content: flex-start;
	gap: 8px;
	margin: 0 0 24px;
	padding: 2px 2px 6px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.ee-ct__tabs::-webkit-scrollbar { display: none; }
/* Centrat sense retallar la primera pestanya quan no hi caben totes. */
.ee-ct__tab:first-child { margin-left: auto; }
.ee-ct__tab:last-child { margin-right: auto; }

.ee-ct__tab {
	flex: 0 0 auto;
	scroll-snap-align: start;
	appearance: none;
	border: 0;
	border-radius: 999px;
	background: var(--ee-pill-bg);
	color: var(--ee-pill-text);
	font: inherit;
	font-size: 15px;
	line-height: 1.2;
	padding: 10px 20px;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color .15s ease, color .15s ease;
}
.ee-ct__tab:hover { background: #e2e2e2; }
.ee-ct__tab.is-active,
.ee-ct__tab[aria-selected="true"] {
	background: var(--ee-accent);
	color: var(--ee-accent-text);
}
.ee-ct__tab:focus-visible {
	outline: 2px solid var(--ee-accent);
	outline-offset: 2px;
}

/* Graella */
.ee-ct__grid {
	display: grid;
	grid-template-columns: repeat(var(--ee-cols, 4), minmax(0, 1fr));
	gap: var(--ee-gap);
	list-style: none;
	margin: 0;
	padding: 0;
}
.ee-ct__grid.products::before,
.ee-ct__grid.products::after { display: none; }
.ee-ct__grid.products > li { width: auto !important; margin: 0 !important; float: none !important; }

@media (max-width: 1024px) {
	.ee-ct__grid { grid-template-columns: repeat(var(--ee-cols-t, 3), minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.ee-ct { --ee-gap: 12px; }
	.ee-ct__grid { grid-template-columns: repeat(var(--ee-cols-m, 2), minmax(0, 1fr)); }
	.ee-ct__tabs { margin-bottom: 16px; }
	.ee-ct__tab { font-size: 14px; padding: 9px 16px; }
}

/* Targeta */
.ee-ct-card { margin: 0; }
.ee-ct-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--ee-card-bg);
	border: 1px solid var(--ee-card-border);
	border-radius: var(--ee-radius);
	padding: 14px;
	color: inherit;
	text-decoration: none !important;
	transition: box-shadow .2s ease, transform .2s ease;
}
.ee-ct-card__link:hover {
	box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
	transform: translateY(-2px);
}
.ee-ct-card__media {
	display: block;
	aspect-ratio: 1 / 1;
	background: var(--ee-media-bg);
	border-radius: calc(var(--ee-radius) - 4px);
	overflow: hidden;
}
.ee-ct-card__media img,
.ee-ct-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.ee-ct-card__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-top: 12px;
}
.ee-ct-card__cat {
	font-size: 12px;
	color: var(--ee-muted);
}
.ee-ct-card__title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}
.ee-ct-card__price {
	font-size: 15px;
	font-weight: 700;
}
.ee-ct-card__price del { color: var(--ee-muted); font-weight: 400; margin-right: 4px; }
.ee-ct-card__price ins { text-decoration: none; }

@media (max-width: 767px) {
	.ee-ct-card__link { padding: 8px; }
	.ee-ct-card__title { font-size: 14px; }
	.ee-ct-card__price { font-size: 14px; }
}

/* Estats */
.ee-ct__panel { position: relative; min-height: 120px; }
.ee-ct__panel.is-loading .ee-ct__grid:empty { min-height: 300px; }
.ee-ct__panel.is-loading::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 80px;
	width: 32px;
	height: 32px;
	margin-left: -16px;
	border: 3px solid var(--ee-pill-bg);
	border-top-color: var(--ee-accent);
	border-radius: 50%;
	animation: ee-ct-spin .8s linear infinite;
}
@keyframes ee-ct-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.ee-ct__panel.is-loading::after { animation-duration: 2s; }
	.ee-ct-card__link { transition: none; }
}

.ee-ct__more-wrap { text-align: center; margin-top: 24px; }
.ee-ct__more {
	appearance: none;
	border: 1px solid var(--ee-accent);
	background: transparent;
	color: var(--ee-accent);
	border-radius: 999px;
	padding: 10px 28px;
	font: inherit;
	cursor: pointer;
}
.ee-ct__more:hover { background: var(--ee-accent); color: var(--ee-accent-text); }
.ee-ct__more[disabled] { opacity: .6; cursor: wait; }
.ee-ct__more[hidden] { display: none; }

.ee-ct__empty,
.ee-ct__error { text-align: center; color: var(--ee-muted); margin: 24px 0; }
.ee-ct__retry {
	appearance: none;
	border: 0;
	background: none;
	color: var(--ee-accent);
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}
