/* ===== Carrusel ===== */
.gx-carousel__track {
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.gx-carousel__track::-webkit-scrollbar {
  display: none;
}

.gx-carousel__track > .gx-product {
  flex: 0 0 calc((100% - 56px) / 3);
  scroll-snap-align: start;
}

.gx-carousel {
  position: relative;
}

.gx-carousel__controls {
  display: contents;
  position: relative;
}

.gx-carousel__controls[hidden] {
  display: none;
}

/* Estilos generales */
.gx-carousel__btn {
  appearance: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  box-shadow: none;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    opacity 0.25s ease;
}

/* Posicionamiento */
.gx-carousel__btn[data-dir="-1"] {
  left: -3.5rem;
}

.gx-carousel__btn[data-dir="1"] {
  right: -3.5rem;
}

/* Hover */
.gx-carousel__btn:hover {
  background: #1d2444;
  box-shadow: none;
}

/* Focus */
.gx-carousel__btn:focus {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  box-shadow: none;
}

/* Focus visible */
.gx-carousel__btn:focus-visible {
  outline: 3px solid rgba(3, 73, 152, 0.45);
  outline-offset: 2px;
}

/* Disabled */
.gx-carousel__btn:disabled {
  background: #1d2444;
  opacity: 0.35;
  cursor: not-allowed;
}

.gx-carousel__toggle {
  position: static;
  transform: none;
  width: 48px;
  height: 48px;
  margin: 16px 0 0 auto;
  border: 2px solid #fff;
  border-radius: 50%;
}

.gx-carousel__toggle[data-state="playing"] .gx-icon-play,
.gx-carousel__toggle[data-state="paused"] .gx-icon-pause {
  display: none;
}

@media (max-width: 900px) {
  .gx-carousel__track {
    gap: 20px;
  }

  .gx-carousel__btn[data-dir="-1"] {
    left: -3rem;
  }
  .gx-carousel__btn[data-dir="1"] {
    right: -3rem;
  }

  .gx-carousel__track > .gx-product {
    flex-basis: calc((100% - 40px) / 2.2);
  }
}

@media (max-width: 767px) {
  .gx-carousel__btn[data-dir="-1"] {
    left: -1rem;
  }
  .gx-carousel__btn[data-dir="1"] {
    right: -1rem;
  }
}

@media (max-width: 600px) {
  .gx-carousel__track {
    gap: 16px;
  }

  .gx-carousel__track > .gx-product {
    flex-basis: calc((100% - 16px) / 1.15);
  }

  .gx-carousel__btn {
    width: 40px;
    height: 40px;
  }

  .gx-carousel__btn[data-dir="-1"] {
    left: -0.5rem;
  }
  .gx-carousel__btn[data-dir="1"] {
    right: -0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gx-carousel__track {
    scroll-behavior: auto;
  }

  .gx-carousel__btn {
    transition:
      all 0.3s ease !important;
  }
}
