Given the function: $$f(\mathbf{x}, \mathbf{C}) = \prod_{i=1}^N\left(1+\frac{1}{2}\left|x_{i}-0.5\right| + \frac{1}{2}\left|C_{i}-0.5\right|-\frac{1}{2}\left|x_{i}-C_{i}\right|\right) $$ for $\mathbf{x} \in [0,1]^N$ and $\mathbf{C} \in [0,1]^N$.
I want to prove $f(\mathbf{x}, \mathbf{C})$ is locally convex across intervals defined by the constant (fixed) $\mathbf{C}$ and domain breaks at $\{0, 1/2, 1\}^N$. ie: convex in $x_1,x_2 \in [0,0.5]$ then separately convex in $x_1 \in [0.5,0.7]$, $x_2 \in [0,0.5]$, etc. for the example shown below
Relevant Information:
A function $f: \mathbb{R}^N \rightarrow \mathbb{R}$ is convex is $\mathbf{dom} f$ is a convex set and if for all $x,y \in \mathbf{dom} f,$ and $\theta$ with $0 \leq \theta \leq 1,$ we have: $$f(\theta x + (1 - \theta)y) \leq \theta f(x) + (1 - \theta)f(y)$$
If we assume that $f$ is twice differentiable, then $f$ is convex if and only if $\mathbf{dom} f$ is convex and its Hessian is positive semidefinite: for all $x \in \mathbf{dom}f,$ $$\nabla^2 f(x) \succeq 0$$
Now since $\frac{d}{dx_i}\left(\left|x_i - \frac{1}{2}\right|\right) = \frac{x_i - \frac{1}{2}}{\left|x_i - \frac{1}{2}\right|}$ and $\frac{d}{dx_i}\left(\left|x_i - C_{i}\right|\right) = \frac{x_i - C_{i}}{\left|x_i - C_{i}\right|}$ which are undefined at $\frac{1}{2}$ and $C_i$, I can only apply the second order condition (Hessian) on intervals where the minimum does not occur at an end point.
A 2D example with $C_i = [0.7; 0.7]$ is shown below:

Because of this, I would like to apply the definition of convexity $f(\theta x + (1 - \theta)y) \leq \theta f(x) + (1 - \theta)f(y)$ as well as leveraging the triangle inequality $|a + b| \leq |a| + |b|$. However, the term $-\frac{1}{2}\left|x_{i}-C_{i}\right|$ seems to throw a monkey wrench in this approach as well because of the $-\frac{1}{2}$ term out front after applying the triangle inequality to both absolute values (ie: the inequality would switch)
Question:
Is there a simple way to choose $a$ and $b$ in the triangle inequality such that $f(\theta x + (1 - \theta)y) \leq \theta f(x) + (1 - \theta)f(y)$ is easily shown? Or a slightly different approach for functions that are not continuously differentiable? thanks!