/* =========================================================================
 * [tamborim_categorias] – Principais categorias animadas
 * ====================================================================== */
@property --tbc-ang {
	syntax: "<angle>";
	initial-value: 0deg;
	inherits: false;
}

.tbc {
	--gold: #f1ca00;
	--gold-2: #ffe27a;
	position: relative;
	overflow: hidden;
	isolation: isolate;
	padding: 104px 0 88px;
	background: #0e0e0e;
	color: #fff;
	font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	clear: both;
}

/* Manchas de luz dourada que flutuam ao fundo */
.tbc__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.tbc__bg span {
	position: absolute;
	width: 46vw;
	height: 46vw;
	max-width: 640px;
	max-height: 640px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(241, 202, 0, .16) 0%, rgba(241, 202, 0, 0) 65%);
	filter: blur(10px);
	animation: tbc-drift 22s ease-in-out infinite alternate;
}
.tbc__bg span:nth-child(1) { top: -18%; left: -12%; }
.tbc__bg span:nth-child(2) { bottom: -30%; right: -10%; animation-duration: 28s; animation-delay: -6s; }
.tbc__bg span:nth-child(3) { top: 30%; left: 40%; width: 30vw; height: 30vw; opacity: .6; animation-duration: 34s; animation-delay: -12s; }
.tbc::after {
	/* textura sutil de linhas (cordas) */
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: repeating-linear-gradient(100deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 90px);
	mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
	-webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}
@keyframes tbc-drift {
	0% { transform: translate(0, 0) scale(1); }
	50% { transform: translate(6vw, 4vw) scale(1.15); }
	100% { transform: translate(-4vw, 8vw) scale(.95); }
}

.tbc__inner { max-width: 1220px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }

/* Cabeçalho */
.tbc__head { text-align: center; margin: 0 auto 52px; max-width: 720px; }
.tbc__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--gold);
}
.tbc__eyebrow::before,
.tbc__eyebrow::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }
.tbc__title {
	margin: 14px 0 14px !important;
	font-size: 52px !important;
	line-height: 1.05 !important;
	font-weight: 800 !important;
	letter-spacing: -.02em;
	color: #fff !important;
	background: linear-gradient(100deg, #fff 0%, #fff 38%, var(--gold-2) 48%, var(--gold) 52%, #fff 62%, #fff 100%);
	background-size: 250% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: tbc-shine 6s ease-in-out infinite;
}
@keyframes tbc-shine {
	0%, 20% { background-position: 100% 0; }
	60%, 100% { background-position: 0 0; }
}
.tbc__sub { margin: 0 !important; color: #b5b5b5; font-size: 18px; line-height: 1.6; }

/* Grade em mosaico */
.tbc__grid {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	display: grid;
	grid-template-columns: 1.3fr 1fr 1fr;
	grid-auto-rows: 270px;
	gap: 20px;
}
.tbc-card-wrap { margin: 0 !important; padding: 0 !important; list-style: none !important; perspective: 1000px; }
.tbc-card-wrap:first-child { grid-row: span 2; }

.tbc-card {
	--rx: 0deg;
	--ry: 0deg;
	--mx: 50%;
	--my: 50%;
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 28px;
	border-radius: 20px;
	background: linear-gradient(155deg, #1d1d1d 0%, #131313 70%);
	border: 1px solid rgba(255, 255, 255, .07);
	color: #fff !important;
	text-decoration: none !important;
	overflow: hidden;
	box-sizing: border-box;
	transform: rotateX(var(--rx)) rotateY(var(--ry));
	transform-style: preserve-3d;
	transition: transform .25s ease-out, border-color .3s, box-shadow .3s;
	will-change: transform;
}
.tbc-card:hover {
	border-color: rgba(241, 202, 0, .35);
	box-shadow: 0 24px 60px -18px rgba(241, 202, 0, .28), 0 18px 40px rgba(0, 0, 0, .45);
}

/* Luz que segue o mouse */
.tbc-card__glow {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: radial-gradient(420px circle at var(--mx) var(--my), rgba(241, 202, 0, .16), transparent 45%);
	opacity: 0;
	transition: opacity .35s;
	pointer-events: none;
}
.tbc-card:hover .tbc-card__glow { opacity: 1; }

/* Borda dourada girando */
.tbc-card::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	padding: 1.5px;
	border-radius: inherit;
	background: conic-gradient(from var(--tbc-ang), transparent 0 70%, var(--gold) 80%, var(--gold-2) 85%, transparent 92%);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
	opacity: 0;
	transition: opacity .4s;
	animation: tbc-spin 3.2s linear infinite;
	pointer-events: none;
}
.tbc-card:hover::before,
.tbc-card:focus-visible::before { opacity: 1; }
@keyframes tbc-spin { to { --tbc-ang: 360deg; } }

.tbc-card > *:not(.tbc-card__glow):not(.tbc-card__stack) { position: relative; z-index: 2; }
.tbc-card > * { flex-shrink: 0; }

.tbc-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: auto; }
.tbc-card__icon {
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	border-radius: 16px;
	background: rgba(241, 202, 0, .1);
	border: 1px solid rgba(241, 202, 0, .25);
	color: var(--gold);
	transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), background .3s;
}
.tbc-card__icon svg { width: 32px; height: 32px; }
.tbc-card:hover .tbc-card__icon { transform: rotate(-8deg) scale(1.08); background: rgba(241, 202, 0, .18); }

