.InfiniteCarousel {
  overflow-x: hidden;
  position: relative;
}

.InfiniteCarousel-track > * {
  flex-shrink: 0;
}

/* ############# Loop Categorías ############## */
.Categorias {
  width: 100%;
  height: fit-content;
}

.Categorias-wrapper {
  margin-bottom: 3.63rem;
}

.Categorias-item {
  position: relative;
  z-index: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 15.75rem;
  height: 28.5rem;
  box-sizing: border-box;
  padding: 1rem;

  text-decoration: none;
  color: var(--clr-white);
}

.Categorias-item:is(:hover, :focus) {
  color: var(--clr-white);
}

.Categorias-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
      180deg,
      rgba(40, 47, 56, 0) 60%,
      var(--clr-dark-gray) 90%
    ),
    linear-gradient(
      to left,
      rgba(40, 47, 56, 0.4) 0%,
      rgba(40, 47, 56, 0.4) 100%
    );
}

.Categorias-item:is(:hover, :focus)::after {
  background: linear-gradient(
    180deg,
    rgba(40, 47, 56, 0) 60%,
    var(--clr-dark-gray) 90%
  );
}

.Categorias-item h5 {
  margin-bottom: 0.5rem;
}
.Categorias-item p {
  margin-bottom: 0;
}

.Categorias-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  transition: transform 0.4s;

  height: 100%;
  width: 100%;
  object-fit: cover;
}

.Categorias-item:is(:hover, :focus) .Categorias-image {
  transform: scale(1.15);
}

.Categorias-interactions {
  display: flex;
  justify-content: flex-end;
}

.Categorias-scrollbar {
  --swiper-scrollbar-bottom: 1.17rem;
  --swiper-scrollbar-size: 0.5rem;
  --swiper-scrollbar-sides-offset: 0%;
  --swiper-scrollbar-bg-color: var(--clr-light-gray);
  --swiper-scrollbar-drag-bg-color: linear-gradient(
    45deg,
    #e94f27 0%,
    #ffd401 80%,
    #faea26 100%
  );
  position: relative;
  max-width: calc(100% - 6.5rem);
}

.Categorias-interactions .swiper-scrollbar-drag {
  cursor: grab;
}

.Categorias-navBtns {
  display: flex;
  gap: 0.5rem;
}

:is(.Categorias-next, .Categorias-prev) {
  position: unset;
  flex-basis: 2.625rem;
  width: unset;
}

:is(.Categorias-next, .Categorias-prev)::after {
  content: "";
  width: 2.625rem;
  height: 2.625rem;
  background-color: var(--clr-medium-gray);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition: all 0.4s;
}

:is(.Categorias-next, .Categorias-prev):hover::after {
  background-color: var(--clr-medium-orange);
}

.Categorias-prev::after {
  -webkit-mask-image: url(./../icons/prev-arrow.svg);
  mask-image: url(./../icons/prev-arrow.svg);
}

.Categorias-next::after {
  -webkit-mask-image: url(./../icons/next-arrow.svg);
  mask-image: url(./../icons/next-arrow.svg);
}

/* ########## Beneficios Tarjetas y PopUps ########## */
.Benefits-cardsWrapper span {
  cursor: pointer;
}

.Benefits-popupsWrapper > div {
  display: none;
  position: fixed;
  z-index: 999;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 120%);
  justify-content: center;
  background-color: var(--clr-white);
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 2.5rem 0.94rem 0.94rem;
  max-width: 67.5rem;
  height: 100%;
  max-height: 75vh;
	max-height: 75dvh;
  width: calc(100% - 2rem);
  align-content: center;
}

.Benefits-popupsWrapper > div.is-visible {
  display: grid;
  transform: translate(-50%, -45%);
}

.Benefits-popupsWrapper > div::before {
  display: none;
  content: "";
  position: absolute;
  inset: -200%;
  z-index: -1;
  background: rgba(0, 0, 0, 0.4);
  transition: all 12s;
}

.Benefits-popupsWrapper > div::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--clr-white);
}

.Benefits-popupsWrapper > div.is-visible::before {
  display: block;
}

.Benefits-popupsWrapper img {
  width: 100%;
  max-width: unset;
  height: 100%;
  max-height: 17rem;
	object-fit: cover;
}

.Benefits-popupsWrapper > div > div {
  color: #282f39cd;
  overflow: auto;
}

.Benefits-popupsWrapper.Benefits-popupsWrapper svg {
  width: 2.875rem;
  height: 2.875rem;
}

.Benefits-popupsWrapper h2 {
	margin-bottom: 1.37rem;
}

.Benefits-popupsWrapper p {
	font-size: 0.875rem;
}

.Benefits--closePopup {
  position: absolute;
  top: 8px;
  right: 10px;
  cursor: pointer;
  background: unset;
  padding: 0;
  font-size: 2rem !important;
  font-weight: 400 !important;
  line-height: 1rem;
  color: var(--clr-dark-gray);
}

.Benefits--closePopup:is(:hover, :focus) {
  color: var(--clr-medium-orange);
  background: unset;
}

@media (width < 48em) {
  .InfiniteCarousel[data-animated="true"] {
    overflow: hidden;
  }

  .InfiniteCarousel-track {
    width: max-content;
  }

  .InfiniteCarousel[data-animated="true"] .InfiniteCarousel-track {
    flex-wrap: nowrap;
    gap: 2rem;
    animation: carouselInfinteScroll 10s linear infinite;
  }
}

@media (width > 48em) {
  .Categorias-item {
    width: 18.75rem;
    height: 37.5rem;
  }

  .Benefits-popupsWrapper > div {
    grid-template-columns: minmax(18rem, 1fr) 1fr;
    padding: 5rem 3.75rem;
    gap: 3.75rem;
    height: fit-content;
  }
	.Benefits-popupsWrapper img {
		width: 100%;
		max-width: unset;
		height: auto;
		max-height: unset;
		aspect-ratio: 1;
	}
	
	.Benefits-popupsWrapper > div > div {
		display: grid;
		align-content: center;
		color: #282f39cd;
		overflow: auto;
	}

  .Benefits-popupsWrapper.Benefits-popupsWrapper svg {
    width: 3.75rem;
    height: 3.75rem;
	margin-bottom: -0.5rem;
  }

	.Benefits-popupsWrapper h2 {
		margin-bottom: 2rem;
	}
}

@keyframes carouselInfinteScroll {
  to {
    transform: translate(
      calc(-50% - 1rem)
    ); /* mitad del contenedor y del gap */
  }
}
