/**
 * Homepage — vitrine Esmeralda Paper
 */

/* Colado ao header — sem faixa vazia nem “2.ª linha” antes do hero */
body.ashe-woocommerce-child.ashe-wc-home .main-content,
.ashe-wc-home .main-content {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

body.ashe-woocommerce-child.ashe-wc-home #content,
body.ashe-woocommerce-child.ashe-wc-home .main-container,
body.ashe-woocommerce-child.ashe-wc-home #page-wrap > .main-container {
	padding-top: 0 !important;
	margin-top: 0 !important;
	border-top: 0 !important;
}

body.ashe-woocommerce-child.ashe-wc-home #page-header {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
	border-bottom: 0 !important;
	box-shadow: none !important;
}

.ashe-wc-home .post-header,
.ashe-wc-home .page-title {
	display: none;
}

.ep-home {
	max-width: var(--ashe-wc-max, 1320px);
	margin: 0 auto;
	padding: 0 0 2.5rem;
}

/* =========================================================================
   HERO — limpo, sem fundo
   Espaçamento/alinhamento responsivo (desktop / tablet / mobile).
   Tipografia, cores e estilo de botões preservados.
   ========================================================================= */
.ep-home-hero {
	/* tokens de espaçamento vertical entre blocos do hero */
	--ep-hero-gap-eyebrow: 1.15rem;
	--ep-hero-gap-title: 0.95rem;
	--ep-hero-gap-rule: 1.35rem;
	--ep-hero-gap-lead: 1.85rem;
	--ep-hero-gap-actions: 0.7rem;
	--ep-hero-pad-x: 1.25rem;
	--ep-hero-pad-y-top: clamp(2.25rem, 5vw, 3.25rem);
	--ep-hero-pad-y-bot: clamp(1.75rem, 3vw, 2.5rem);
	--ep-hero-margin-bot: 2.75rem;

	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	box-sizing: border-box;
	text-align: center;
	max-width: 42rem;
	margin: 0 auto var(--ep-hero-margin-bot);
	padding: var(--ep-hero-pad-y-top) var(--ep-hero-pad-x) var(--ep-hero-pad-y-bot);
	/* Evita a próxima seção “vazar” no primeiro ecrã (abaixo do header) */
	min-height: calc(100svh - var(--ashe-wc-nav-h, 66px) - var(--ashe-wc-admin-bar-h, 0px));
	min-height: calc(100vh - var(--ashe-wc-nav-h, 66px) - var(--ashe-wc-admin-bar-h, 0px));
	background: transparent !important;
	isolation: auto;
}

/* Sem fundo / ornamentos de caixa */
.ep-home-hero::before,
.ep-home-hero::after {
	content: none !important;
	display: none !important;
}

.ep-home-hero__eyebrow {
	display: inline-block;
	margin: 0 0 var(--ep-hero-gap-eyebrow);
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--ashe-wc-font-sans, "Open Sans", system-ui, sans-serif);
	font-size: var(--ashe-wc-fs-xs);
	font-weight: 650;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ashe-wc-moss, #3d5c52);
	line-height: 1.3;
}

