How do you rotate camera down 45 degrees no matter the direction?

Here is my code, I’ve been working on this for hours, I just can’t get my head around it.

   // when user hits c key, the camera points down 45 degrees towards terrain
    if (Input.GetKey(KeyCode.C))
    { 

        //Quaternion wtf = transform.rotation;
        transform.eulerAngles = new Vector3(1, 0, 0);
        //float tiltAroundZ = Input.GetAxis("Horizontal") * 135;
        //float tiltAroundX = Input.GetAxis("Vertical") * 135;
        //Quaternion target = Quaternion.Euler(-tiltAroundX, 0, tiltAroundZ);
        //transform.rotation = Quaternion.Slerp(transform.rotation, target, Time.deltaTime * 1.0f);
        // Get a copy of your forward vector
        Vector3 forward = transform.forward;
        // Zero out the y component of your forward vector to only get the direction in the X,Z plane
        //forward.y = 0;
        //float headingAngle = Quaternion.LookRotation(forward).eulerAngles.y;
        //transform.rotation = Quaternion.LookRotation()
        transform.rotation = Quaternion.Euler(45, transform.rotation.y, transform.rotation.z);
        //Quaternion testing = new Quaternion(0.5f, 0, 0, 0);
        //testing.x = 0.5f;
        //transform.rotation = wtf * testing;
        //transform.rotation = new Quaternion(0.5f, camRotationY, 0, 0);
        //transform.Rotate(new Vector3(0.5f, 0, 0));
        //and if (Mathf.Round(transform.eulerAngles.z) == 180) { transform.Rotate(new Vector3(0, 0, -180)); }
        //transform.rotation = testing;//Quaternion.Slerp(transform.rotation, transform.rotation + Vector3.down, 2.0f);
        //camRotationX += testing.x * Time.deltaTime;
    }

Try this:
transform.Rotate (Vector3.right, 45f, Space.Self);

Vector3.Rotate(-45, 0, 0);
//or
Vector3.Rotat(0,0,-45);