/* ===== Visor 360° del detalle de vehículo ===== */
.vehicle-360 {
  width: 100%;
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.vehicle-360__head {
  text-align: center;
  margin-bottom: 18px;
}

.vehicle-360__head h2 {
  margin: 0 0 4px;
  font-size: 28px;
  color: #374650;
}

.vehicle-360__head p {
  margin: 0;
  color: #6b7a83;
  font-size: 15px;
}

.spin360 {
  position: relative;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

.spin360__viewport {
  position: relative;
  width: 100%;
  /* coincide con la proporción real de las fotos (1534x1080) -> sin franjas a los lados */
  aspect-ratio: 1534 / 1080;
  overflow: hidden;
  background: #f3f6f8;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  outline: none;
}

.spin360__viewport:focus-visible {
  box-shadow: 0 0 0 3px rgba(55, 70, 80, 0.35);
}

.spin360.is-dragging .spin360__viewport {
  cursor: grabbing;
}

.spin360__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  -webkit-user-drag: none;
}

.spin360__frame.is-active {
  opacity: 1;
}

/* Badge 360° */
.spin360__badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: #374650;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 999px;
  pointer-events: none;
}

/* Contador de frame */
.spin360__counter {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.85);
  color: #374650;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  pointer-events: none;
}

/* Sugerencia "arrastra" (se oculta tras interactuar) */
.spin360__hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(55, 70, 80, 0.9);
  color: #fff;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  pointer-events: none;
  transition: opacity 0.3s ease;
  animation: spin360-nudge 1.8s ease-in-out infinite;
}

.spin360__hint svg { display: block; }

.spin360.has-interacted .spin360__hint {
  opacity: 0;
}

@keyframes spin360-nudge {
  0%, 100% { transform: translateX(-50%); }
  25% { transform: translateX(calc(-50% - 8px)); }
  75% { transform: translateX(calc(-50% + 8px)); }
}

/* Barra de progreso de giro */
.spin360__bar {
  position: relative;
  height: 4px;
  width: 70%;
  max-width: 320px;
  margin: 16px auto 0;
  background: #e2e8ec;
  border-radius: 999px;
  overflow: hidden;
}

.spin360__bar-fill {
  display: block;
  height: 100%;
  width: 12.5%;
  background: #374650;
  border-radius: 999px;
  transition: width 0.08s linear;
}

@media (max-width: 600px) {
  .vehicle-360__head h2 { font-size: 22px; }
  .spin360__hint { bottom: 12px; font-size: 12px; }
}