.tbc-card__count { font-size: 13px; color: #a8a8a8; letter-spacing: .02em; white-space: nowrap; }
.tbc-card__count b { font-size: 20px; font-weight: 800; color: var(--gold); margin-right: 2px; font-variant-numeric: tabular-nums; }

.tbc-card__name {
	display: block;
	max-width: 56%;
	margin-top: 18px;
	font-size: 25px;
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -.01em;
}
.tbc-card__kids { display: flex; flex-wrap: wrap; gap: 6px; max-width: 56%; margin-top: 12px; }
.tbc-card__kids span {
	padding: 4px 10px;
	border-radius: 99px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .08);
	font-size: 12px;
	color: #cfcfcf;
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}
.tbc-card:not(.tbc-card--big) .tbc-card__kids span:nth-child(n+3) { display: none; }
.tbc-card:not(.tbc-card--big) .tbc-card__kids { flex-wrap: nowrap; overflow: hidden; }
.tbc-card:not(.tbc-card--big) .tbc-card__kids span { flex-shrink: 1; min-width: 0; }
.tbc-card:not(.tbc-card--big) .tbc-card__kids span:first-child { flex-shrink: 0; }

.tbc-card__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	font-size: 15px;
	font-weight: 700;
	color: var(--gold);
}
.tbc-card__cta svg { width: 18px; height: 18px; transition: transform .3s; }
.tbc-card:hover .tbc-card__cta svg { transform: translateX(6px); }

/* Fotos de produtos flutuando */
.tbc-card__stack {
	position: absolute;
	right: 20px;
	top: 50%;
	z-index: 1;
	width: 40%;
	height: 150px;
	margin-top: -60px;
	pointer-events: none;
}
.tbc-card__float {
	--n: 0;
	position: absolute;
	right: calc(var(--n) * 34%);
	bottom: calc(var(--n) * 18%);
	width: 104px;
	aspect-ratio: 1;
	padding: 8px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 16px 34px rgba(0, 0, 0, .45);
	box-sizing: border-box;
	animation: tbc-float 6s ease-in-out infinite;
	animation-delay: calc(var(--n) * -2s);
	transition: right .5s cubic-bezier(.34, 1.56, .64, 1), bottom .5s cubic-bezier(.34, 1.56, .64, 1);
}
.tbc-card__float:nth-child(1) { rotate: 6deg; z-index: 3; }
.tbc-card__float:nth-child(2) { rotate: -7deg; z-index: 2; }
.tbc-card__float:nth-child(3) { rotate: 3deg; z-index: 1; }
.tbc-card__float img { display: block; width: 100% !important; height: 100% !important; object-fit: contain; }
.tbc-card:hover .tbc-card__float { right: calc(var(--n) * 44%); bottom: calc(var(--n) * 24% + 6px); }
@keyframes tbc-float {
	0%, 100% { translate: 0 0; }
	50% { translate: 0 -10px; }
}

.tbc-card--big { padding: 36px; }
.tbc-card--big .tbc-card__top { margin-bottom: 0; }
.tbc-card--big .tbc-card__name { font-size: 40px; max-width: 100%; margin-top: auto; }
.tbc-card--big .tbc-card__kids { max-width: 100%; }
.tbc-card--big .tbc-card__stack { top: 92px; right: 36px; left: 36px; width: auto; height: 205px; margin-top: 0; }
.tbc-card--big .tbc-card__float { width: 156px; border-radius: 22px; }
.tbc-card--big .tbc-card__float { right: calc(var(--n) * 30%); bottom: calc(var(--n) * 12%); }
.tbc-card--big:hover .tbc-card__float { right: calc(var(--n) * 34%); bottom: calc(var(--n) * 16% + 6px); }

