/* ==========================================================================
   PREMIUM 2. EL JANTLAR
   ========================================================================== */

.used-wheels {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(ellipse 85% 60% at 50% -10%, rgba(31, 79, 255, 0.09) 0%, transparent 58%),
    #090909;
}

.used-wheels-carousel {
  --uw-gap: clamp(14px, 1.6vw, 20px);
  --uw-visible: 5;
  position: relative;
  margin-top: clamp(10px, 1.8vw, 18px);
}

@media (min-width: 1920px) {
  .used-wheels-carousel {
    --uw-visible: 6;
  }
}

@media (max-width: 767px) {
  .used-wheels-carousel {
    --uw-visible: 2.7;
  }
}

.used-wheels-carousel__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  padding: 10px 4px 22px;
  cursor: grab;
  user-select: none;
}

.used-wheels-carousel__viewport.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.used-wheels-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.used-wheels-carousel__viewport:focus {
  outline: none;
}

.used-wheels-carousel__viewport:focus-visible {
  box-shadow: 0 0 0 2px rgba(31, 79, 255, 0.45);
  border-radius: 18px;
}

.used-wheels-carousel__track {
  display: flex;
  gap: var(--uw-gap);
  min-height: 100%;
}

.used-wheels-card {
  flex: 0 0 calc((100% - ((var(--uw-visible) - 1) * var(--uw-gap))) / var(--uw-visible));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.used-wheels-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 16px;
  transition: transform 450ms cubic-bezier(0.4, 0, 0.2, 1);
}

.used-wheels-card:hover .used-wheels-card__inner,
.used-wheels-card:focus-visible .used-wheels-card__inner {
  transform: translateY(-6px);
}

.used-wheels-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(230px, 26vw, 300px);
  padding: clamp(16px, 2vw, 24px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, #16161e 0%, #101016 100%);
  overflow: hidden;
  transition:
    box-shadow 450ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 450ms ease;
}

.used-wheels-card:hover .used-wheels-card__media,
.used-wheels-card:focus-visible .used-wheels-card__media {
  border-color: rgba(31, 79, 255, 0.42);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(31, 79, 255, 0.14),
    0 0 36px rgba(31, 79, 255, 0.16);
}

.used-wheels-card__status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 9, 9, 0.82);
  color: rgba(255, 255, 255, 0.88);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

.used-wheels-card__status--in-stock {
  border-color: rgba(37, 211, 102, 0.28);
}

.used-wheels-card__status--reserved {
  border-color: rgba(255, 193, 7, 0.35);
}

.used-wheels-card__status--sold {
  border-color: rgba(255, 255, 255, 0.14);
  opacity: 0.75;
}

.used-wheels-card__placeholder {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      135deg,
      rgba(31, 79, 255, 0.06) 0%,
      rgba(255, 255, 255, 0.02) 50%,
      rgba(9, 9, 9, 0.35) 100%
    ),
    #121218;
}

.used-wheels-card__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition:
    opacity 500ms ease,
    transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.used-wheels-card__img.is-loaded {
  opacity: 1;
}

.used-wheels-card:hover .used-wheels-card__img.is-loaded,
.used-wheels-card:focus-visible .used-wheels-card__img.is-loaded {
  transform: scale(1.05);
}

.used-wheels-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 4px 4px;
  min-height: 88px;
}

.used-wheels-card__title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.used-wheels-card__specline {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.used-wheels-card__specs {
  display: none;
}

.used-wheels-card__spec {
  display: none;
}

.used-wheels-carousel__nav {
  position: absolute;
  top: 42%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 9, 9, 0.9);
  color: #ffffff;
  cursor: pointer;
  transition:
    background-color 350ms ease,
    border-color 350ms ease,
    transform 350ms ease,
    opacity 350ms ease;
}

.used-wheels-carousel__nav:hover:not(:disabled) {
  background: rgba(31, 79, 255, 0.24);
  border-color: rgba(31, 79, 255, 0.48);
  transform: scale(1.05);
}

.used-wheels-carousel__nav:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.used-wheels-carousel__nav--prev {
  left: -10px;
}

.used-wheels-carousel__nav--next {
  right: -10px;
}

.used-wheels-carousel__nav svg {
  width: 18px;
  height: 18px;
}

.used-wheels-cta {
  margin-top: clamp(44px, 5vw, 60px);
  padding: clamp(28px, 4vw, 40px);
  text-align: center;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(18, 18, 24, 0.95) 0%, rgba(12, 12, 16, 0.98) 100%);
}

