/* ===== Transicoes de pagina: so o conteudo anima; header e barra lateral ficam sempre parados ===== */

@media (prefers-reduced-motion: no-preference) {
	@view-transition { navigation: auto; }

	main#main { view-transition-name: rv-main; }

	/* o resto da pagina (header, barra lateral, rodape) troca sem animacao */
	::view-transition-old(root),
	::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
	::view-transition-old(root) { display: none; }

	::view-transition-group(rv-main) { animation: none; }
	::view-transition-old(rv-main),
	::view-transition-new(rv-main) { mix-blend-mode: normal; }
	/* a pagina antiga fica opaca por baixo; so a nova aparece por cima (sem flash branco) */
	::view-transition-old(rv-main) { animation: none; opacity: 1; }
	::view-transition-new(rv-main) { animation: rvIn .3s ease-out both; }
}
@keyframes rvOut { to { opacity: 0; } }
@keyframes rvIn { from { opacity: 0; } }

/* Fallback (Firefox / browsers antigos): fade so no conteudo */
html.rv-ready main#main { animation: rvFade .45s cubic-bezier(.16, 1, .3, 1) both; }
html.rv-leaving main#main { opacity: 1; }
html.rv-leaving { pointer-events: none; }
@keyframes rvFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
html { scroll-behavior: auto !important; }

@media (prefers-reduced-motion: reduce) {
	html.rv-ready main#main, html.rv-leaving main#main { animation: none; transition: none; opacity: 1; transform: none; }
}

