/* Inicio: explorador interactivo del motorista equipado. */
:root {
  --rider-ink: #11110f;
  --rider-paper: #f3f2ee;
  --rider-line: rgba(17, 17, 15, 0.22);
  --rider-accent: var(--blue, #0055ff);
  --rider-ease: cubic-bezier(0.16, 1, 0.3, 1);
}
.rider-explorer {
  width: min(1480px, 100%);
  margin: 0 auto;
  color: var(--rider-ink);
}
.rider-explorer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 21px 0;
  border-top: 1px solid #aaa9a5;
  border-bottom: 1px solid #d0cfcb;
  font-family: var(--ft);
  font-size: clamp(0.9rem, 1.05vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.15;
  text-transform: uppercase;
}
.rider-explorer__header p {
  margin: 0;
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  letter-spacing: 0.1em;
}
.rider-explorer__header div {
  display: flex;
  gap: 34px;
  color: #777773;
}
.rider-explorer__viewport {
  position: relative;
  height: min(49vw, 620px);
  min-height: 520px;
  overflow: hidden;
  background: #fff;
  isolation: isolate;
}
.rider-explorer__scene {
  position: absolute;
  inset: 0 35% 0 0;
  transform-origin: 50% 50%;
  transition:
    transform 0.85s var(--rider-ease),
    filter 0.6s ease;
  will-change: transform;
}
.rider-explorer__scene > img,
.rider-explorer__focus {
  position: absolute;
  left: 42%;
  top: 50%;
  width: 108%;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
  user-select: none;
  pointer-events: none;
}
.rider-explorer__focus {
  aspect-ratio: 1672/941;
  overflow: visible;
}

/* Producto seleccionado: la foto no se altera; un halo suave con borde blanco fino rodea la pieza elegida. */
.rider-explorer__aura,
.rider-explorer__lift {
  opacity: 0;
  transition: opacity 0.5s ease;
}
.rider-explorer.is-focused .rider-explorer__aura,
.rider-explorer.is-focused .rider-explorer__lift {
  opacity: 1;
}
.rider-explorer__aura-glow {
  fill: var(--rider-accent);
  animation: rider-aura-breathe 2.8s ease-in-out infinite;
}
.rider-explorer__aura-rim {
  fill: none;
  stroke: #fff;
  stroke-width: 5;
  stroke-linejoin: round;
}

.rider-explorer__detail {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  bottom: 18px;
  width: min(42%, 560px);
  display: block;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  background: rgba(244, 243, 239, 0.66);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 26px 70px rgba(45, 43, 38, 0.12);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(24px, 0, 0);
  transition:
    opacity 0.35s ease,
    transform 0.65s var(--rider-ease),
    visibility 0s 0.65s;
}
.rider-explorer.is-focused .rider-explorer__detail {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.35s ease,
    transform 0.65s var(--rider-ease),
    visibility 0s;
}
.rider-explorer__detail figure {
  width: 100%;
  height: 100%;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.42);
}
.rider-explorer__detail figure img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transform: scale(0.96) translateY(12px);
  transition:
    opacity 0.32s ease,
    transform 0.65s var(--rider-ease);
}
.rider-explorer__detail figure img.is-ready {
  opacity: 1;
  transform: none;
}

/* Insignia de marca: solo el logotipo, con un tamaño adaptado a cada marca para que siempre se lea. */
.rider-explorer__brand {
  position: absolute;
  z-index: 4;
  left: 0;
  top: 50%;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 22px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(17, 17, 15, 0.08),
    0 18px 40px rgba(17, 17, 15, 0.16);
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.86);
  transition:
    opacity 0.35s ease,
    transform 0.7s var(--rider-ease);
}
.rider-explorer__brand.is-ready {
  opacity: 1;
  transform: translate3d(-50%, -50%, 0) scale(1);
}
.rider-explorer__brand img {
  display: block;
  width: auto;
  height: 56px;
  max-width: none;
  object-fit: contain;
}
.rider-explorer__brand[data-brand="ilm"] {
  width: 96px;
  height: 96px;
  padding: 0;
  border-radius: 50%;
  background: #000;
  box-shadow:
    0 0 0 4px #fff,
    0 18px 40px rgba(17, 17, 15, 0.2);
}
.rider-explorer__brand[data-brand="ilm"] img {
  width: 100%;
  height: 100%;
}
.rider-explorer__brand[data-brand="furchtlos"] {
  width: 96px;
  height: 96px;
  padding: 22px;
  border-radius: 26px;
}
.rider-explorer__brand[data-brand="furchtlos"] img {
  width: 100%;
  height: 100%;
}
.rider-explorer__brand[data-brand="punto"] {
  padding: 6px 8px;
}
.rider-explorer__brand[data-brand="punto"] img {
  height: 72px;
}
.rider-explorer__brand[data-brand="loboo"] img {
  height: 54px;
}