.ep-home-hero h1 {
	margin: 0 auto var(--ep-hero-gap-title) !important;
	padding: 0 !important;
	border: 0 !important;
	max-width: 18ch;
	font-family: var(--ashe-wc-font-serif, "Playfair Display", Georgia, serif) !important;
	font-size: clamp(2.2rem, 5.2vw, 3.1rem) !important;
	font-weight: 400 !important;
	font-style: normal !important;
	color: var(--ashe-wc-ink, #1a1c1b) !important;
	line-height: 1.1 !important;
	letter-spacing: -0.02em !important;
	text-wrap: balance;
}

.ep-home-hero h1::after {
	display: none !important;
}

.ep-home-hero__rule {
	width: 2.5rem;
	height: 2px;
	margin: 0 auto var(--ep-hero-gap-rule);
	border-radius: 2px;
	background: var(--ashe-wc-moss, #3d5c52);
	opacity: 0.55;
	flex-shrink: 0;
}

.ep-home-hero .ep-lead {
	max-width: 32rem;
	margin: 0 auto var(--ep-hero-gap-lead);
	font-family: var(--ashe-wc-font-sans, "Open Sans", system-ui, sans-serif);
	font-size: clamp(1rem, 1.8vw, 1.12rem);
	font-weight: 400;
	line-height: 1.7;
	color: var(--ashe-wc-muted, #555a58);
	text-wrap: pretty;
}

.ep-home-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ep-hero-gap-actions) 0.85rem;
	justify-content: center;
	align-items: center;
	width: 100%;
}

/* Largura pelo texto — não estica */
.ep-home-hero__actions .button {
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	align-self: center;
	min-height: 46px !important;
	padding: 0.75rem 1.4rem !important;
	border-radius: var(--ashe-wc-radius) !important;
	font-size: var(--ashe-wc-fs-sm) !important;
	font-weight: 600 !important;
	letter-spacing: 0.02em !important;
	box-sizing: border-box !important;
}

/* ----- Tablet (≤979px): conteúdo à esquerda; botões empilhados, largura do texto ----- */
@media (max-width: 979px) {
	.ep-home-hero {
		--ep-hero-gap-eyebrow: 1rem;
		--ep-hero-gap-title: 0.9rem;
		--ep-hero-gap-rule: 1.2rem;
		--ep-hero-gap-lead: 1.6rem;
		--ep-hero-gap-actions: 0.75rem;
		--ep-hero-pad-x: 1.15rem;
		--ep-hero-pad-y-top: 2.35rem;
		--ep-hero-pad-y-bot: 2.5rem;
		--ep-hero-margin-bot: 2.25rem;

		text-align: left;
		max-width: none;
		margin-left: 0;
		margin-right: 0;
		align-items: flex-start;
		min-height: calc(100svh - var(--ashe-wc-nav-h, 66px) - var(--ashe-wc-admin-bar-h, 0px));
		min-height: calc(100vh - var(--ashe-wc-nav-h, 66px) - var(--ashe-wc-admin-bar-h, 0px));
	}

	.ep-home-hero h1 {
		margin-left: 0 !important;
		margin-right: 0 !important;
		max-width: 16ch;
		text-align: left;
	}

	.ep-home-hero__rule {
		margin-left: 0;
		margin-right: 0;
	}

	.ep-home-hero .ep-lead {
		margin-left: 0;
		margin-right: 0;
		max-width: 34rem;
		text-align: left;
	}

	.ep-home-hero__actions {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: flex-start;
		justify-content: flex-start;
		width: auto;
		max-width: 100%;
	}

	.ep-home-hero__actions .button {
		flex: 0 0 auto !important;
		width: auto !important;
		max-width: max-content !important;
		min-width: 0 !important;
		align-self: flex-start !important;
		display: inline-flex !important;
	}
}

/* ----- Mobile (≤600px): espaçamento mais compacto, ainda à esquerda ----- */
@media (max-width: 600px) {
	.ep-home-hero {
		--ep-hero-gap-eyebrow: 0.9rem;
		--ep-hero-gap-title: 0.8rem;
		--ep-hero-gap-rule: 1.05rem;
		--ep-hero-gap-lead: 1.4rem;
		--ep-hero-gap-actions: 0.65rem;
		--ep-hero-pad-x: 1rem;
		--ep-hero-pad-y-top: 2rem;
		--ep-hero-pad-y-bot: 2.15rem;
		--ep-hero-margin-bot: 1.85rem;

		min-height: calc(100svh - var(--ashe-wc-nav-h, 64px) - var(--ashe-wc-admin-bar-h, 0px));
		min-height: calc(100vh - var(--ashe-wc-nav-h, 64px) - var(--ashe-wc-admin-bar-h, 0px));
	}

	.ep-home-hero h1 {
		max-width: 14ch;
	}

	.ep-home-hero .ep-lead {
		max-width: 100%;
	}
}

/* ----- Desktop (≥980px): centrado, respiro vertical ----- */
@media (min-width: 980px) {
	.ep-home-hero {
		--ep-hero-gap-eyebrow: 1.2rem;
		--ep-hero-gap-title: 1rem;
		--ep-hero-gap-rule: 1.4rem;
		--ep-hero-gap-lead: 1.95rem;
		--ep-hero-gap-actions: 0.75rem;
		--ep-hero-pad-y-top: clamp(2.5rem, 6vh, 3.75rem);
		--ep-hero-pad-y-bot: clamp(2rem, 4vh, 3rem);
		--ep-hero-margin-bot: 3rem;
	}

	.ep-home-hero__actions {
		flex-direction: row;
		justify-content: center;
		align-items: center;
	}

	.ep-home-hero__actions .button {
		min-width: 10.5rem;
	}
}

/* Sections */
.ep-home {
	--ep-home-section-pad-y: clamp(3.5rem, 6vw, 5rem);
	--ep-home-divider-width: min(36rem, calc(100% - 3rem));
}

.ep-home > .ep-home-hero {
	margin-bottom: 0;
}

.ep-home-section {
	position: relative;
	margin: 0;
	padding: var(--ep-home-section-pad-y) 1rem;
}

.ep-home > .ep-home-section::before,
.ep-home > .ep-home-final::before {
	position: absolute;
	top: 0;
	left: 50%;
	width: var(--ep-home-divider-width);
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent,
		color-mix(in srgb, var(--ashe-wc-gold-deep, #856f43) 38%, transparent) 22%,
		color-mix(in srgb, var(--ashe-wc-moss-deep, #2c3a34) 22%, transparent) 50%,
		color-mix(in srgb, var(--ashe-wc-gold-deep, #856f43) 38%, transparent) 78%,
		transparent
	);
	content: "";
	transform: translateX(-50%);
}

.ep-home-section__head {
	text-align: center;
	margin-bottom: clamp(1.75rem, 3vw, 2.35rem);
}

.ep-home-section__head h2 {
	margin: 0 0 0.55rem !important;
	padding: 0 !important;
	border: 0 !important;
	font-family: var(--ashe-wc-font-serif, "Playfair Display", Georgia, serif) !important;
	font-size: clamp(1.5rem, 2.5vw, 1.85rem) !important;
	font-weight: 400 !important;
	color: var(--ashe-wc-ink, #1a1c1b);
	letter-spacing: -0.015em;
}

.ep-home-section__head h2::after {
	display: none !important;
}

.ep-home-section__head p {
	margin: 0 auto;
	max-width: 28rem;
	color: var(--ashe-wc-muted, #6f736f);
	font-size: var(--ashe-wc-fs-body);
	line-height: 1.6;
}

/* Pillars */
.ep-home-pillars {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(1rem, 2.2vw, 1.5rem);
}

.ep-home-pillar {
	padding: 1.6rem 1.5rem;
}

.ep-home-pillar__label {
	display: block;
	margin-bottom: 0.65rem;
	font-size: var(--ashe-wc-fs-xs);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	/* Mais escuro que moss puro — AA em texto pequeno (a11y Lighthouse) */
	color: var(--ashe-wc-moss-deep, #2c3a34);
	font-weight: 700;
	font-family: var(--ashe-wc-font-sans, "Open Sans", "Open Sans Fallback", Arial, sans-serif);
}

.ep-home-pillar h3 {
	margin: 0 0 0.6rem !important;
	padding: 0 !important;
	font-family: var(--ashe-wc-font-serif, "Playfair Display", Georgia, serif) !important;
	font-size: var(--ashe-wc-fs-h4) !important;
	font-weight: 400 !important;
	color: var(--ashe-wc-ink, #1a1c1b);
}

.ep-home-pillar p {
	margin: 0 0 1.1rem;
	color: var(--ashe-wc-muted, #6f736f);
	font-size: var(--ashe-wc-fs-body);
	line-height: 1.65;
}

/*
 * Ashe dynamic-css pinta links com colors_content_accent (#ca9b52 ouro) —
 * contraste ~2.5:1 falha a11y. Forçar moss-deep com !important.
 */
body.ashe-woocommerce-child .ep-home-pillar a,
body.ashe-woocommerce-child .page-content .ep-home-pillar a {
	font-size: var(--ashe-wc-fs-btn);
	font-weight: 650;
	color: #1e2f28 !important;
	text-decoration: none;
	border-bottom: 1px solid rgba(30, 47, 40, 0.35);
	padding-bottom: 1px;
	transition: border-color 0.15s ease, color 0.15s ease;
}

body.ashe-woocommerce-child .ep-home-pillar a:hover,
body.ashe-woocommerce-child .page-content .ep-home-pillar a:hover {
	border-color: var(--ashe-wc-moss-deep, #2c3a34);
	color: var(--ashe-wc-moss-deep, #2c3a34) !important;
}

/* Dark mode: ouro legível sobre superfície escura (contraste OK no escuro) */
body.ashe-woocommerce-child.ashe-dark-mode .ep-home-pillar a,
body.ashe-woocommerce-child.ashe-dark-mode .page-content .ep-home-pillar a {
	color: #e0c9a0 !important;
	border-bottom-color: rgba(224, 201, 160, 0.4);
}

body.ashe-woocommerce-child.ashe-dark-mode .ep-home-pillar a:hover,
body.ashe-woocommerce-child.ashe-dark-mode .page-content .ep-home-pillar a:hover {
	color: #f0dcb8 !important;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-card__cat,
body.ashe-woocommerce-child.ashe-dark-mode .page-content .ashe-wc-card__cat {
	color: #b8b4ae !important;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-card .price,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-card .price .amount,
body.ashe-woocommerce-child.ashe-dark-mode .page-content ul.products li.product .price {
	color: #e8d4a4 !important;
}

.ep-home-section__cta {
	text-align: center;
	margin-top: clamp(1.75rem, 3vw, 2.25rem);
	margin-bottom: 0;
}

/* Values — com ícones de marca */
.ep-home-section--values {
	margin: 0;
}

.ep-home-values {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.35rem 1.5rem;
	padding: 0 0.75rem;
	border: 0;
}

.ep-home-value {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 0.65rem 0.85rem 0.5rem;
	max-width: 20rem;
	margin: 0 auto;
}

.ep-home-value__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	margin: 0 0 1.1rem;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none !important;
	box-shadow: none !important;
	color: var(--ashe-wc-moss-deep, #2c3a34);
}

.ep-home-value__icon svg {
	position: relative;
	z-index: 1;
	display: block;
	flex: 0 0 auto;
	width: 2.9rem !important;
	height: 2.9rem !important;
}

body.ashe-woocommerce-child.ashe-dark-mode .ep-home-value__icon {
	color: var(--ashe-dm-accent, #d9c39a);
}

.ep-home-value strong {
	display: block;
	margin: 0 0 0.45rem;
	font-family: var(--ashe-wc-font-serif, "Playfair Display", Georgia, serif);
	font-size: var(--ashe-wc-fs-lead);
	font-weight: 400;
	color: var(--ashe-wc-moss-deep, #2c3a34);
	letter-spacing: -0.01em;
	line-height: 1.25;
}

/* texto descritivo */
.ep-home-value__text,
.ep-home-value > span:not(.ep-home-value__icon) {
	font-family: var(--ashe-wc-font-sans, "Open Sans", system-ui, sans-serif);
	font-size: var(--ashe-wc-fs-btn);
	color: var(--ashe-wc-muted, #555a58);
	line-height: 1.55;
}

/* wpautop residual */
.ep-home-value__icon br {
	display: none !important;
}

/* dark mode */
body.ashe-woocommerce-child.ashe-dark-mode .ep-home-value__icon {
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #c5d4cc;
}

body.ashe-woocommerce-child.ashe-dark-mode .ep-home-value strong {
	color: #e8efe9;
}

body.ashe-woocommerce-child.ashe-dark-mode .ep-home-value__text,
body.ashe-woocommerce-child.ashe-dark-mode .ep-home-value > span:not(.ep-home-value__icon) {
	color: #a8b0aa;
}

/* Final */
.ep-home-final {
	position: relative;
	text-align: center;
	margin: 0;
	padding: var(--ep-home-section-pad-y) 1rem 1rem;
}

.ep-home-final h2 {
	margin: 0 0 0.6rem !important;
	padding: 0 !important;
	font-family: var(--ashe-wc-font-serif, "Playfair Display", Georgia, serif) !important;
	font-size: clamp(1.7rem, 3vw, 2.05rem) !important;
	font-weight: 400 !important;
	color: var(--ashe-wc-ink, #1a1c1b);
}

.ep-home-final h2::after {
	display: none !important;
}

.ep-home-final p {
	margin: 0 auto 1.5rem;
	max-width: 34rem;
	color: var(--ashe-wc-muted, #6f736f);
	line-height: 1.6;
}

.ep-home-final__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
}

@media (max-width: 768px) {
	/* Hero: ver blocos ≤979 / ≤600 acima (sem full-width nos botões). */
	.ep-home {
		--ep-home-section-pad-y: 3rem;
		--ep-home-divider-width: calc(100% - 2rem);
	}

	.ep-home-pillars,
	.ep-home-values {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.ep-home-section {
		padding: 0 0.25rem;
	}

	.ep-home > .ep-home-section {
		padding-top: var(--ep-home-section-pad-y);
		padding-bottom: var(--ep-home-section-pad-y);
	}

	.ep-home-final {
		padding-top: var(--ep-home-section-pad-y);
	}

	/* Produtos na home — mesma grelha da loja, sem padding extra */
	.ep-home .woocommerce,
	.ep-home ul.products {
		width: 100% !important;
		max-width: 100% !important;
	}

	.ep-home ul.products {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 0.85rem 0.6rem !important;
	}
}

@media (max-width: 420px) {
	.ep-home ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 0.8rem 0.5rem !important;
	}
}
