/* Pie de página del sitio — se inserta desde partials/footer.html con tools/sync-footer.js */

.site-footer {
	--footer-bg: #6f0000;
	--footer-bg-bottom: #560000;
	--footer-text: rgba(255, 255, 255, .82);
	--footer-heading: #fff;
	--footer-line: rgba(255, 255, 255, .16);
	--footer-accent: #ffd27a;

	background: var(--footer-bg);
	color: var(--footer-text);
	font-family: Ubuntu, sans-serif;
	font-size: 15px;
	line-height: 1.55;
	position: relative;
	z-index: 2;
}

.site-footer a {
	color: inherit;
	text-decoration: none;
	transition: color .2s, background-color .2s, opacity .2s;
}

.site-footer a:hover {
	color: #fff;
}

.site-footer a:focus-visible {
	outline: 2px solid var(--footer-accent);
	outline-offset: 3px;
	border-radius: 3px;
}

.site-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer p {
	margin: 0;
}

.site-footer__inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 56px 24px 40px;
	display: grid;
	grid-template-columns: 1.2fr .9fr .9fr 1.6fr 1fr;
	gap: 40px;
}

.site-footer__col {
	min-width: 0;
}

.site-footer__title {
	color: var(--footer-heading);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	margin-bottom: 18px !important;
}

/* Marca */
.site-footer__logo {
	display: inline-block;
	margin-bottom: 14px;
}

.site-footer__logo img {
	display: block;
	width: 96px;
	height: auto;
}

.site-footer__tagline {
	max-width: 260px;
	margin-bottom: 20px !important;
}

.site-footer__social {
	display: flex;
	gap: 10px;
}

.site-footer__social a {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .1);
	color: #fff;
}

.site-footer__social a:hover {
	background: #fff;
	color: var(--footer-bg);
}

.site-footer__social svg {
	width: 19px;
	height: 19px;
	fill: currentColor;
}

/* Enlaces */
.site-footer__links li + li {
	margin-top: 9px;
}

.site-footer__links a {
	display: inline-block;
	padding: 2px 0;
}

.site-footer__links a[aria-current="page"] {
	color: #fff;
	font-weight: 700;
}

/* Contacto */
.site-footer__contact {
	font-style: normal;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.site-footer__contact-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	overflow-wrap: anywhere;
}

.site-footer__contact-item svg {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 3px;
	fill: none;
	stroke: var(--footer-accent);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.site-footer__contact-item svg.is-fill {
	fill: var(--footer-accent);
	stroke: none;
}

.site-footer__contact-item:hover span {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Planta */
.site-footer__plant {
	display: block;
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}

.site-footer__plant img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform .4s;
}

.site-footer__plant:hover img {
	transform: scale(1.04);
}

.site-footer__plant-cta {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 28px 14px 10px;
	background: linear-gradient(transparent, rgba(0, 0, 0, .7));
	color: #fff;
	font-weight: 700;
	font-size: 14px;
}

/* Barra inferior */
.site-footer__bottom {
	background: var(--footer-bg-bottom);
	border-top: 1px solid var(--footer-line);
	font-size: 13px;
}

.site-footer__bottom-inner {
	max-width: 1240px;
	margin: 0 auto;
	/* espacio a la derecha para el botón flotante de WhatsApp */
	padding: 16px 96px 16px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
}

.site-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
}

.site-footer__legal a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Responsive */
@media (max-width: 1100px) {
	.site-footer__inner {
		grid-template-columns: repeat(3, 1fr);
	}

	.site-footer__brand {
		grid-column: 1 / -1;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 16px 24px;
	}

	.site-footer__brand .site-footer__logo,
	.site-footer__brand .site-footer__tagline {
		margin-bottom: 0 !important;
	}

	.site-footer__tagline {
		max-width: 420px;
	}
}