/* Botón de cerrar: píldora de alto contraste que se lee sobre fotos claras y oscuras. */
.rider-explorer__reset {
  position: absolute;
  z-index: 5;
  top: 28px;
  right: 28px;
  height: 46px;
  padding: 0 8px 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--rider-ink);
  color: #fff;
  font-family: var(--ft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.9),
    0 12px 28px rgba(17, 17, 15, 0.28);
  transition:
    background 0.25s,
    transform 0.25s var(--rider-ease);
}
.rider-explorer__reset svg {
  width: 30px;
  height: 30px;
  padding: 7px;
  border-radius: 50%;
  background: var(--rider-accent);
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  transition: transform 0.35s var(--rider-ease);
}
.rider-explorer__reset:hover {
  background: var(--rider-accent);
}
.rider-explorer__reset:hover svg {
  background: #fff;
  stroke: var(--rider-accent);
  transform: rotate(90deg);
}
.rider-explorer__reset:active {
  transform: scale(0.96);
}
.rider-explorer__reset:focus-visible {
  outline: 3px solid var(--rider-accent);
  outline-offset: 4px;
}

.rider-explorer__rail {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  display: grid;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-left: 1px solid #bdbcb7 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.rider-explorer__rail--top {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid #bdbcb7 !important;
}
.rider-explorer__rail--bottom {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border-top: 0 !important;
}
.rider-explorer__rail::before {
  display: none !important;
  content: none !important;
}
.rider-explorer__rail button {
  min-width: 0;
  min-height: 68px;
  padding: 13px 15px;
  border: 0;
  border-right: 1px solid #bdbcb7;
  background: #fff;
  color: var(--rider-ink);
  font-family: var(--ft);
  font-size: clamp(0.78rem, 0.9vw, 0.86rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.12;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.28s,
    color 0.28s,
    transform 0.28s var(--rider-ease);
}
.rider-explorer__rail--bottom button {
  border-bottom: 1px solid #bdbcb7;
}
.rider-explorer__rail button:hover,
.rider-explorer__rail button:focus-visible {
  position: relative;
  z-index: 1;
  background: #eceae5;
  outline: 2px solid var(--rider-ink);
  outline-offset: -2px;
}
.rider-explorer__rail button.is-active {
  background: var(--rider-ink);
  color: #fff;
}
.rider-explorer__rail button:active {
  transform: scale(0.985);
}

@keyframes rider-aura-breathe {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.9;
  }
}

