How to limit Camera rotation on the y axis?

I’m making a third person game and I have this camera script so that the camera can follow and rotate around the player on the x and y axis. The problem is that the camera rotates all around the player on the y axis. here is my script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class camr4 : MonoBehaviour {

  public float turnSpeed = 4.0f;
  public Transform Player;

  private Vector3 offset;

  void Start () 
  {
      offset = new Vector3(Player.position.x, Player.position.y + 3.5f, Player.position.z + 4.5f); 
	  Cursor.lockState = CursorLockMode.Locked;
	  Cursor.visible = false;
  }

  void LateUpdate()
  {
      offset = Quaternion.AngleAxis (Input.GetAxis("Mouse X") * turnSpeed, Vector3.up) * offset; 
	  offset = Quaternion.AngleAxis (Input.GetAxis("Mouse Y") * turnSpeed, Vector3.right) * offset;
      transform.position = Player.position + offset; 
      transform.LookAt(Player.position);
  }

}

use clam method to restrain value within some range or use if condition