/* Top Categories – front end */
.tc-row {
	--tc-gap: 14px;
	--tc-radius: 22px;
	display: grid;
	grid-template-columns: repeat(var(--tc-cols, 5), minmax(0, 1fr));
	gap: var(--tc-gap);
	margin: 0 0 2rem;
	box-sizing: border-box;
}
.tc-row *, .tc-row *::before, .tc-row *::after { box-sizing: border-box; }

.tc-card {
	--tc-bg: #FDDF82;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-height: 150px;
	padding: 18px 18px 20px;
	border-radius: var(--tc-radius);
	background: var(--tc-bg);
	color: #16161a !important;
	text-decoration: none !important;
	box-shadow: none !important;
	overflow: hidden;
	isolation: isolate;
	transition: transform .18s ease;
}
.tc-card:hover {
	transform: translateY(-2px);
	box-shadow: none !important;
}
.tc-card:focus-visible { outline: 2px solid #16161a; outline-offset: 3px; }

.tc-name {
	position: relative;
	z-index: 1;
	font-size: clamp(18px, 1.6vw, 22px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.02em;
	overflow-wrap: break-word;
}
.tc-count {
	position: relative;
	z-index: 1;
	font-size: 13px;
	font-weight: 700;
	opacity: .85;
}
.tc-arrow { display: inline-block; transition: transform .18s ease; }
.tc-card:hover .tc-arrow { transform: translateX(3px); }

/* Corner image: tilted, partly tucked off the bottom-right edge */
.tc-image {
	position: absolute;
	right: -8px;
	bottom: -10px;
	width: 38%;
	max-width: 96px;
	aspect-ratio: 1 / 1;
	border-radius: 12px;
	overflow: hidden;
	transform: rotate(-9deg);
	box-shadow: none !important;
	z-index: 0;
	transition: transform .25s ease;
}
.tc-card:hover .tc-image { transform: rotate(-4deg) scale(1.04); }
.tc-image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	margin: 0 !important;
}

/* Tablet: swipeable row */
@media (max-width: 900px) {
	.tc-row {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 4px;
	}
	.tc-row::-webkit-scrollbar { display: none; }
	.tc-card {
		flex: 0 0 30%;
		scroll-snap-align: start;
		min-height: 136px;
	}
}
/* Phone: compact cards, about 2½ visible so the row feels swipeable */
@media (max-width: 600px) {
	.tc-row { --tc-gap: 10px; --tc-radius: 18px; }
	.tc-card {
		flex-basis: 40%;
		padding: 14px 14px 16px;
		gap: 6px;
		min-height: 120px;
	}
	.tc-name { font-size: 19px; line-height: 1.1; }
	.tc-count { font-size: 11px; }
	.tc-image {
		width: 52%;
		max-width: 76px;
		right: -6px;
		bottom: -8px;
		border-radius: 10px;
	}
}