.used-wheels-cta__title {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 700;
}

.used-wheels-cta__text {
  margin: 0 auto 22px;
  max-width: 460px;
  color: rgba(255, 255, 255, 0.62);
  font-size: clamp(0.92rem, 1.5vw, 1rem);
  line-height: 1.65;
}

.used-wheels .hero__btn--whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  border: 1px solid rgba(37, 211, 102, 0.35);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.2);
}

.used-wheels .hero__btn--whatsapp:hover {
  background: linear-gradient(135deg, #2ee676 0%, #17a589 100%);
  border-color: rgba(37, 211, 102, 0.55);
}

.used-wheels .hero__btn--whatsapp svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Lightbox */
html.uw-lightbox-open {
  overflow: hidden;
}

html.uw-lightbox-open body {
  overflow: hidden;
  touch-action: none;
}

.uw-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.5vw, 28px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.uw-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.uw-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 12, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.uw-lightbox__shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: min(94vh, 920px);
  display: flex;
  flex-direction: column;
}

.uw-lightbox__close {
  position: absolute;
  top: -6px;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(9, 9, 12, 0.82);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.uw-lightbox__wheel-nav {
  position: absolute;
  top: 42%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(9, 9, 12, 0.84);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 250ms ease, border-color 250ms ease;
}

.uw-lightbox__wheel-nav:hover:not(:disabled) {
  background: rgba(31, 79, 255, 0.28);
  border-color: rgba(31, 79, 255, 0.45);
}

.uw-lightbox__wheel-nav:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.uw-lightbox__wheel-nav--prev {
  left: -8px;
}

.uw-lightbox__wheel-nav--next {
  right: -8px;
}

.uw-lightbox__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(160deg, #14141c 0%, #0a0a10 100%);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  overflow: hidden;
  max-height: min(94vh, 920px);
}

.uw-lightbox__media-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #0b0b11;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.uw-lightbox__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: clamp(280px, 52vh, 560px);
  padding: clamp(18px, 2.5vw, 28px);
  overflow: hidden;
  touch-action: none;
}

.uw-lightbox__zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  transition: transform 120ms ease-out;
  will-change: transform;
}

.uw-lightbox.is-zoomed .uw-lightbox__zoom {
  transition: none;
}

.uw-lightbox__img {
  max-width: 100%;
  max-height: min(68vh, 640px);
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.uw-lightbox__thumbs {
  display: flex;
  gap: 8px;
  padding: 0 clamp(18px, 2.5vw, 28px) 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.uw-lightbox__thumbs::-webkit-scrollbar {
  display: none;
}

.uw-lightbox__thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.uw-lightbox__thumb.is-active {
  border-color: rgba(31, 79, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(31, 79, 255, 0.25);
}

.uw-lightbox__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.uw-lightbox__info {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(22px, 3vw, 34px);
  overflow-y: auto;
}

.uw-lightbox__title {
  margin: 0;
  padding-right: 28px;
  color: #fff;
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
  font-weight: 700;
}

.uw-lightbox__specline {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
}

.uw-lightbox__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(37, 211, 102, 0.28);
  background: rgba(37, 211, 102, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 600;
  width: fit-content;
}

.uw-lightbox__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.uw-lightbox__actions .hero__btn {
  min-width: min(100%, 210px);
}

.uw-lightbox__phone {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
}

.uw-lightbox__phone:hover {
  background: rgba(31, 79, 255, 0.16);
  border-color: rgba(31, 79, 255, 0.42);
}

.uw-lightbox .hero__btn--whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  border: 1px solid rgba(37, 211, 102, 0.35);
}

@media (max-width: 900px) {
  .uw-lightbox__layout {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
  }

  .uw-lightbox__media-col {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .uw-lightbox__stage,
  .uw-lightbox__thumbs {
    border-right: none;
  }

  .uw-lightbox__wheel-nav--prev {
    left: 4px;
  }

  .uw-lightbox__wheel-nav--next {
    right: 4px;
  }

  .uw-lightbox__close {
    top: 8px;
    right: 8px;
  }
}

@media (max-width: 640px) {
  .used-wheels-card__media {
    height: clamp(210px, 52vw, 260px);
  }

  .used-wheels-carousel__nav {
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .used-wheels-carousel__viewport,
  .uw-lightbox,
  .uw-lightbox__zoom,
  .used-wheels-card__inner,
  .used-wheels-card__media,
  .used-wheels-card__img {
    transition: none;
  }
}
