I've created a few products using HTML & CSS only.

An issue I'm facing is that when the content in the exceeds a certain amount, it pushes everything down, making the alignment uneven (see 3rd product in image). How can I go about making so everything is in alignment?

My thoughts are to have the h2 tag have enough space to cover 2 or 3 lines worth (I don't have products longer than 2 lines). So the read more, grams and button will remain fixed and inline.

Any ideas how I can achieve that or any recommendations? I've pasted the codepen, code & image for reference

[Codepen](https://codepen.io/QasimArif/pen/MWKVBRr)

```css
@import url(https://fonts.googleapis.com/css?family=Work+Sans:200,300,400,500);
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  outline: none;
  font-family: "Work Sans", sans-serif;
}

body {
  font-style: normal;
  margin: 0 0 0.5em;
  line-height: 1.4;
}

h2 {
  color: #303457;
  margin: 2rem 0 .5rem;
  font-size: 1.25rem;
  font-weight: 400;
  text-transform: uppercase;
  font-weight: bold;
}

a {
  color: inherit;
}

img {
  display: block;
  border: 0;
  width: 100%;
  height: 200px;
}

.container {
  margin: auto;
  width: 80%;
  padding: 10px;
}

/*** Cards ***/

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: minmax(200px, auto);
  grid-gap: 2rem;
  min-height: 400px;
}

.card {
  /*height: 200px;*/
  /*background: red;*/
  padding: .5rem;
  display: flex;
  /* -webkit-box-orient: vertical; */
  /* -webkit-box-direction: normal; */
  -ms-flex-direction: column;
  flex-direction: column;
  position: relative;
  color: #5d5e5e;
}

.thumbnail img {
  fill: #c7c4c4;
  padding: 1rem;
}

.card-content {
  font-size: 0.9rem;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  text-align: center;
}

.card-content p {
  font-size: 1rem;
  margin: 10px 0px;
}

a.read_more {
  font-size: 16px;
  font-weight: 400;
  text-decoration: none;
}

p.product_grams {
  font-size: 14px;
  font-weight: bold;
}

.btn {
  background-color: #303457;
  border: none;
  color: white;
  padding: 12px 0px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  -webkit-transition: all 1s ease-out;
  -moz-transition: all 0.2s ease-out;
  -o-transition: all 0.2s ease-out;
  -ms-transition: all 0.2s ease-out;
  transition: all 0.2s ease-out;
}

.btn:hover {
  background-color: #3F457E;
  cursor: pointer;
  -webkit-transition: background-color 0.3s;
  -ms-transition: background-color 0.3s;
  transition: background-color 0.3s;
}

.btn:active {
  outline: none;
}
```

```html
<body>
  <div class="container">
    <section class="cards">

      <!--   card 1 -->
      <article class="card">
        <picture class="thumbnail">
          <img class="" src="https://cdn.shopify.com/s/files/1/0425/7008/8604/products/image_8847d478-f0c4-431f-b660-8eb422b8960b.jpg?v=1594121528" alt="" />
        </picture>
        <div class="card-content">
          <h2>American Hard Gums</h2>
          <a href="" class="read_more">Read More</a>
          <p class="product_grams">80g</p>
          <button type="submit" class="btn">Add</button>
        </div>
      </article>

      <!--   card 2 -->
      <article class="card">
        <picture class="thumbnail">
          <img class="" src="https://cdn.shopify.com/s/files/1/0425/7008/8604/products/image_21a4c85d-0672-453e-a7c1-b3e91f124dd4.jpg?v=1594121533" alt="" />
        </picture>
        <div class="card-content">
          <h2>Dracula Teeth</h2>
          <a href="" class="read_more">Read More</a>
          <p class="product_grams">80 grams</p>
          <button type="submit" class="btn">Add</button>
        </div>
      </article>

      <!--   card 3 -->
      <article class="card">
        <picture class="thumbnail">
          <img class="" src="https://cdn.shopify.com/s/files/1/0425/7008/8604/products/image_2cd47a09-ab57-4e6c-bfc6-f9db38d0158c.jpg?v=1594121547" alt="" />
        </picture>
        <div class="card-content">
          <h2>Fizzy Blue Jelly Babies</h2>
          <a href="" class="read_more">Read More</a>
          <p class="product_grams">80 grams</p>
          <button type="submit" class="btn">Add</button>
        </div>
      </article>

      <!--   card 4 -->
      <article class="card">
        <picture class="thumbnail">
          <img class="" src="https://cdn.shopify.com/s/files/1/0425/7008/8604/products/image_35abd0b2-5a5e-489f-b4d1-370fc7ae3bd0.jpg?v=1594121518" alt="" />
        </picture>
        <div class="card-content">
          <h2>Fizzy Cola Bottles</h2>
          <a href="" class="read_more">Read More</a>
          <p class="product_grams">80 grams</p>
          <button type="submit" class="btn">Add</button>
        </div>
      </article>

      <!--   card 5 -->
      <article class="card">
        <picture class="thumbnail">
          <img class="" src="https://cdn.shopify.com/s/files/1/0425/7008/8604/products/image_35008077-9942-4509-8b73-cfcf0ac91966.jpg?v=1594121521" alt="" />
        </picture>
        <div class="card-content">
          <h2>Fizzy Strawberries</h2>
          <a href="" class="read_more">Read More</a>
          <p class="product_grams">80 grams</p>
          <button type="submit" class="btn">Add</button>
        </div>
      </article>

      <!--   card 6 -->
      <article class="card">
        <picture class="thumbnail">
          <img class="" src="https://cdn.shopify.com/s/files/1/0425/7008/8604/products/image_312016b2-59ce-4710-8f92-ba8d52914366.jpg?v=1594121525" alt="" />
        </picture>
        <div class="card-content">
          <h2>Peach Rings</h2>
          <a href="" class="read_more">Read More</a>
          <p class="product_grams">80 grams</p>
          <button type="submit" class="btn">Add</button>
        </div>
      </article>

    </section>

  </div>
</body>
```

[![enter image description here](https://i.stack.imgur.com/Gi09x.png)](https://i.stack.imgur.com/Gi09x.png)