/* ==========================================================================
   Listado — colorways tipo Nike (fila scroll + flecha escritorio)
   CLS: altura reservada + clip para que no crezcan en varias filas
   mientras llega el CSS completo.
   ========================================================================== */

.wecomm-jomagrx .product-miniature {
  min-width: 0;
}

.wecomm-jomagrx .product-miniature__colorways {
  --weu-colorways-h: 44px;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  height: var(--weu-colorways-h);
  min-height: var(--weu-colorways-h);
  max-height: var(--weu-colorways-h);
  overflow: hidden;
  contain: layout paint;
}

.wecomm-jomagrx .weu-colorways {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

/* Modo compacto (+N): sin scroll ni flechas */
.wecomm-jomagrx .weu-colorways--capped .weu-colorways__thumbs {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  gap: 0.35rem !important;
  width: 100% !important;
  max-width: 100%;
  height: var(--weu-colorways-h, 44px);
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.wecomm-jomagrx .weu-colorways--capped .weu-colorways__thumb,
.wecomm-jomagrx .weu-colorways--capped .weu-colorways__more {
  position: relative;
  display: block !important;
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 3.25rem;
  height: var(--weu-colorways-h, 44px) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 2px;
  overflow: hidden;
  background: #f5f5f5;
  cursor: pointer;
}

.wecomm-jomagrx .weu-colorways--capped .weu-colorways__more {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.45);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--weu-white);
}

.wecomm-jomagrx .weu-colorways--capped .weu-colorways__more:hover,
.wecomm-jomagrx .weu-colorways--capped .weu-colorways__more:focus-visible {
  color: var(--weu-color-black);
  border-color: var(--weu-color-black);
  outline: none;
}

.wecomm-jomagrx .weu-colorways--capped .weu-colorways__thumb.is-active {
  box-shadow: none;
  outline: none;
  border-color: var(--weu-color-black);
}

.wecomm-jomagrx .weu-colorways--capped .weu-colorways__thumb.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 3px;
  background: var(--weu-color-yellow, #eefd76);
}

.wecomm-jomagrx .weu-colorways--capped .weu-colorways__arrow {
  display: none !important;
}

.wecomm-jomagrx .weu-colorways--capped .weu-colorways__scroll {
  overflow: visible;
  cursor: default;
}


.wecomm-jomagrx .weu-colorways__scroll {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 100%;
  max-height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  cursor: grab;
  /* Anula mask de CSS antiguo en caché (rompe scroll táctil en iOS) */
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

.wecomm-jomagrx .weu-colorways__scroll.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.wecomm-jomagrx .weu-colorways__scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Fade Nike: derecha si hay más a la derecha; izquierda si hay más a la izquierda */
.wecomm-jomagrx .weu-colorways.has--scrollable-colorways:not(.is-scroll-end)::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 2.5rem;
  pointer-events: none;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.75) 45%,
    #fff 100%
  );
}

.wecomm-jomagrx .weu-colorways.has--scrollable-colorways:not(.is-scroll-start)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: 2.5rem;
  pointer-events: none;
  background: linear-gradient(
    to left,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.75) 45%,
    #fff 100%
  );
}

.wecomm-jomagrx .weu-colorways__thumbs {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
  gap: 4px !important;
  width: max-content !important;
  height: var(--weu-colorways-h, 50px);
  min-height: var(--weu-colorways-h, 50px);
  max-height: var(--weu-colorways-h, 50px);
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.wecomm-jomagrx .weu-colorways__thumb {
  position: relative;
  display: block !important;
  flex: 0 0 50px !important;
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  max-width: 50px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  overflow: hidden;
  background-color: #f5f5f5 !important;
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: pan-x;
  -webkit-user-drag: none;
  user-select: none;
  float: none !important;
}

.wecomm-jomagrx .weu-colorways__thumb:focus-visible {
  outline: 2px solid var(--weu-color-black, #0a1210);
  outline-offset: 2px;
}

.wecomm-jomagrx .weu-colorways__placeholder {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wecomm-jomagrx .weu-colorways__img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  pointer-events: none;
  background: #f5f5f5;
  transition: opacity 0.25s ease;
  -webkit-user-drag: none;
  user-select: none;
}

.wecomm-jomagrx .weu-colorways__thumb.is-loaded .weu-colorways__img {
  opacity: 1;
}

.wecomm-jomagrx .weu-colorways__thumb.is-loaded .weu-colorways__placeholder,
.wecomm-jomagrx .weu-colorways__thumb.is-loading.is-loaded .weu-colorways__placeholder {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
}

.wecomm-jomagrx .weu-colorways__thumb.is-loading:not(.is-loaded) .weu-colorways__placeholder {
  opacity: 1;
}

.wecomm-jomagrx .weu-colorways__thumb.is-loading:not(.is-loaded) .weu-colorways__img {
  opacity: 0;
}

.wecomm-jomagrx .weu-colorways__thumb.is-swatch-only .weu-colorways__placeholder {
  width: 1.5rem;
  height: 1.5rem;
  opacity: 1;
}

.wecomm-jomagrx .weu-colorways__thumb.is-active {
  box-shadow: inset 0 0 0 2px var(--weu-color-black, #0a1210);
  outline: 1px solid var(--weu-color-black, #0a1210);
  outline-offset: 1px;
}

/* Flechas escritorio — chevron fino tipo Nike (sin círculo) */
.wecomm-jomagrx .weu-colorways__arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.wecomm-jomagrx .weu-colorways__arrow .jmgx-heroicon {
  width: 1.15rem;
  height: 1.15rem;
  background-color: var(--weu-color-black, #111);
}

.wecomm-jomagrx .weu-colorways__arrow--prev {
  left: 0;
}

.wecomm-jomagrx .weu-colorways__arrow--next {
  right: 0;
}

.wecomm-jomagrx .weu-colorways__arrow:hover .jmgx-heroicon,
.wecomm-jomagrx .weu-colorways__arrow:focus-visible .jmgx-heroicon {
  background-color: var(--weu-color-black, #111);
}

.wecomm-jomagrx .weu-colorways__arrow:focus-visible {
  outline: 2px solid var(--weu-color-black, #111);
  outline-offset: 2px;
}

.wecomm-jomagrx .weu-colorways__arrow[hidden] {
  display: none !important;
}

@media (min-width: 992px) {
  /* Chevron: derecha si no estamos al final; izquierda si no estamos al inicio */
  .wecomm-jomagrx .weu-colorways.has--scrollable-colorways .weu-colorways__arrow:not([hidden]) {
    display: inline-flex;
  }
}

@media (max-width: 767.98px) {
  .wecomm-jomagrx .product-miniature__colorways {
    --weu-colorways-h: 40px;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
  }

  .wecomm-jomagrx .weu-colorways__thumbs {
    min-height: 40px;
  }

  .wecomm-jomagrx .weu-colorways__thumb {
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
  }

  .wecomm-jomagrx .weu-colorways__arrow {
    display: none !important;
  }
}

@media (hover: hover) and (pointer: fine) {
  .wecomm-jomagrx .weu-colorways__thumb.is-loaded:hover .weu-colorways__img {
    opacity: 1;
  }
}
