/* Tamborim - Categorias da Loja
 * Escopo: body.tc-archive (loja e categorias de produto).
 * O CSS inline do BeTheme vem depois deste arquivo: seletores começam por body.tc-archive.
 */

body.tc-archive {
	--tc-ink: #111111;
	--tc-gold: #f1ca00;
	--tc-gold-d: #d9b500;
	--tc-stone: #f4f3ef;
	--tc-line: #e7e6e1;
	--tc-muted: #6b6b6b;
	--tc-wa: #11823f;
	--tc-max: 1220px;
	--tc-pad: 24px;
}

/* O cabeçalho do tema (faixa escura com linhas e título à direita) dá lugar ao nosso. */
body.tc-archive #Subheader { display: none !important; }

/* Esconde os blocos antigos caso algum snippet ainda esteja ativo. */
body.tc-archive .tamborim-categorias-produtos,
body.tc-archive [class^="tamborim-navegacao-"] { display: none !important; }

/* ---------- Cabeçalho da categoria ---------- */
body.tc-archive .tc-hero {
	background: var(--tc-ink);
	color: #fff;
	padding-top: 40px;
	position: relative;
	border-top: 1px solid rgba(255, 255, 255, .06);
}
body.tc-archive .tc-hero__in {
	max-width: var(--tc-max);
	margin: 0 auto;
	padding: 0 var(--tc-pad);
	box-sizing: border-box;
}
body.tc-archive .tc-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 14px;
	line-height: 1.4;
	color: #8d8d8d;
	margin: 0 0 14px;
}
body.tc-archive .tc-crumbs a { color: #b4b4b4; text-decoration: none; }
body.tc-archive .tc-crumbs a:hover { color: var(--tc-gold); }
body.tc-archive .tc-crumbs span { color: #5a5a5a; }
body.tc-archive .tc-crumbs span:last-child { display: none; }

body.tc-archive .tc-hero__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 20px;
}
body.tc-archive .tc-hero .tc-hero__title {
	margin: 0;
	color: #fff;
	font-size: clamp(32px, 4.6vw, 56px);
	font-weight: 900;
	line-height: 1.02;
	letter-spacing: -.025em;
}
body.tc-archive .tc-hero .tc-hero__count {
	margin: 0;
	font-size: 15px;
	color: #a9a9a9;
}
body.tc-archive .tc-hero .tc-hero__count strong { color: var(--tc-gold); font-weight: 800; }
body.tc-archive .tc-hero .tc-hero__desc {
	margin: 14px 0 0;
	max-width: 62ch;
	font-size: 16px;
	line-height: 1.6;
	color: #c9c9c9;
}

/* Abas de subcategorias: encostadas na base da faixa escura; a ativa se funde com a página. */
body.tc-archive .tc-tabs {
	max-width: var(--tc-max);
	margin: 30px auto 0;
	padding: 0 var(--tc-pad);
	box-sizing: border-box;
	position: relative;
}
body.tc-archive .tc-tabs__track {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
body.tc-archive .tc-tabs__track::-webkit-scrollbar { display: none; }
body.tc-archive .tc-tabs.has-more::after {
	content: "";
	position: absolute;
	top: 0;
	right: var(--tc-pad);
	bottom: 0;
	width: 56px;
	pointer-events: none;
	background: linear-gradient(90deg, rgba(17, 17, 17, 0), var(--tc-ink));
}
body.tc-archive .tc-tabs.has-prev::before {
	content: "";
	position: absolute;
	top: 0;
	left: var(--tc-pad);
	bottom: 0;
	width: 56px;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(270deg, rgba(17, 17, 17, 0), var(--tc-ink));
}
body.tc-archive .tc-tabs__arrow {
	display: none;
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 32px;
	height: 32px;
	margin: -18px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='12' viewBox='0 0 8 12'%3E%3Cpath d='M1.5 1 6.5 6l-5 5' fill='none' stroke='%23111' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
	cursor: pointer;
}
body.tc-archive .tc-tabs__arrow--prev { left: calc(var(--tc-pad) - 12px); transform: scaleX(-1); }
body.tc-archive .tc-tabs__arrow--next { right: calc(var(--tc-pad) - 12px); }
@media (hover: hover) and (min-width: 768px) {
	body.tc-archive .tc-tabs.has-prev .tc-tabs__arrow--prev,
	body.tc-archive .tc-tabs.has-more .tc-tabs__arrow--next { display: block; }
}
body.tc-archive a.tc-tab {
	flex: 0 0 auto;
	scroll-snap-align: start;
	position: relative;
	display: inline-flex;
	align-items: baseline;
	gap: 7px;
	padding: 13px 16px 14px;
	border-radius: 10px 10px 0 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	color: #cfcfcf;
	text-decoration: none;
	background: rgba(255, 255, 255, .05);
	transition: background-color .15s ease, color .15s ease;
}
body.tc-archive a.tc-tab:hover { background: rgba(255, 255, 255, .11); color: #fff; }
body.tc-archive a.tc-tab .tc-tab__n {
	font-size: 12px;
	font-weight: 600;
	color: #7d7d7d;
	font-variant-numeric: tabular-nums;
}
body.tc-archive a.tc-tab.is-active {
	background: #fff;
	color: var(--tc-ink);
}
body.tc-archive a.tc-tab.is-active .tc-tab__n { color: #8a8a8a; }
body.tc-archive a.tc-tab.is-active::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 3px;
	border-radius: 10px 10px 0 0;
	background: var(--tc-gold);
	transform-origin: left center;
}
body.tc-archive a.tc-tab:focus-visible {
	outline: 2px solid var(--tc-gold);
	outline-offset: -2px;
}

/* Único movimento automático: a faixa dourada da aba atual se desenha ao abrir a página. */
@media (prefers-reduced-motion: no-preference) {
	body.tc-archive .tc-tabs.is-ready a.tc-tab.is-active::before {
		animation: tc-draw .5s cubic-bezier(.2, .7, .2, 1) .15s both;
	}
	@keyframes tc-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---------- Barra de resultados / ordenação ---------- */
body.tc-archive #Content { padding-top: 0 !important; }
body.tc-archive .section.woocommerce_before_main_content { display: none; }
body.tc-archive .default-woo-list { padding-top: 28px; }

body.tc-archive .mfn-woo-filters-wrapper.shop-filters {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 22px !important;
	padding: 0 0 16px !important;
	border-bottom: 1px solid var(--tc-line);
}
body.tc-archive .mfn-woo-filters-wrapper .woocommerce-notices-wrapper:empty { display: none; }
body.tc-archive .mfn-woo-filters-wrapper .mfn-woo-list-options { display: none !important; }
body.tc-archive .mfn-woo-filters-wrapper p.woocommerce-result-count {
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	font-size: 14px !important;
	color: var(--tc-muted) !important;
}
body.tc-archive .mfn-woo-filters-wrapper form.woocommerce-ordering {
	margin: 0 0 0 auto !important;
	float: none !important;
	display: flex;
	align-items: center;
	gap: 10px;
}
body.tc-archive .mfn-woo-filters-wrapper form.woocommerce-ordering::before {
	content: "Ordenar por";
	font-size: 14px;
	color: var(--tc-muted);
	white-space: nowrap;
}
body.tc-archive .mfn-woo-filters-wrapper form.woocommerce-ordering select.orderby {
	-webkit-appearance: none;
	appearance: none;
	margin: 0 !important;
	width: auto !important;
	min-width: 170px;
	height: 42px;
	padding: 0 40px 0 14px !important;
	border: 1px solid #d6d5cf !important;
	border-radius: 10px !important;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23111' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center !important;
	box-shadow: none !important;
	font-size: 15px !important;
	font-weight: 600;
	color: var(--tc-ink) !important;
	cursor: pointer;
}
body.tc-archive .mfn-woo-filters-wrapper form.woocommerce-ordering select.orderby:focus-visible {
	outline: 2px solid var(--tc-gold);
	outline-offset: 2px;
}

/* ---------- Cards ---------- */
/* O selo "NOVO" aparecia em todos os produtos: não diferencia nada. */
body.tc-archive ul.products li.product .mfn-product-badges .mfn-new-badge { display: none !important; }
/* Ícones flutuantes sobre a foto (carrinho, link, ampliar) duplicam os botões do card. */
body.tc-archive ul.products li.product .image_links { display: none !important; }

body.tc-archive ul.products li.product {
	border-color: var(--tc-line);
	padding: 10px 10px 14px !important;
}
body.tc-archive ul.products li.product:hover {
	transform: none !important;
	box-shadow: 0 1px 0 var(--tc-line), 0 14px 30px -18px rgba(17, 17, 17, .35);
	border-color: #d6d5cf;
}
body.tc-archive ul.products li.product .image_frame,
body.tc-archive ul.products li.product .image_wrapper {
	background: var(--tc-stone) !important;
	border-radius: 10px;
	overflow: hidden;
}
body.tc-archive ul.products li.product .image_wrapper .mask { display: none !important; }
body.tc-archive ul.products li.product .image_wrapper img {
	background: transparent !important;
	mix-blend-mode: multiply;
	padding: 8%;
	box-sizing: border-box;
	border-radius: 0;
	transition: transform .35s ease;
}
body.tc-archive ul.products li.product:hover .image_wrapper img { transform: scale(1.04); }

/* Esgotado: selo discreto no canto, foto apagada em vez de coberta. */
body.tc-archive ul.products li.product.outofstock .image_wrapper img { opacity: .45; filter: grayscale(1); }
body.tc-archive ul.products li.product .image_frame .soldout {
	position: absolute !important;
	inset: 10px auto auto 10px !important;
	transform: none !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
	z-index: 3;
}
body.tc-archive ul.products li.product .image_frame .soldout h4 {
	margin: 0 !important;
	padding: 5px 10px !important;
	border: 0 !important;
	border-radius: 999px;
	background: var(--tc-ink) !important;
	color: #fff !important;
	font-size: 12px !important;
	font-weight: 700;
	line-height: 1.2 !important;
	letter-spacing: 0;
}

body.tc-archive ul.products li.product .desc h4.mfn-woo-product-title {
	font-weight: 600;
	color: var(--tc-ink);
}
body.tc-archive ul.products li.product .desc h4 a:hover { color: #000; text-decoration: underline; text-underline-offset: 3px; }

/* Parcelamento em tom neutro: o verde fica só para o WhatsApp. */
body.tc-archive ul.products li.product .criativa-parc,
body.tc-archive ul.products li.product .criativa-parc p,
body.tc-archive ul.products li.product .criativa-parc .criativa-parc__n,
body.tc-archive ul.products li.product .criativa-parc .criativa-parc__suffix { color: var(--tc-muted) !important; }
body.tc-archive ul.products li.product .criativa-parc .criativa-parc__valor,
body.tc-archive ul.products li.product .criativa-parc .criativa-parc__valor .amount { color: var(--tc-ink) !important; }

/* Botões: dourado é a ação principal; WhatsApp vira secundário leve. */
body.tc-archive ul.products li.product .mfn-li-product-row-button { gap: 6px; }
body.tc-archive ul.products li.product .mfn-li-product-row-button a.button { min-height: 44px; }
body.tc-archive ul.products li.product .mfn-li-product-row-button a.button.wa-shop-button {
	background: transparent !important;
	border: 1px solid transparent !important;
	color: var(--tc-wa) !important;
	font-weight: 600;
}
body.tc-archive ul.products li.product .mfn-li-product-row-button a.button.wa-shop-button:hover {
	background: #eaf6ee !important;
	color: var(--tc-wa) !important;
}
/* Sem preço ou esgotado: o WhatsApp é a única ação e volta a ser botão cheio. */
body.tc-archive ul.products li.product .mfn-li-product-row-button a.button.wa-shop-button:only-of-type {
	background: var(--tc-ink) !important;
	border-color: var(--tc-ink) !important;
	color: #fff !important;
}
body.tc-archive ul.products li.product .mfn-li-product-row-button a.button.wa-shop-button:only-of-type:hover {
	background: #000 !important;
}
body.tc-archive ul.products li.product .mfn-li-product-row-button a.button:focus-visible {
	outline: 2px solid var(--tc-ink);
	outline-offset: 2px;
}

/* ---------- Ver mais ---------- */
body.tc-archive .pager_wrapper { text-align: center; }
body.tc-archive .pager_wrapper .pager { margin: 8px 0 48px; }
body.tc-archive a.pager_load_more.button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-width: 260px;
	height: 50px;
	padding: 0 28px !important;
	border: 1px solid var(--tc-ink) !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: var(--tc-ink) !important;
	font-size: 15px;
	font-weight: 700;
	box-shadow: none !important;
}
body.tc-archive a.pager_load_more.button:hover { background: var(--tc-ink) !important; color: #fff !important; }
body.tc-archive a.pager_load_more.button .button_icon { display: none !important; }
body.tc-archive a.pager_load_more.button .button_label { padding: 0 !important; }

/* ---------- Tablet / celular ---------- */
@media (max-width: 767px) {
	body.tc-archive { --tc-pad: 16px; }
	body.tc-archive .tc-hero { padding-top: 24px; }
	body.tc-archive .tc-crumbs { font-size: 13px; margin-bottom: 10px; }
	body.tc-archive .tc-hero .tc-hero__desc { font-size: 15px; margin-top: 10px; }
	body.tc-archive .tc-tabs { margin-top: 20px; padding-right: 0; }
	body.tc-archive .tc-tabs.has-more::after { right: 0; }
	body.tc-archive .tc-tabs.has-prev::before { left: 0; }
	body.tc-archive .tc-tabs__track { padding-left: var(--tc-pad); }
	body.tc-archive .tc-tabs { padding-left: 0; }
	body.tc-archive .tc-tabs__track { padding-right: var(--tc-pad); }
	body.tc-archive a.tc-tab { padding: 11px 13px 12px; font-size: 14px; }

	body.tc-archive .default-woo-list { padding-top: 18px; }
	body.tc-archive .mfn-woo-filters-wrapper.shop-filters { margin-bottom: 14px !important; padding-bottom: 12px !important; }
	body.tc-archive .mfn-woo-filters-wrapper form.woocommerce-ordering::before { display: none; }
	body.tc-archive .mfn-woo-filters-wrapper form.woocommerce-ordering select.orderby { min-width: 0; height: 40px; font-size: 14px !important; }

	body.tc-archive ul.products li.product { padding: 6px 6px 10px !important; }
	body.tc-archive ul.products li.product .mfn-li-product-row-button a.button { min-height: 40px; }
	/* Rótulos curtos para caber em uma linha no card de 2 colunas. */
	body.tc-archive ul.products li.product .mfn-li-product-row-button a.button.ajax_add_to_cart:not(.wa-shop-button),
	body.tc-archive ul.products li.product .mfn-li-product-row-button a.button.wa-shop-button { font-size: 0 !important; }
	body.tc-archive ul.products li.product .mfn-li-product-row-button a.button.ajax_add_to_cart:not(.wa-shop-button)::after,
	body.tc-archive ul.products li.product .mfn-li-product-row-button a.button.wa-shop-button::after {
		display: inline !important;
		font-size: 13px;
		white-space: nowrap;
	}
	body.tc-archive ul.products li.product .mfn-li-product-row-button a.button.ajax_add_to_cart:not(.wa-shop-button)::after { content: "Adicionar" !important; }
	body.tc-archive ul.products li.product .mfn-li-product-row-button a.button.wa-shop-button::after { content: "Pedir no WhatsApp" !important; font-size: 12.5px; }
	body.tc-archive ul.products li.product .mfn-li-product-row-button a.button.wa-shop-button:only-of-type::after { content: "Consultar" !important; font-size: 13px; }
	body.tc-archive a.pager_load_more.button { width: 100%; min-width: 0; }
}
