/*
 * Cabecera de la portada: transparente sobre el hero y sólida (como en el resto de la web) al hacer scroll.
 * La clase bcn-cabecera-solida la pone assets/js/cabecera.js.
 */

html body.bcn-home .site-header {
	position: fixed;
	inset-block-start: 0;
	inset-inline: 0;
	z-index: 100;
	background-color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
	html body.bcn-home .site-header,
	html body.bcn-home .site-logo img,
	html body.bcn-home .main-navigation .main-nav ul li a {
		transition: background-color 0.3s ease, color 0.3s ease, filter 0.3s ease;
	}
}

html body.bcn-home .site-content {
	padding-block-start: 0;
}

html body.bcn-home .site-main {
	margin: 0;
}

html body.bcn-home .site-content .inside-article,
html body.bcn-home .site-content .entry-content {
	padding: 0;
	margin: 0;
}

/* Cabecera sólida: tras el scroll o con el menú móvil abierto. */
html body.bcn-home.bcn-cabecera-solida .site-header,
html body.bcn-home .site-header:has(.main-navigation.toggled) {
	background-color: var(--wp--preset--color--crema);
}

/* Cabecera transparente: logo, menú y carrito en blanco. */
html body.bcn-home:not(.bcn-cabecera-solida) .site-header:not(:has(.main-navigation.toggled)) .site-logo img {
	filter: brightness(0) invert(1);
}

html body.bcn-home:not(.bcn-cabecera-solida) .site-header:not(:has(.main-navigation.toggled)) .main-navigation .main-nav ul li a,
html body.bcn-home:not(.bcn-cabecera-solida) .site-header:not(:has(.main-navigation.toggled)) .bcn-carrito,
html body.bcn-home:not(.bcn-cabecera-solida) .site-header:not(:has(.main-navigation.toggled)) .menu-toggle {
	color: var(--wp--preset--color--blanco);
}

/*
 * Sin relleno lateral en el contenedor de la portada, los bloques «ancho amplio» de WordPress (margen negativo de
 * 30 px pensado para un contenedor con relleno) se salían de la pantalla en móvil. Se anula ese margen y se deja
 * un margen lateral para el texto; el hero sigue a todo el ancho.
 */
html body.bcn-home .entry-content > .alignwide {
	max-width: 100%;
	margin-inline: 0;
}

html body.bcn-home .entry-content > :not(.alignfull) {
	box-sizing: border-box;
	padding-inline: var(--wp--preset--spacing--20);
}
