title: My 25% width flex item is taking 100% width after wrapping
body: <p>I am having a small problem. I was always using floating to arrange my elements. I am moving to flexbox, I made some examples and everything was good but I am making an example which things are not going well.</p>
  
  <p>I have a container having between 1 to 12 products, 4 for each line. I made a simple example using only four and it is working, but now I am making an example with five elements, the first row looks fine, but the fifth element take 100% of the products container, but I want it to take only 25%, the sixth takes 25% and so on.</p>
  
  <p>That what I see:</p>
  
  <p><a href="https://i.stack.imgur.com/CLzXr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CLzXr.png" alt="enter image description here"></a></p>
  
  <p>Here is my code :  </p>
  
  <pre><code>&lt;div class="container-2"&gt;
        &lt;div class="item-2"&gt;
          ...
        &lt;/div&gt;
        &lt;div class="item-2 p2-2"&gt;
          ...
        &lt;/div&gt;
        &lt;div class="item-2"&gt;
          ...
        &lt;/div&gt;
        &lt;div class="item-2 pp2"&gt;
          ...
        &lt;/div&gt;
        &lt;div class="item-2 pp2"&gt;
          ...
        &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And That is my CSS : </p>
  
  <pre><code>.container-2 {
    max-width: 1200px;
    margin: 0 auto;
  
    padding: 20px 15px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
  }
  
  .item-2 {
    padding: 0 15px;
    flex: 1 0 25%;
    margin-bottom: 40px;
  }
  </code></pre>