.eabg-wrapper {
	position: relative;
	overflow: hidden;
}

.eabg-wrapper > .eabg-canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	z-index: 0;
	pointer-events: none;
}

/* Capa de grano (Granular Glow / Grain Noise): textura repetida que la
   GPU mueve con transform — no repinta nada. El inset negativo lo pone
   el JS según el tamaño del tile. */
.eabg-grain {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-repeat: repeat;
	image-rendering: pixelated;
	will-change: transform;
}

/* El contenido real de la columna/container debe quedar por encima del canvas */
.eabg-wrapper > .elementor-widget-wrap,
.eabg-wrapper > .elementor-column-wrap {
	position: relative;
	z-index: 1;
}

/* ---------- Modo Fixed (como background-attachment: fixed) ----------
   El canvas mide lo que la ventana (no lo que la sección), queda quieto
   mientras se hace scroll, y clip-path lo recorta a la forma de la
   sección. Una sección de 4000px de alto ahora dibuja solo ~1 pantalla. */
.eabg-wrapper.eabg-wrapper--fixed {
	overflow: hidden;
	overflow: clip; /* no crea contenedor de scroll → el fallback sticky funciona */
}

.eabg-fixed-clip {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	-webkit-clip-path: inset(0);
	clip-path: inset(0);
}

.eabg-fixed-clip > .eabg-canvas {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	display: block;
	pointer-events: none;
}

.eabg-fixed-clip > .eabg-grain {
	position: fixed;
}

/* Fallback: si un ancestro tiene transform/filter (animaciones de
   Elementor, efectos de movimiento…), position:fixed se rompe; ahí se
   usa sticky, que se comporta casi igual. */
.eabg-fixed-clip--sticky > .eabg-canvas {
	position: sticky;
	top: 0;
}

.eabg-fixed-clip--sticky > .eabg-grain {
	position: absolute;
}

/* Fondo a nivel Página/Sitio (Ajustes de Página o Kit): se inyecta
   como primer hijo de <body>, así que no puede depender de "relative"
   como el resto — necesita cubrir toda la ventana por su cuenta. */
.eabg-body-wrapper {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	overflow: hidden;
	z-index: 0;
	pointer-events: none;
}

.eabg-editor-placeholder {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 12px;
	font-family: sans-serif;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
	background: repeating-linear-gradient(
		45deg,
		rgba(255, 255, 255, 0.04),
		rgba(255, 255, 255, 0.04) 10px,
		rgba(255, 255, 255, 0.08) 10px,
		rgba(255, 255, 255, 0.08) 20px
	);
	pointer-events: none;
}
