Sticky News Carousel

<div class="ba-topbar">
  <div class="ba-topbar__inner">
    <span class="ba-item">
      <span class="ba-icon">✓</span> Gratis verzending
    </span>
    <span class="ba-item">
      <span class="ba-icon">✓</span> Binnen 4–6 werkdagen geleverd
    </span>
    <span class="ba-item">
      <span class="ba-icon">✓</span> Gemaakt in Nederland
    </span>
    <span class="ba-item">
      <span class="ba-icon">✓</span> Premium museumkwaliteit
    </span>
    <span class="ba-item">
      <span class="ba-icon">✓</span> Sinds 2013
    </span>
  </div>
</div>
/* Topbar moet de volledige viewport-breedte pakken */
selector.ba-topbar-wrap{
  background: #0F0F0F;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0;
}

/* Zorg dat niets de breedte beperkt */
selector .ba-topbar,
selector .ba-topbar__inner{
  width: 100%;
  max-width: none;
}

/* Inner spacing en uitlijning */
selector .ba-topbar__inner{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;               /* meer uit elkaar */
  padding: 10px 36px;      /* meer ademruimte */
  flex-wrap: nowrap;       /* voorkomt rare wraps op desktop */
}

/* Items typografie */
selector .ba-item{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0.92;
  white-space: nowrap;
}

/* Check icon wit, chique outline */
selector .ba-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 50%;
  line-height: 1;
}

/* Mobiel. laat het wel netjes passen */
@media (max-width: 767px){
  selector .ba-topbar__inner{
    justify-content: flex-start;
    gap: 18px;
    padding: 9px 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  selector .ba-topbar__inner::-webkit-scrollbar{
    display: none;
  }
  selector .ba-item{
    font-size: 12px;
    letter-spacing: 0.3px;
  }
}

/* Bewegende ticker op desktop */
@media (min-width: 768px){
  selector .ba-topbar__inner{
    justify-content: flex-start;
    overflow: hidden;
  }

  selector .ba-topbar__inner{
    animation: baMarquee 18s linear infinite;
    will-change: transform;
  }

  @keyframes baMarquee{
    0%   { transform: translateX(0); }
    100% { transform: translateX(-35%); }
  }

  /* Pauze bij hover, voelt premium */
  selector:hover .ba-topbar__inner{
    animation-play-state: paused;
  }
}

Leave a Comment