/**
 * Ste Beauty — página inicial (carregado somente na página inicial).
 * Referência aprovada: brand/references/homepage-referencia.png
 */

/* ---------- Hero ---------- */

/* Sem o vão padrão entre partes do template: o hero encosta no cabeçalho (referência). */
.wp-site-blocks > main.sb-home {
	margin-block-start: 0;
}

.sb-hero {
	min-height: clamp(440px, 34vw, 540px) !important;
	color: var(--wp--preset--color--cream);
}

.sb-hero .wp-block-cover__inner-container {
	width: 100%;
	color: var(--wp--preset--color--cream);
}

/* A assinatura é posicionada em relação ao banner inteiro (não à coluna de texto). */
.sb-hero .wp-block-cover__inner-container,
.sb-hero__inner {
	position: static;
}

.sb-hero__inner {
	margin-inline: auto;
}

.sb-hero__content {
	position: relative;
	z-index: 2;
}

.sb-hero__content {
	max-width: 36rem;
}

.sb-hero__content > * {
	margin-block: 0;
}

.sb-hero .sb-eyebrow {
	font-size: clamp(0.8125rem, 0.6rem + 0.4vw, 1.0625rem);
	letter-spacing: 0.2em;
}

.sb-hero__title {
	margin-top: clamp(0.75rem, 0.5rem + 0.6vw, 1.25rem) !important;
	color: var(--wp--preset--color--white) !important;
	font-size: clamp(2.5rem, 0.9rem + 4.9vw, 5.75rem) !important;
	font-weight: 500;
	line-height: 1.02;
	letter-spacing: -0.02em;
}

.sb-hero__text {
	margin-top: clamp(1rem, 0.6rem + 1vw, 1.75rem) !important;
	font-size: clamp(1.0625rem, 0.8rem + 0.7vw, 1.625rem);
	line-height: 1.4;
}

.sb-hero__actions {
	margin-top: clamp(1.25rem, 0.8rem + 1.2vw, 2.25rem) !important;
	gap: 0.75rem;
}

/* Botão pílula (referência) */
.sb-btn-pill .wp-block-button__link {
	border-radius: var(--wp--custom--radius--button);
	padding: 0.95rem 1.75rem;
	font-size: clamp(0.9375rem, 0.8rem + 0.35vw, 1.1875rem);
}

/* Assinatura manuscrita (decorativa, mas legível: contraste 9,4:1) */
.sb-hero__script {
	position: absolute;
	z-index: 2;
	right: clamp(1rem, 4.5vw, 4.5rem);
	top: clamp(1.75rem, 4vw, 3.75rem); /* alto à direita: a foto/ilustração fica embaixo */
	margin: 0;
	color: var(--wp--preset--color--rose);
	font-family: var(--wp--preset--font-family--allura);
	font-size: clamp(2.25rem, 1rem + 3.4vw, 4.75rem);
	line-height: 0.95;
	transform: rotate(-12deg);
	transform-origin: right bottom;
	text-shadow: 0 1px 14px rgb(74 30 40 / 55%); /* legível também sobre o lado claro da foto */
}

.sb-hero__script::after {
	content: "";
	display: block;
	width: 70%;
	height: 2px;
	margin: 0.25em 0 0 auto;
	background: currentColor;
	border-radius: 2px;
	opacity: 0.9;
	transform: rotate(-6deg);
}

/* Celular: foto em cima, texto embaixo sobre vinho (sem texto sobre a foto) */
@media (max-width: 599px) {
	.sb-hero {
		display: flex !important;
		flex-direction: column;
		align-items: stretch !important;
		justify-content: flex-start !important;
		min-height: 0 !important;
		padding: 0 !important;
		background: var(--wp--preset--color--primary);
	}

	.sb-hero .wp-block-cover__image-background {
		position: relative !important;
		inset: auto !important;
		height: auto !important;
		aspect-ratio: 16 / 10; /* era 4:3 — reduz ~40px e mantém o botão acima da barra inferior */
		object-position: 82% 50% !important;
	}

	.sb-hero .wp-block-cover__background {
		background: linear-gradient(180deg, rgb(74 30 40 / 0%) 0%, rgb(74 30 40 / 0%) 62%, #4a1e28 100%) !important;
		opacity: 1 !important;
		height: calc(100vw * 10 / 16 + 2px);
		bottom: auto !important;
	}

	.sb-hero .wp-block-cover__inner-container {
		position: relative;
		padding: 0 1rem 2.25rem;
		margin-top: -0.75rem; /* o texto fica abaixo da foto (o gradiente só faz a transição) */
	}

	/* No fluxo normal (nunca sobre o texto), alinhada à direita abaixo do botão */
	.sb-hero__script {
		position: static;
		margin: 1.25rem 0.5rem 0 auto;
		width: max-content;
		font-size: 2.25rem;
		transform: rotate(-8deg);
	}
}

/* ---------- Âncoras do menu (/#secao) ----------
 * ≥ 782px o cabeçalho é fixo: a seção não pode ficar escondida atrás dele. */
@media (min-width: 782px) {
	.sb-home [id] {
		scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 11rem);
	}
}

