Let $X$ and $Y$ be connected smooth manifolds. Let $L$ be a topological real line bundle over $X\times Y$. Then we know that the isomorphism class of such a line bundle is determined by its first Stiefel-Whitney class $w_1(L)\in H^1(X\times Y,\mathbf{Z}/2\mathbf{Z})$.
I would like to have an example of a line bundle $L$ such $w_1(L)\neq 0$, but such that for all $y\in Y$ one has that $w_1(L)|_{X\times\{y\}}=0\in H^1(X\times\{y\},\mathbf{Z}/2\mathbf{Z})$. I don't see how to construct such a line bundle.