{% assign unique_category = "" %}
{% assign category_images = 'https://s3.amazonaws.com/static.northpass.com/Cin7/categories+images/Category+Icon+1.png,https://s3.amazonaws.com/static.northpass.com/Cin7/categories+images/Category+Icon+2.png,https://s3.amazonaws.com/static.northpass.com/Cin7/categories+images/Category+Icon+3.png,https://s3.amazonaws.com/static.northpass.com/Cin7/categories+images/Category+Icon+4.png' | split: ',' %}
{% assign category_counter = 0 %}


<div class="category-carousel">
    {% for course in courses.in_catalog %}
        {% for category in course.categories %}
            {% if category.name contains 'Omni' %}
                {% unless unique_category contains category.name %}    
                    {% include 'category_cards' counter: category_counter %}
                    {% assign unique_category = unique_category | append: category.name %}
                    {% assign category_counter = category_counter | plus: 1 %}
                    {% if category_counter > 3 %}
                        {% assign category_counter = 0 %}
                    {% endif %}
                {% endunless %}
            {% endif %} 
        {% endfor %}
    {% endfor %}
</div>

<script>
    $('.category-carousel').slick({
    infinite: true,
    slidesToShow: 4,
    slidesToScroll: 4,
    prevArrow: "<i class='control-carousel fas fa-chevron-left left-arrow'></i>",
    nextArrow: "<i class='control-carousel fas fa-chevron-right right-arrow'></i>",
    responsive: [
    {
      breakpoint: 1200,
      settings: {
        slidesToShow: 3,
        slidesToScroll: 3,
        infinite: true
      }
    },
    {
      breakpoint: 768,
      settings: {
        slidesToShow: 1,
        slidesToScroll: 1
      }
    }
  ]
    });
</script>

<style>
    .slick-track {
        display: flex;
    }
    .card {
        height: 100%;;
    }
    .card-wrapper {
        padding: 1rem 0;
        height: auto;
    }
    .category-carousel {
        margin: 0 1rem;
    }
</style>