/* ==========================================================================
   Del Rei Flutes — camada visual customizada sobre o tema de blocos
   ========================================================================== */

/* --- Fundo: minimalista, cor sólida (sem textura) ----------------------- */
body {
	background-color: var(--wp--preset--color--base);
}

/* Superfícies de conteúdo (cards, formulários) ficam sempre 100% opacas,
   independente do fundo com textura por trás. */
.woocommerce ul.products li.product,
.wc-block-grid__product,
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout,
.wc-block-components-panel,
.wp-block-search__inside-wrapper,
.wp-block-group.is-style-del-rei-card {
	background-color: var(--wp--preset--color--base-2);
}

/* --- Base tipográfica e de interação ---------------------------------- */
a,
.wp-block-button__link,
.wc-block-grid__product,
.woocommerce ul.products li.product,
.wp-block-woocommerce-product-image img,
img {
	transition: color 0.25s ease, background-color 0.25s ease,
		border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease,
		opacity 0.25s ease;
}

/* --- Botões: leve elevação e realce no hover --------------------------- */
.wp-block-button__link,
.wc-block-components-button,
button.button,
.woocommerce a.button,
.woocommerce button.button {
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.wp-block-button__link:hover,
.wc-block-components-button:not(:disabled):hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
	transform: translateY(-1px);
	opacity: 0.9;
}

.wp-block-button__link:active,
.woocommerce a.button:active,
.woocommerce button.button:active {
	transform: translateY(0);
	opacity: 1;
}

/* --- Cards de produto: borda fina em vez de sombra pesada ---------------
   O grid de produtos usa o bloco woocommerce/product-collection (Interactivity
   API), cujo item real é <li class="wc-block-product ...">, não o antigo
   <li class="product"> das listagens clássicas — por isso os dois seletores. */
.woocommerce ul.products li.product,
.wc-block-grid__product,
li.wc-block-product {
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid rgba(15, 35, 65, 0.08);
	padding: 0 0 20px;
	background-color: var(--wp--preset--color--base-2);
}

.woocommerce ul.products li.product:hover,
.wc-block-grid__product:hover,
li.wc-block-product:hover {
	transform: translateY(-3px);
	border-color: rgba(15, 35, 65, 0.16);
}

.woocommerce ul.products li.product a img,
.wc-block-grid__product-image img,
.wp-block-woocommerce-product-image img {
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Imagem: sempre quadrada, sem cantos soltos dentro do card */
.del-rei-product-image {
	margin: 0 0 14px !important;
}

.del-rei-product-image img {
	border-radius: 0;
}

/* Marca: pequena, discreta, maiúscula, acima do título */
.del-rei-product-brand {
	margin: 0 16px 2px !important;
	color: var(--wp--preset--color--contrast-3);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.72rem !important;
}

.del-rei-product-brand a {
	color: inherit;
	text-decoration: none;
}

/* Título: fonte de destaque da marca (Cinzel), só que em tamanho contido —
   títulos de produto são curtos, então funciona bem, diferente de frases
   longas usadas como heading. */
.del-rei-product-title {
	margin: 0 16px 6px !important;
	font-family: var(--wp--preset--font-family--heading);
}

.del-rei-product-title a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

/* Preço: preço promocional em dourado escurecido (mesma cor acessível usada
   nos links "Ver produtos", já testada em 4.81:1 de contraste) */
.del-rei-product-price {
	margin: 0 16px 14px !important;
}

.del-rei-product-price del {
	opacity: 0.55;
}

.del-rei-product-price ins {
	text-decoration: none;
	color: #7a5d2c;
	font-weight: 600;
}

/* Botão: contorno fino, preenche de navy no hover — mais discreto que um
   botão sólido repetido dezenas de vezes numa grade de produtos */
.del-rei-product-button {
	margin: 0 16px !important;
}

.del-rei-product-button .wp-block-button__link,
.del-rei-product-button .add_to_cart_button,
.del-rei-product-button a.button {
	display: block;
	width: 100%;
	background: transparent !important;
	color: var(--wp--preset--color--contrast) !important;
	border: 1px solid var(--wp--preset--color--contrast) !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.75rem !important;
}

.del-rei-product-button .wp-block-button__link:hover,
.del-rei-product-button .add_to_cart_button:hover,
.del-rei-product-button a.button:hover {
	background: var(--wp--preset--color--contrast) !important;
	color: var(--wp--preset--color--base) !important;
}

.woocommerce ul.products li.product:hover a img,
.wc-block-grid__product:hover .wc-block-grid__product-image img {
	transform: scale(1.05);
}

/* --- Links de navegação com sublinhado animado -------------------------- */
.wp-block-navigation-item > .wp-block-navigation-item__content {
	position: relative;
}

.wp-block-navigation-item > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 100%;
	height: 1.5px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.3s ease;
}

.wp-block-navigation-item > .wp-block-navigation-item__content:hover::after {
	transform: scaleX(1);
	transform-origin: left;
}

/* --- Logo: leve resposta no hover --------------------------------------- */
.del-rei-site-logo img {
	transition: opacity 0.25s ease;
}

.del-rei-site-logo:hover img {
	opacity: 0.82;
}

