.ypf-marquee-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 10px 0;
}

.ypf-marquee-wrapper::before,
.ypf-marquee-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  width: var(--ypf-fade-width-desktop, 90px);
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.ypf-marquee-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--ypf-fade-color, #ffffff), transparent);
}

.ypf-marquee-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--ypf-fade-color, #ffffff), transparent);
}

.ypf-marquee-wrapper.ypf-no-fade::before,
.ypf-marquee-wrapper.ypf-no-fade::after {
  display: none;
}

.ypf-marquee-track {
  display: flex;
  gap: var(--ypf-gap-desktop, 22px);
  width: max-content;
  animation-name: ypfMarquee;
  animation-duration: var(--ypf-speed, 35s);
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: var(--ypf-direction, normal);
  will-change: transform;
}

.ypf-marquee-wrapper.ypf-pause-on-hover:hover .ypf-marquee-track {
  animation-play-state: paused;
}

.ypf-marquee-item {
  flex: 0 0 clamp(
    var(--ypf-card-min-desktop, 170px),
    calc((100vw - 120px) / var(--ypf-items-desktop, 5)),
    var(--ypf-card-max, 190px)
  );
  max-width: var(--ypf-card-max, 190px);
  min-width: var(--ypf-card-min-desktop, 170px);
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  overflow: hidden;
}

.ypf-marquee-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

.ypf-logo-link {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

@keyframes ypfMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 1024px) {
  .ypf-marquee-track {
    gap: var(--ypf-gap-tablet, 18px);
  }

  .ypf-marquee-wrapper::before,
  .ypf-marquee-wrapper::after {
    width: var(--ypf-fade-width-tablet, 70px);
  }

  .ypf-marquee-item {
    flex-basis: clamp(
      var(--ypf-card-min-tablet, 150px),
      calc((100vw - 80px) / var(--ypf-items-tablet, 3)),
      var(--ypf-card-max, 190px)
    );
    min-width: var(--ypf-card-min-tablet, 150px);
  }
}

@media (max-width: 767px) {
  .ypf-marquee-track {
    gap: var(--ypf-gap-mobile, 14px);
  }

  .ypf-marquee-wrapper::before,
  .ypf-marquee-wrapper::after {
    width: var(--ypf-fade-width-mobile, 45px);
  }

  .ypf-marquee-item {
    flex-basis: clamp(
      var(--ypf-card-min-mobile, 135px),
      calc((100vw - 50px) / var(--ypf-items-mobile, 2)),
      var(--ypf-card-max, 190px)
    );
    min-width: var(--ypf-card-min-mobile, 135px);
  }
}
