/* ============================================================
   CAROUSEL.CSS — PerspectiveCarousel vanilla
   ============================================================ */

/* ── SECCION ────────────────────────────────────────────────── */
.inv-carousel-section {
  padding: 72px 0;
  position: relative;
}

.inv-carousel-section .inv-section-label,
.inv-carousel-section .inv-section-title {
  padding: 0 24px;
}

/* ── VIEWPORT (overflow + perspective) ──────────────────────── */
#carousel-wrap {
  position: relative;
  width: 100%;
  height: 510px;
  overflow: visible;
  outline: none;
  cursor: grab;
}

#carousel-wrap:active { cursor: grabbing; }

/* Perspectiva en el viewport */
#carousel-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  perspective: 1200px;
}

/* ── TRACK ──────────────────────────────────────────────────── */
#carousel-track {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  width: fit-content;
  align-items: center;
  /* Transicion spring aproximada con cubic-bezier */
  transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.64, 1);
}

/* ── SLIDE ──────────────────────────────────────────────────── */
.c-slide {
  flex-shrink: 0;
  width: 300px;
  perspective: 1200px;
}

.c-slide-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transform-style: preserve-3d;
  /* Transicion spring aproximada */
  transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.64, 1);
  will-change: transform;
}

/* ── BOTON IMAGEN ────────────────────────────────────────────── */
.c-img-btn {
  width: 100%;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.c-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  user-select: none;
  pointer-events: none;
  display: block;
}

/* ── LABEL ───────────────────────────────────────────────────── */
.c-label {
  font-size: 0.8rem;
  color: #f5f0e8;
  white-space: nowrap;
  text-align: center;
  transition: opacity 0.4s ease, filter 0.4s ease;
}

.c-label--active {
  opacity: 1;
  filter: blur(0px);
}

.c-label--inactive {
  opacity: 0;
  filter: blur(2px);
}

/* ── CONTROLES ───────────────────────────────────────────────── */
#carousel-controls {
  position: absolute;
  bottom: -44px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15,12,26,0.75);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  white-space: nowrap;
}

/* Botones prev / next */
.c-ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: none;
  color: #f5f0e8;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.c-ctrl-btn:hover  { background: rgba(255,255,255,0.1); }
.c-ctrl-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── DOTS ────────────────────────────────────────────────────── */
#carousel-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.c-dot {
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  color: #f5f0e8;
  border: none;
  cursor: pointer;
  transition: width 0.3s ease, opacity 0.3s ease;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.c-dot--active {
  width: 28px;
  opacity: 1;
}

.c-dot:not(.c-dot--active) {
  width: 8px;
  opacity: 0.3;
}