/* --- Revelação suave ao rolar a página ----------------------------------
   Progressive enhancement: só aplica estado inicial oculto quando o JS
   confirma suporte (classe .js-reveal-ready no <html>). Sem JS, tudo
   permanece 100% visível. */
.js-reveal-ready .reveal-on-scroll {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-reveal-ready .reveal-on-scroll.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* --- Hero gráfico (sem foto) ---------------------------------------------
   Fundo claro (mesma cor do resto da página) — navy só fica reservado para
   header/footer, como pedido. Só tipografia, sem imagem nenhuma. */
.del-rei-hero-graphic {
	background-color: var(--wp--preset--color--base-2);
}

/* --- Seção "Explore por categoria" -------------------------------------- */
.del-rei-categories-section {
	background-color: var(--wp--preset--color--base-2);
}

.del-rei-category-grid {
	gap: 32px;
	margin-top: 16px;
}

.del-rei-category-card {
	flex: 1 1 220px;
	max-width: 260px;
	background-color: transparent;
	border-radius: 10px;
	overflow: hidden;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.del-rei-category-card:hover {
	transform: translateY(-4px);
	opacity: 0.92;
}

.del-rei-category-card .wp-block-image {
	margin: 0;
	overflow: hidden;
}

.del-rei-category-card .wp-block-image img {
	transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.del-rei-category-card:hover .wp-block-image img {
	transform: scale(1.09);
}

.del-rei-category-card .wp-block-heading {
	margin: 16px 20px 4px;
}

.del-rei-category-card .wp-block-heading a {
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.del-rei-category-cta {
	margin: 0 20px 20px !important;
}

.del-rei-category-cta a {
	/* Tom de dourado escurecido especificamente para passar WCAG AA (4.5:1)
	   sobre o fundo bege — o accent-2 padrão só tem 2.57:1 aqui. */
	color: #7A5D2C;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.2s ease, margin-left 0.2s ease;
	display: inline-block;
}

.del-rei-category-cta a:hover {
	color: var(--wp--preset--color--contrast);
	margin-left: 4px;
}

@media (max-width: 600px) {
	.del-rei-category-card {
		flex-basis: 45%;
		max-width: none;
	}
}

/* --- Barra superior do header ------------------------------------------- */
.del-rei-topbar {
	padding: 8px 40px;
}

.del-rei-topbar p {
	margin: 0;
}

.del-rei-topbar a {
	text-decoration: none;
}

.del-rei-topbar a:hover {
	text-decoration: underline;
}

@media (max-width: 600px) {
	.del-rei-topbar {
		padding: 8px 20px;
		flex-wrap: wrap;
		gap: 4px;
		justify-content: center !important;
		text-align: center;
	}
}

/* --- Busca no header ------------------------------------------------------ */
.del-rei-search .wc-block-product-search__fields {
	display: flex;
	align-items: center;
	border: 1px solid var(--wp--preset--color--contrast-3);
	border-radius: 999px;
	padding: 2px 4px 2px 16px;
	transition: border-color 0.2s ease;
}

.del-rei-search .wc-block-product-search__fields:focus-within {
	border-color: var(--wp--preset--color--accent);
}

.del-rei-search .wc-block-product-search__field {
	border: none;
	outline: none;
	background: transparent;
	font-size: 0.85rem;
	width: 160px;
	padding: 6px 0;
}

.del-rei-search .wc-block-product-search__button {
	background: transparent;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	width: 30px;
	height: 30px;
	color: var(--wp--preset--color--contrast);
	transition: background-color 0.2s ease;
}

.del-rei-search .wc-block-product-search__button:hover {
	background-color: var(--wp--preset--color--base);
}

@media (max-width: 782px) {
	.del-rei-search .wc-block-product-search__field {
		width: 100px;
	}
}

/* --- Header: empilha no mobile em vez de espremer tudo numa linha só ----
   isStackedOnMobile estava desligado nesse padrão de header do WooCommerce,
   então logo + busca/conta/carrinho brigavam pelo mesmo espaço e a busca
   acabava sobrepondo a logo. Forçamos wrap real com cada coluna ocupando
   100% da largura. */
@media (max-width: 600px) {
	.wc-blocks-header-pattern .wp-block-columns {
		flex-wrap: wrap !important;
		row-gap: 14px;
	}

	.wc-blocks-header-pattern .wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
		width: 100% !important;
	}

	.wc-blocks-header-pattern .wp-block-columns > .wp-block-column .wp-block-group {
		justify-content: center !important;
	}

	.del-rei-site-logo img {
		width: 150px !important;
		height: auto !important;
	}

	.del-rei-search .wc-block-product-search__field {
		width: 130px;
	}
}

/* --- Footer --------------------------------------------------------------- */
.del-rei-footer a {
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.del-rei-footer a:hover {
	opacity: 0.75;
	text-decoration: underline;
}

.del-rei-footer-icon img {
	opacity: 0.95;
}

/* --- Acessibilidade: respeita usuários que pedem menos movimento -------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}

	.js-reveal-ready .reveal-on-scroll {
		opacity: 1;
		transform: none;
	}

	.woocommerce ul.products li.product:hover,
	.wc-block-grid__product:hover,
	.wp-block-button__link:hover {
		transform: none;
	}
}