@media (max-width: 767px) {
	.site-footer__inner {
		grid-template-columns: 1fr 1fr;
		gap: 32px 20px;
		padding: 40px 20px 32px;
	}

	.site-footer__inner > .site-footer__col:nth-child(n+4) {
		grid-column: 1 / -1;
	}

	.site-footer__plant {
		max-width: 320px;
	}

	.site-footer__contact-item {
		padding: 4px 0;
	}

	.site-footer__bottom-inner {
		flex-direction: column;
		align-items: flex-start;
		padding: 18px 20px 84px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-footer *,
	.site-footer a {
		transition: none !important;
	}

	.site-footer__plant:hover img {
		transform: none;
	}
}

/* Mapa a ancho completo, solo en contactenos.html */
.contact-map {
	line-height: 0;
}

.contact-map iframe {
	display: block;
	width: 100%;
	height: 420px;
	border: 0;
}

@media (max-width: 767px) {
	.contact-map iframe {
		height: 320px;
	}
}

/* Botón flotante de WhatsApp (sustituye al widget "Chaty": mismo aspecto, sin JavaScript).
   Marcado en partials/whatsapp.html, insertado por tools/defer-scripts.js */
.wa-float {
	position: fixed;
	right: 25px;
	bottom: 25px;
	z-index: 9999;
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	font-family: Helvetica, Arial, sans-serif;
	-webkit-tap-highlight-color: transparent;
}

.wa-float__icon {
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: #49e670;
	color: #fff;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .25);
	transition: transform .2s ease, box-shadow .2s ease;
	animation: wa-jump 1s ease 3s 2;
}

.wa-float__icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.wa-float__label {
	position: relative;
	padding: 5px 12px;
	border-radius: 10px;
	background: rgb(97, 222, 126);
	color: #fff;
	font-size: 15px;
	line-height: 20px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.wa-float__label::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -6px;
	margin-top: -6px;
	border: 6px solid transparent;
	border-right: 0;
	border-left-color: rgb(97, 222, 126);
}

.wa-float:hover .wa-float__icon,
.wa-float:focus-visible .wa-float__icon {
	transform: scale(1.08);
	box-shadow: 0 5px 16px rgba(0, 0, 0, .3);
}

.wa-float:focus-visible {
	outline: none;
}

.wa-float:focus-visible .wa-float__icon {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

@keyframes wa-jump {
	0%, 100% { transform: translateY(0); }
	30% { transform: translateY(-14px); }
	50% { transform: translateY(0); }
	70% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
	.wa-float__icon { animation: none; transition: none; }
}

/* ---- Transición suave entre páginas (paso 9) ----
   Navegadores compatibles (Chrome/Edge 126+, Safari 18.2+) funden una página con la siguiente
   en vez de mostrar un parpadeo en blanco. Los demás navegan como siempre.
   La cabecera y el botón de WhatsApp son iguales en todas las páginas: se nombran para que
   queden quietos y solo se funda el contenido. */
@view-transition {
	navigation: auto;
}

/* view-transition-name convierte la cabecera en su propia capa: sin position/z-index propios,
   su z-index interno (10) quedaría encerrado y los banners (z-index 1) la taparían. */
.elementor-location-header {
	view-transition-name: cabecera;
	position: relative;
	z-index: 10;
}

.wa-float {
	view-transition-name: whatsapp;
}

::view-transition-old(root),
::view-transition-new(root) {
	animation-duration: .25s;
}

@media (prefers-reduced-motion: reduce) {
	@view-transition {
		navigation: none;
	}
}

/* ---- Navegación de productos (paso 10) ---- */

/* Submenú "Productos" de la cabecera (escritorio). Elementor/SmartMenus lo abre y lo cierra. */
.elementor-location-header .elementor-nav-menu--main .sub-menu {
	min-width: 230px !important;
	padding: 8px 0;
	border-radius: 0 0 8px 8px;
	/* !important: Elementor pone aquí un rojo semitransparente con un selector más específico */
	background: #6f0000 !important;
	box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}

.elementor-location-header .elementor-nav-menu--main .sub-menu a.elementor-sub-item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	padding: 9px 18px;
	border: 0;
	background: transparent;
	color: #fff;
	font-family: Roboto, sans-serif;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

.elementor-location-header .elementor-nav-menu--main .sub-menu a.elementor-sub-item:hover,
.elementor-location-header .elementor-nav-menu--main .sub-menu a.elementor-sub-item:focus-visible,
.elementor-location-header .elementor-nav-menu--main .sub-menu a.elementor-sub-item.highlighted {
	background: rgba(255, 255, 255, .1);
	color: #ffd27a;
}

.menu-item-tag {
	font-size: 12px;
	font-weight: 400;
	opacity: .75;
}

.elementor-nav-menu--main .menu-item-todas {
	margin-top: 4px;
	border-top: 1px solid rgba(255, 255, 255, .18);
}

/* Menú del móvil (ventana emergente): las líneas aparecen sangradas bajo "Productos" */
.elementor-location-popup .sub-menu a.elementor-sub-item {
	padding-left: 34px !important;
	font-size: .92em;
}

.elementor-location-popup .menu-item-tag {
	margin-left: 6px;
}

/* Ruta de navegación y accesos a la misma línea (páginas de producto y de línea) */
.prod-nav {
	/* por encima del contenido siguiente: la foto del producto sube 67px (margen negativo) y su
	   zona transparente tapaba los últimos botones; por debajo de la cabecera (z-index 10) */
	position: relative;
	z-index: 2;
	max-width: 1140px;
	margin: 0 auto;
	padding: 14px 20px 6px;
	font-family: Ubuntu, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

.prod-nav ol,
.prod-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.prod-nav__crumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	color: #666;
}

.prod-nav__crumbs li + li::before {
	content: "›";
	margin: 0 8px;
	color: #aaa;
}

.prod-nav a {
	color: #6f0000;
	text-decoration: none;
}

.prod-nav__crumbs a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.prod-nav__crumbs [aria-current] {
	color: #333;
	font-weight: 500;
}

.prod-nav__siblings {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin-top: 12px;
}

.prod-nav__label {
	color: #666;
}

.prod-nav__siblings ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.prod-nav__chip {
	display: inline-block;
	padding: 5px 14px;
	border: 1px solid #d9bcbc;
	border-radius: 999px;
	background: #fff;
	color: #6f0000;
	font-size: 13px;
	font-weight: 500;
	transition: background-color .2s, color .2s, border-color .2s;
}

a.prod-nav__chip:hover,
a.prod-nav__chip:focus-visible {
	border-color: #6f0000;
	background: #6f0000;
	color: #fff;
}

.prod-nav__chip.is-current {
	border-color: #6f0000;
	background: #6f0000;
	color: #fff;
}

.prod-nav a:focus-visible {
	outline: 2px solid #6f0000;
	outline-offset: 2px;
}

/* Respaldo: el submenú se abre al pasar el ratón y al llegar con el teclado (Tab), aunque
   SmartMenus no haya detectado ratón. !important para ganar a su display:none en línea. */
@media (hover: hover) {
	.elementor-location-header .elementor-nav-menu--main .menu-item-has-children:hover > .sub-menu {
		display: block !important;
	}
}

.elementor-location-header .elementor-nav-menu--main .menu-item-has-children:focus-within > .sub-menu {
	display: block !important;
}

/* Indicador ▾ de "Productos": SmartMenus añade un hueco vacío (.sub-arrow, 10px) que desplazaba
   el resto del menú. Se dibuja un chevron pequeño dentro del relleno del propio enlace, sin
   mover nada. */
.elementor-location-header .elementor-nav-menu--main a.has-submenu .sub-arrow {
	position: absolute;
	top: 50%;
	right: 2px;
	width: 6px;
	height: 6px;
	margin: -5px 0 0;
	padding: 0 !important;
	border: solid currentColor;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	opacity: .8;
}

.elementor-location-header .elementor-nav-menu--main a.has-submenu .sub-arrow > * {
	display: none;
}

/* ---- Títulos principales <h1> (paso SEO) ---- */

/* Textos del banner convertidos en <h1>: mismo aspecto que cuando eran <div>. Selector de baja
   prioridad (:where) para que las reglas de cada capa (tamaño, color, posición) sigan mandando,
   y anulando lo que el tema aplica a cualquier h1 (márgenes, negrita, tipografía). */
:where(.rsl) h1.rsl-layer {
	margin: 0;
	padding: 0;
	border: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
}

/* Visualmente oculto: lo leen buscadores y lectores de pantalla, no se ve en pantalla */
.vh {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Títulos de Elementor convertidos de h2 a h1: el tema da a h1 una altura de línea 1,4 y a h2 1,3;
   se mantiene 1,3 para que el título se vea exactamente igual que antes. */
.elementor-widget-heading h1.elementor-heading-title {
	line-height: 1.3;
}

/* "Planta principal" (Contáctenos) pasó de h1 a h2: conserva el tamaño que tenía como h1 */
.site-content h2.h-como-h1 {
	font-size: 40px;
	line-height: 1.4;
}

@media (max-width: 921px) {
	.site-content h2.h-como-h1 {
		font-size: 30px;
	}
}

/* Tabla "Composición garantizada" (tools/product-facts.js): el primer nutriente ya no va en la fila
   de encabezado y cada nutriente es el encabezado de su fila (<th scope="row">). Estas reglas la dejan
   igual que antes: filas alternas con los colores de la línea (--comp-a / --comp-b, en la propia tabla)
   y la celda del nutriente con el mismo aspecto que una celda normal. */
.eael-data-table.tabla-comp tbody > tr:nth-child(odd) > * { background: var(--comp-a) !important; }
.eael-data-table.tabla-comp tbody > tr:nth-child(even) > * { background: var(--comp-b) !important; }
.eael-data-table.tabla-comp tbody th,
.eael-data-table.tabla-comp tbody td {
	color: #fff;
	text-align: left;
	padding: 10px;
	border: 1px solid #fff;
	background-clip: padding-box;
	font-family: Ubuntu, Sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
}

/* la antigua fila de encabezado medía 1 px más (letra de 16 px): se mantiene en la primera fila */
.eael-data-table.tabla-comp tbody > tr:first-child > * { font-size: 16px; }
.eael-data-table.tabla-comp tbody > tr:first-child span { font-size: 15px; }

/* en el móvil las filas de datos iban centradas (la antigua fila de encabezado, a la izquierda) */
@media (max-width: 767px) {
	.eael-data-table.tabla-comp tbody > tr:not(:first-child) > * { text-align: center; }
}

/* Frase de resumen del producto (bajo la descripción) */
.prod-resumen { margin-top: 1em; }