/* ===== Entrada escalonada dos itens (produtos, noticias, etc.) ===== */
@media (prefers-reduced-motion: no-preference) {
	ul.products > li.product,
	.products > .product,
	[data-products] > .product,
	.entries > article,
	.ct-posts-shortcode article,
	[data-archive] > article,
	.wp-block-post-template > li,
	.woocommerce-product-gallery,
	.product .entry-summary,
	.ct-related-posts article,
	.related.products li.product,
	.upsells li.product,
	.hero-section .page-title,
	.woocommerce-products-header,
	.stk-block-columns .stk-block-column
	{ animation: rvItem .7s cubic-bezier(.16, 1, .3, 1) backwards; animation-delay: calc(var(--rv-i, 0) * 70ms + 120ms); }
	ul.products > li.product:nth-child(1), .products > .product:nth-child(1), [data-products] > .product:nth-child(1), .entries > article:nth-child(1), .ct-posts-shortcode article:nth-child(1), [data-archive] > article:nth-child(1), .wp-block-post-template > li:nth-child(1), .woocommerce-product-gallery:nth-child(1), .product .entry-summary:nth-child(1), .ct-related-posts article:nth-child(1), .related.products li.product:nth-child(1) { --rv-i: 0; }
	ul.products > li.product:nth-child(2), .products > .product:nth-child(2), [data-products] > .product:nth-child(2), .entries > article:nth-child(2), .ct-posts-shortcode article:nth-child(2), [data-archive] > article:nth-child(2), .wp-block-post-template > li:nth-child(2), .woocommerce-product-gallery:nth-child(2), .product .entry-summary:nth-child(2), .ct-related-posts article:nth-child(2), .related.products li.product:nth-child(2) { --rv-i: 1; }
	ul.products > li.product:nth-child(3), .products > .product:nth-child(3), [data-products] > .product:nth-child(3), .entries > article:nth-child(3), .ct-posts-shortcode article:nth-child(3), [data-archive] > article:nth-child(3), .wp-block-post-template > li:nth-child(3), .woocommerce-product-gallery:nth-child(3), .product .entry-summary:nth-child(3), .ct-related-posts article:nth-child(3), .related.products li.product:nth-child(3) { --rv-i: 2; }
	ul.products > li.product:nth-child(4), .products > .product:nth-child(4), [data-products] > .product:nth-child(4), .entries > article:nth-child(4), .ct-posts-shortcode article:nth-child(4), [data-archive] > article:nth-child(4), .wp-block-post-template > li:nth-child(4), .woocommerce-product-gallery:nth-child(4), .product .entry-summary:nth-child(4), .ct-related-posts article:nth-child(4), .related.products li.product:nth-child(4) { --rv-i: 3; }
	ul.products > li.product:nth-child(5), .products > .product:nth-child(5), [data-products] > .product:nth-child(5), .entries > article:nth-child(5), .ct-posts-shortcode article:nth-child(5), [data-archive] > article:nth-child(5), .wp-block-post-template > li:nth-child(5), .woocommerce-product-gallery:nth-child(5), .product .entry-summary:nth-child(5), .ct-related-posts article:nth-child(5), .related.products li.product:nth-child(5) { --rv-i: 4; }
	ul.products > li.product:nth-child(6), .products > .product:nth-child(6), [data-products] > .product:nth-child(6), .entries > article:nth-child(6), .ct-posts-shortcode article:nth-child(6), [data-archive] > article:nth-child(6), .wp-block-post-template > li:nth-child(6), .woocommerce-product-gallery:nth-child(6), .product .entry-summary:nth-child(6), .ct-related-posts article:nth-child(6), .related.products li.product:nth-child(6) { --rv-i: 5; }
	ul.products > li.product:nth-child(7), .products > .product:nth-child(7), [data-products] > .product:nth-child(7), .entries > article:nth-child(7), .ct-posts-shortcode article:nth-child(7), [data-archive] > article:nth-child(7), .wp-block-post-template > li:nth-child(7), .woocommerce-product-gallery:nth-child(7), .product .entry-summary:nth-child(7), .ct-related-posts article:nth-child(7), .related.products li.product:nth-child(7) { --rv-i: 6; }
	ul.products > li.product:nth-child(8), .products > .product:nth-child(8), [data-products] > .product:nth-child(8), .entries > article:nth-child(8), .ct-posts-shortcode article:nth-child(8), [data-archive] > article:nth-child(8), .wp-block-post-template > li:nth-child(8), .woocommerce-product-gallery:nth-child(8), .product .entry-summary:nth-child(8), .ct-related-posts article:nth-child(8), .related.products li.product:nth-child(8) { --rv-i: 7; }
	ul.products > li.product:nth-child(9), .products > .product:nth-child(9), [data-products] > .product:nth-child(9), .entries > article:nth-child(9), .ct-posts-shortcode article:nth-child(9), [data-archive] > article:nth-child(9), .wp-block-post-template > li:nth-child(9), .woocommerce-product-gallery:nth-child(9), .product .entry-summary:nth-child(9), .ct-related-posts article:nth-child(9), .related.products li.product:nth-child(9) { --rv-i: 8; }
	ul.products > li.product:nth-child(10), .products > .product:nth-child(10), [data-products] > .product:nth-child(10), .entries > article:nth-child(10), .ct-posts-shortcode article:nth-child(10), [data-archive] > article:nth-child(10), .wp-block-post-template > li:nth-child(10), .woocommerce-product-gallery:nth-child(10), .product .entry-summary:nth-child(10), .ct-related-posts article:nth-child(10), .related.products li.product:nth-child(10) { --rv-i: 9; }
	ul.products > li.product:nth-child(11), .products > .product:nth-child(11), [data-products] > .product:nth-child(11), .entries > article:nth-child(11), .ct-posts-shortcode article:nth-child(11), [data-archive] > article:nth-child(11), .wp-block-post-template > li:nth-child(11), .woocommerce-product-gallery:nth-child(11), .product .entry-summary:nth-child(11), .ct-related-posts article:nth-child(11), .related.products li.product:nth-child(11) { --rv-i: 10; }
	ul.products > li.product:nth-child(12), .products > .product:nth-child(12), [data-products] > .product:nth-child(12), .entries > article:nth-child(12), .ct-posts-shortcode article:nth-child(12), [data-archive] > article:nth-child(12), .wp-block-post-template > li:nth-child(12), .woocommerce-product-gallery:nth-child(12), .product .entry-summary:nth-child(12), .ct-related-posts article:nth-child(12), .related.products li.product:nth-child(12) { --rv-i: 11; }
	ul.products > li.product:nth-child(n+13), .products > .product:nth-child(n+13), [data-products] > .product:nth-child(n+13), .entries > article:nth-child(n+13), .ct-posts-shortcode article:nth-child(n+13), [data-archive] > article:nth-child(n+13), .wp-block-post-template > li:nth-child(n+13), .woocommerce-product-gallery:nth-child(n+13), .product .entry-summary:nth-child(n+13), .ct-related-posts article:nth-child(n+13), .related.products li.product:nth-child(n+13) { --rv-i: 11; }
}
@keyframes rvItem { from { opacity: 0; transform: translateY(22px); } }