@media (max-width: 960px) {
  .rider-explorer__rail {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }
  .rider-explorer__rail::-webkit-scrollbar {
    display: none;
  }
  .rider-explorer__rail button {
    flex: 0 0 auto;
    padding: 13px 24px;
    white-space: nowrap;
    scroll-snap-align: start;
  }
  .rider-explorer__viewport {
    height: 62vw;
    min-height: 560px;
  }
  .rider-explorer__scene {
    right: 30%;
  }
  .rider-explorer__scene > img,
  .rider-explorer__focus {
    left: 38%;
    width: 124%;
  }
  .rider-explorer__detail {
    width: min(46%, 440px);
  }
}
@media (max-width: 720px) {
  .rider-explorer__header {
    display: grid;
    gap: 11px;
    padding: 20px 0;
  }
  .rider-explorer__header div {
    display: grid;
    gap: 6px;
  }
  .rider-explorer__viewport {
    height: auto;
    min-height: 0;
    display: grid;
    grid-template-rows: 440px auto;
    padding: 0;
  }
  .rider-explorer:not(.is-focused) .rider-explorer__detail {
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .rider-explorer__scene {
    position: relative;
    inset: auto;
    grid-row: 1;
    height: 440px;
  }
  .rider-explorer__scene > img,
  .rider-explorer__focus {
    left: 43%;
    top: 50%;
    width: 142%;
  }
  .rider-explorer__detail {
    position: relative;
    inset: auto;
    grid-row: 2;
    width: auto;
    height: 368px;
    min-height: 0;
    margin: 0 12px 12px;
    padding: 10px;
    transform: translate3d(0, 18px, 0);
  }
  .rider-explorer__brand {
    left: 22px;
    top: 22px;
    padding: 10px 16px;
    border-radius: 16px;
    transform: translate3d(0, -10px, 0) scale(0.92);
    transform-origin: 0 0;
  }
  .rider-explorer__brand.is-ready {
    transform: none;
  }
  .rider-explorer__brand[data-brand="ilm"],
  .rider-explorer__brand[data-brand="furchtlos"] {
    width: 68px;
    height: 68px;
  }
  .rider-explorer__brand[data-brand="furchtlos"] {
    padding: 15px;
    border-radius: 18px;
  }
  .rider-explorer__brand img {
    height: 40px;
  }
  .rider-explorer__brand[data-brand="punto"] img {
    height: 50px;
  }
  .rider-explorer__brand[data-brand="loboo"] img {
    height: 38px;
  }
  .rider-explorer__reset {
    top: 20px;
    right: 20px;
    height: 42px;
    padding-left: 16px;
  }
  .rider-explorer__rail {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 0 !important;
  }
  .rider-explorer__rail::-webkit-scrollbar {
    display: none;
  }
  .rider-explorer__rail button {
    flex: 0 0 178px;
  }
}
@media (max-width: 470px) {
  .rider-explorer__viewport {
    grid-template-rows: 400px auto;
  }
  .rider-explorer__scene {
    height: 400px;
  }
  .rider-explorer__reset span {
    display: none;
  }
  .rider-explorer__reset {
    padding: 0 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rider-explorer__scene,
  .rider-explorer__detail,
  .rider-explorer__detail figure img,
  .rider-explorer__rail button,
  .rider-explorer__brand,
  .rider-explorer__aura,
  .rider-explorer__lift,
  .rider-explorer__reset,
  .rider-explorer__reset svg {
    transition: none;
  }
  .rider-explorer__aura-glow {
    animation: none;
    opacity: 0.7;
  }
}

/* Diseño "deck" para móvil (opcional con data-phone="deck"): motorista arriba y una tarjeta deslizable por pieza.
   Sin ese atributo se usa la disposición en carriles. */
.rider-explorer__deck-wrap {
  display: none;
}
@media (max-width: 720px) {
  .rider-explorer[data-phone="deck"] .rider-explorer__rail,
  .rider-explorer[data-phone="deck"] .rider-explorer__detail {
    display: none !important;
  }
  .rider-explorer[data-phone="deck"] .rider-explorer__header {
    padding: 18px 0 16px;
    border-bottom: 0;
  }
  .rider-explorer[data-phone="deck"] .rider-explorer__header div span:last-child {
    display: none;
  }
  .rider-explorer[data-phone="deck"] .rider-explorer__viewport {
    min-height: 0;
    grid-template-rows: auto;
    border-radius: 22px;
    background: #fff;
    box-shadow: inset 0 0 0 1px #e4e4e0;
  }
  .rider-explorer[data-phone="deck"] .rider-explorer__scene {
    height: clamp(250px, 74vw, 330px);
  }
  .rider-explorer[data-phone="deck"] .rider-explorer__deck-wrap {
    display: block;
    margin-top: 18px;
  }
  .rider-explorer__deck {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 4px calc((100% - min(72vw, 320px)) / 2) 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .rider-explorer__deck::-webkit-scrollbar {
    display: none;
  }
  .rider-card {
    flex: 0 0 min(72vw, 320px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e4e4e0;
    border-radius: 20px;
    background: #fff;
    color: var(--rider-ink);
    text-align: left;
    cursor: pointer;
    scroll-snap-align: center;
    opacity: 0.5;
    transform: scale(0.94);
    transition:
      opacity 0.35s ease,
      transform 0.5s var(--rider-ease),
      border-color 0.35s,
      box-shadow 0.35s;
  }
  .rider-card.is-active {
    opacity: 1;
    transform: none;
    border-color: rgba(17, 17, 15, 0.18);
    box-shadow: 0 14px 32px rgba(17, 17, 15, 0.1);
  }
  .rider-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16/11;
    overflow: hidden;
    background: #f1f0ec;
  }
  .rider-card__media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .rider-card__body {
    display: grid;
    gap: 6px;
    padding: 12px 16px 14px;
  }
  .rider-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 26px;
  }
  .rider-card__meta small {
    color: #777773;
    font-family: var(--ft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .rider-card__logo {
    display: block;
    width: auto;
    height: 22px;
    max-width: 96px;
    object-fit: contain;
  }
  .rider-card__logo[data-brand="ilm"],
  .rider-card__logo[data-brand="furchtlos"] {
    height: 26px;
  }
  .rider-card__logo[data-brand="punto"] {
    height: 30px;
  }
  .rider-card__body strong {
    font-family: var(--fd);
    font-size: 1.85rem;
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: 0.01em;
    text-transform: uppercase;
  }
  .rider-explorer__deck-meta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 0 2px;
  }
  .rider-explorer__deck-count {
    min-width: 5ch;
    font-family: var(--ft);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.12em;
  }
  .rider-explorer__deck-progress {
    position: relative;
    height: 2px;
    overflow: hidden;
    border-radius: 2px;
    background: #e1e0dc;
  }
  .rider-explorer__deck-progress i {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0;
    background: var(--rider-accent);
    transition: width 0.45s var(--rider-ease);
  }
  .rider-explorer__deck-nav {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #d6d5d1;
    border-radius: 50%;
    background: #fff;
    color: var(--rider-ink);
    cursor: pointer;
    transition:
      background 0.25s,
      color 0.25s,
      border-color 0.25s;
  }
  .rider-explorer__deck-nav svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
  }
  .rider-explorer__deck-nav:active {
    background: var(--rider-ink);
    border-color: var(--rider-ink);
    color: #fff;
  }
}
@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
  .rider-card,
  .rider-explorer__deck-progress i {
    transition: none;
  }
}