@media (prefers-reduced-motion: no-preference) {
	html:has(.sb-home) {
		scroll-behavior: smooth;
	}
}

/* ---------- Como funciona (lista numerada) ---------- */

.sb-steps {
	display: grid;
	gap: clamp(1.25rem, 0.8rem + 1.2vw, 2rem);
	margin: 0 auto;
	padding: 0;
	list-style: none;
	counter-reset: sb-step;
}

.sb-steps > li {
	position: relative;
	display: grid;
	grid-template-columns: 4.5rem minmax(0, 1fr);
	column-gap: 1rem;
	align-items: start;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--base);
	line-height: 1.5;
	counter-increment: sb-step;
}

/* Número no círculo (decorativo: a lista <ol> já anuncia a ordem) */
.sb-steps > li::before {
	content: counter(sb-step);
	grid-row: 1 / span 2;
	display: grid;
	place-items: center;
	width: 4.5rem;
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--wp--preset--color--blush);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--gold), 0 0 0 6px var(--wp--preset--color--base), 0 0 0 7px var(--wp--preset--color--border);
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 2rem;
	line-height: 1;
}

.sb-steps > li strong {
	display: block;
	margin: 0.6rem 0 0.25rem;
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: clamp(1.25rem, 1rem + 0.6vw, 1.5rem);
	font-weight: 500;
	line-height: 1.2;
}

@media (min-width: 600px) {
	.sb-steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: clamp(1.5rem, 1rem + 2vw, 3rem);
	}
}