/* Faixa rolante de subcategorias */
.tbc__marquee {
	position: relative;
	margin-top: 44px;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.tbc__track { display: flex; width: max-content; animation: tbc-marquee 55s linear infinite; }
.tbc__marquee:hover .tbc__track,
.tbc__marquee:focus-within .tbc__track { animation-play-state: paused; }
.tbc__chips { display: flex; gap: 12px; margin: 0 !important; padding: 0 12px 0 0 !important; list-style: none !important; }
.tbc__chips li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.tbc__chips a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 99px;
	border: 1px solid rgba(255, 255, 255, .14);
	color: #e5e5e5 !important;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none !important;
	transition: background .25s, color .25s, border-color .25s;
}
.tbc__chips a::before { content: "♪"; color: var(--gold); transition: color .25s; }
.tbc__chips a:hover,
.tbc__chips a:focus-visible { background: var(--gold); border-color: var(--gold); color: #111 !important; }
.tbc__chips a:hover::before,
.tbc__chips a:focus-visible::before { color: #111; }
@keyframes tbc-marquee { to { transform: translateX(-50%); } }

.tbc a:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

/* Entrada ao rolar a página (só quando o JS está ativo) */
.tbc--ready .tbc-reveal {
	opacity: 0;
	transform: translateY(46px) scale(.97);
	transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
	transition-delay: calc(var(--d, 0) * 110ms);
}
.tbc--ready .tbc-reveal.is-in { opacity: 1; transform: none; }

/* Tablet */
@media (max-width: 1024px) {
	.tbc { padding: 80px 0 72px; }
	.tbc__title { font-size: 42px !important; }
	.tbc__grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 250px; }
	.tbc-card-wrap:first-child { grid-column: span 2; grid-row: span 1; }
	.tbc-card--big .tbc-card__name { font-size: 32px; margin-top: 16px; max-width: 52%; }
	.tbc-card--big .tbc-card__kids { max-width: 52%; }
	.tbc-card--big .tbc-card__stack { top: 50%; left: auto; right: 28px; width: 44%; height: 160px; margin-top: -70px; }
	.tbc-card--big .tbc-card__float { width: 124px; }
}

/* Celular */
@media (max-width: 640px) {
	.tbc { padding: 60px 0 56px; }
	.tbc__inner { padding: 0 16px; }
	.tbc__head { margin-bottom: 32px; }
	.tbc__title { font-size: 34px !important; }
	.tbc__sub { font-size: 16px; }
	.tbc__grid { grid-template-columns: 1fr; grid-auto-rows: 228px; gap: 14px; }
	.tbc-card-wrap:first-child { grid-column: auto; }
	.tbc-card, .tbc-card--big { padding: 22px; border-radius: 18px; }
	.tbc-card__name, .tbc-card--big .tbc-card__name { font-size: 23px; max-width: 56%; margin-top: 12px; }
	.tbc-card__kids, .tbc-card--big .tbc-card__kids { max-width: 56%; }
	.tbc-card--big .tbc-card__top { margin-bottom: auto; }
	.tbc-card__kids span:nth-child(n+3) { display: none; }
	.tbc-card__kids, .tbc-card--big .tbc-card__kids { flex-wrap: nowrap; overflow: hidden; }
	.tbc-card__kids span { flex-shrink: 1; min-width: 0; }
	.tbc-card__kids span:first-child { flex-shrink: 0; }
	.tbc-card__stack, .tbc-card--big .tbc-card__stack { top: 50%; left: auto; right: 14px; width: 42%; height: 120px; margin-top: -48px; }
	.tbc-card__float, .tbc-card--big .tbc-card__float { width: 84px; border-radius: 14px; }
	.tbc-card--big .tbc-card__float:nth-child(3) { display: none; }
	.tbc-card__icon { width: 48px; height: 48px; border-radius: 14px; }
	.tbc-card__icon svg { width: 26px; height: 26px; }
	.tbc__marquee { margin: 32px -16px 0; }
	.tbc__chips a { padding: 9px 15px; font-size: 14px; }
	/* o brilho e a borda animada aparecem também ao tocar */
	.tbc-card::before { opacity: .55; }
}

@media (prefers-reduced-motion: reduce) {
	.tbc__bg span,
	.tbc__title,
	.tbc-card::before,
	.tbc-card__float,
	.tbc__track { animation: none !important; }
	.tbc__track { flex-wrap: wrap; width: auto; }
	.tbc__chips[aria-hidden="true"] { display: none; }
	.tbc__chips { flex-wrap: wrap; justify-content: center; }
	.tbc__marquee { -webkit-mask-image: none; mask-image: none; }
	.tbc--ready .tbc-reveal { opacity: 1; transform: none; transition: none; }
	.tbc-card, .tbc-card__float { transition: none; }
}
