/** Shopify CDN: Minification failed

Line 136:0 Unexpected "<"
Line 146:7 Expected identifier but found "%"
Line 147:8 Unexpected "{"
Line 147:9 Expected identifier but found "%"
Line 148:8 Unexpected "{"
Line 148:9 Expected identifier but found "%"
Line 149:10 Unexpected "<"
Line 153:19 Expected identifier but found "%"
Line 154:20 Unexpected "{"
Line 154:21 Unexpected "{"
... and 17 more hidden warnings

**/
/* ===== Optimierter Stil NUR für Collection-Kacheln (nicht für Produkte) ===== */
.card--collection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 0;
  margin: 0 auto;
  min-height: 130px;
}

/* Kartenhöhe für einheitliches Layout */
.card--collection .card__inner {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Kreisformat fürs Collection-Bild */
.card--collection .card__media {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 0 !important;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card--collection .card__media img {
  object-fit: contain;
  width: 90%;
  height: 90%;
  padding: 6px;
  border-radius: 50%;
  background: white;
}

.card--collection .media {
  position: relative;
  height: auto;
  width: 100%;
}

.card--collection .card__content {
  margin-top: 0 !important;
  padding-top: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.card--collection .card__heading {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 !important;
  padding-top: 0.2rem;
  color: #1A4354;
  text-align: center;
  line-height: 1.2;
}

.card--collection .card__heading a {
  display: inline-block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.card--collection .card__information {
  width: 100%;
  display: flex;
  justify-content: center;
  text-align: center;
  margin: 0 !important;
  padding: 0 !important;
}

.card--collection .card__heading::after {
  content: none !important;
}

.card--collection-link {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== Karussell-Layout ===== */
.collection-carousel.page-width {
  max-width: var(--page-width, 1600px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-padding, 2rem);
  padding-right: var(--page-padding, 2rem);
}

.collection-carousel__track {
  display: flex;
  overflow: hidden;
  scroll-behavior: smooth;
}

.slider__slide {
  flex: 0 0 auto;
}

.slider-button {
  background: none;
  border: none;
  cursor: pointer;
}
</style>

<section class="collection-carousel page-width" aria-label="Kategorien-Karussell">
  <div class="collection-carousel__slider slider-mobile-gutter">
    <div class="slider-buttons">
      <button type="button" class="slider-button slider-button--prev" aria-label="Vorherige Kategorien">‹</button>
      <button type="button" class="slider-button slider-button--next" aria-label="Nächste Kategorien">›</button>
    </div>

    <ul class="collection-carousel__track" role="list">
      {% for block in section.blocks %}
        {% assign coll = block.settings.collection %}
        {% if coll %}
          <li class="slider__slide">
            <a class="card--collection card--collection-link" href="{{ coll.url }}">
              <div class="card__inner">
                <div class="card__media">
                  {% if coll.image %}
                    {{ coll.image | image_url: width: 300 | image_tag: widths: '150, 200, 300', alt: coll.title }}
                  {% else %}
                    {{ 'collection-1' | placeholder_svg_tag: 'placeholder-svg' }}
                  {% endif %}
                </div>
                <div class="card__content">
                  <h3 class="card__heading">
                    {{ coll.title | default: block.settings.collection.title | default: 'Kategorie' }}
                  </h3>
                </div>
              </div>
            </a>
          </li>
        {% endif %}
      {% endfor %}
    </ul>
  </div>
</section>

<script>
(function() {
  const section = document.currentScript.closest('section.collection-carousel');
  const track = section.querySelector('.collection-carousel__track');
  const prevBtn = section.querySelector('.slider-button--prev');
  const nextBtn = section.querySelector('.slider-button--next');
  if (!track) return;

  const slideWidth = () => track.querySelector('.slider__slide')?.getBoundingClientRect().width || 0;
  const scrollByStep = (dir) => track.scrollBy({ left: dir * slideWidth(), behavior: 'smooth' });

  prevBtn.addEventListener('click', () => scrollByStep(-1));
  nextBtn.addEventListener('click', () => scrollByStep(1));

  // Autoplay
  let autoplayTimer;
  const startAutoplay = () => { autoplayTimer = setInterval(() => scrollByStep(1), 4000); };
  const stopAutoplay = () => clearInterval(autoplayTimer);

  section.addEventListener('mouseenter', stopAutoplay);
  section.addEventListener('mouseleave', startAutoplay);

  startAutoplay();
})();
</script>