/* Desktop: 4 em linha, círculo em cima, ligados por um fio dourado */
@media (min-width: 1024px) {
	.sb-steps {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.sb-steps > li {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
		text-align: center;
	}

	.sb-steps > li::before {
		grid-row: auto;
		width: clamp(5.5rem, 3rem + 3vw, 7rem);
		font-size: clamp(2.25rem, 1.5rem + 1vw, 2.75rem);
	}

	.sb-steps > li:not(:last-child)::after {
		content: "";
		position: absolute;
		top: calc(clamp(5.5rem, 3rem + 3vw, 7rem) / 2);
		left: calc(50% + clamp(5.5rem, 3rem + 3vw, 7rem) / 2 + 1rem);
		width: calc(100% - clamp(5.5rem, 3rem + 3vw, 7rem) - 2rem + clamp(1.25rem, 0.8rem + 1.2vw, 2rem));
		height: 1px;
		background: var(--wp--preset--color--gold);
	}

	.sb-steps > li strong {
		margin-top: 1.25rem;
	}
}

/* ---------- Vídeos reais (9:16) ----------
 * Celular: carrossel com encaixe (~1,3 visíveis); ≥ 782px: 3 em linha. */

.sb-videos {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: min(62%, 16rem);
	gap: clamp(0.75rem, 0.4rem + 1.2vw, 1.5rem);
	overflow-x: auto;
	padding-bottom: 0.5rem;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
}

.sb-videos > * {
	margin: 0 !important;
	scroll-snap-align: start;
}

@media (min-width: 782px) {
	.sb-videos {
		grid-auto-flow: row;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		max-width: 54rem !important; /* alignwide define a largura larga; aqui, mais estreito */
		margin-inline: auto !important;
		overflow: visible;
	}
}

.sb-videos .wp-block-video video,
.sb-video-pendente {
	display: block;
	width: 100%;
	aspect-ratio: 9 / 16;
	border-radius: var(--wp--custom--radius--lg);
	background: var(--wp--preset--color--primary);
	object-fit: cover;
}

.sb-videos .wp-block-video figcaption {
	margin-top: 0.5rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
	text-align: center;
}

/* Marcador de vídeo pendente (somente ambiente local) */
.sb-video-pendente {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 1.5rem;
	border: 2px dashed var(--wp--preset--color--blush);
	background: var(--wp--preset--color--base);
	text-align: center;
}

.sb-video-pendente::before {
	content: "";
	width: 3.5rem;
	height: 3.5rem;
	background: var(--wp--preset--color--accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m10 8.5 5.5 3.5-5.5 3.5v-7Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m10 8.5 5.5 3.5-5.5 3.5v-7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sb-video-pendente__rotulo {
	margin: 0;
	color: var(--wp--preset--color--accent-strong);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.sb-video-pendente__titulo {
	margin: 0;
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.2;
}

/* ---------- Perguntas frequentes (bloco Detalhes) ---------- */

.sb-faq {
	border-top: 1px solid var(--wp--preset--color--border);
}

.sb-faq > .wp-block-details {
	margin: 0 !important;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.sb-faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 3.5rem;
	padding: 0.75rem 0;
	color: var(--wp--preset--color--primary);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem);
	line-height: 1.3;
	list-style: none;
	cursor: pointer;
}

.sb-faq summary::-webkit-details-marker {
	display: none;
}

/* Sinal de + que vira − (decorativo; o estado aberto/fechado é anunciado pelo navegador) */
.sb-faq summary::after {
	content: "";
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	background:
		linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
		linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
	transition: transform var(--wp--custom--transition);
}

.sb-faq details[open] > summary::after {
	background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat;
}

.sb-faq details > :not(summary) {
	margin: 0 0 1.25rem !important;
	color: var(--wp--preset--color--contrast);
	line-height: 1.6;
}

/* Prévia local de pergunta pendente: espaço para o aviso acima da pergunta */
.sb-faq .sb-previa-validacao {
	padding-top: 1.5rem;
}

/* ---------- Categorias circulares (padrão disponível; fora da página inicial) ---------- */

.sb-home-cats {
	background: var(--wp--preset--color--base);
}

/* ---------- Destaques ---------- */

.sb-section-head {
	margin-bottom: clamp(1.25rem, 0.8rem + 1vw, 2rem) !important;
}

.sb-section-head .sb-heading-lines {
	margin: 0;
	font-size: clamp(1.75rem, 1rem + 2.4vw, 3.25rem);
	font-weight: 500;
}

.sb-section-head__text {
	margin: 0.5rem 0 0 !important;
	color: var(--wp--preset--color--contrast);
	font-size: clamp(0.9375rem, 0.8rem + 0.4vw, 1.25rem);
}

/* Grade: 2 colunas (celular), 3 (tablet), 4 (desktop) */
.sb-product-grid .wc-block-product-template {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: clamp(1.25rem, 0.6rem + 1.6vw, 1.75rem) clamp(0.75rem, 0.4rem + 1.2vw, 1.75rem) !important;
}

.sb-product-grid .wc-block-product-template > .wc-block-product {
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
}

@media (min-width: 782px) {
	.sb-product-grid .wc-block-product-template {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (min-width: 1024px) {
	.sb-product-grid .wc-block-product-template {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
	}
}

/* Scoops e combos: até 3 por linha, centralizados e mais estreitos */
.sb-product-grid--3 {
	max-width: 64rem;
	margin-inline: auto !important;
}

@media (min-width: 782px) {
	.sb-product-grid--3 .wc-block-product-template {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

/* ---------- Garantia e corações (#bonus — só após validação jurídica) ---------- */

.sb-bonus {
	display: grid;
	gap: clamp(1rem, 0.6rem + 1vw, 1.5rem);
	max-width: 64rem;
	margin-inline: auto !important;
}

@media (min-width: 782px) {
	.sb-bonus {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.sb-bonus__card {
	margin: 0 !important;
	padding: clamp(1.5rem, 1rem + 1.6vw, 2.5rem);
	border-radius: var(--wp--custom--radius--lg);
}

.sb-bonus__title {
	display: flex;
	gap: 0.6rem;
	align-items: center;
	margin: 0;
	font-size: clamp(1.375rem, 1rem + 1vw, 1.875rem) !important;
	font-weight: 500;
	line-height: 1.15;
}

.sb-bonus__card--rose .sb-bonus__title::before {
	background: var(--wp--preset--color--gold-strong);
}

.sb-bonus__card--wine .sb-bonus__title::before {
	background: var(--wp--preset--color--gold);
}

.sb-bonus__text {
	margin: 0.75rem 0 0 !important;
	font-size: clamp(0.9375rem, 0.85rem + 0.3vw, 1.0625rem);
	line-height: 1.55;
}

.sb-bonus__card--rose .sb-bonus__title {
	color: var(--wp--preset--color--primary);
}

.sb-bonus__card--rose .sb-bonus__text {
	color: var(--wp--preset--color--contrast);
}

.sb-bonus__card--wine .sb-bonus__title,
.sb-bonus__card--wine .sb-bonus__text {
	color: var(--wp--preset--color--cream);
}

.sb-bonus__nota {
	margin-top: var(--wp--preset--spacing--30) !important;
	font-size: 0.875rem;
	color: var(--wp--preset--color--contrast);
}
