,How to clamp my turret rotation?

][1]][1]
I have a turret that looks to the enemy object it works perfectly, but I don’t know how to clamp the rotation please help!

void Update () 
	{
		if (target == null)
			return;
		
		Vector3 dir = target.position - xPivot.position;
		Quaternion lookRotation = Quaternion.LookRotation(dir);
		Vector3 yRotation = Quaternion.Lerp(yPivot.rotation, lookRotation, Time.deltaTime * turnSpeed).eulerAngles;
		Vector3 xRotation = Quaternion.Lerp(xPivot.rotation, lookRotation, Time.deltaTime * turnSpeed).eulerAngles;
		yPivot.rotation = Quaternion.Euler(0f, yRotation.y, 0f);
		xPivot.rotation = Quaternion.Euler(xRotation.x, yRotation.y, 0f);
	}

The axes’ x,y and z can be clamped individually before the rotation is set for e.g.

yRotation.y = Mathf.Clamp(yRotation.y, min, max);
yPivot.rotation = Quaternion.Euler(0f, yRotation.y, 0f);