/* ========== CARRUSEL GALERÍA - MULTI-SLIDE ADAPTATIVO ========== */
.my-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 1200px;
  margin: 20px auto 40px;
}

/* Track */
.my-carousel__track {
  display: flex;
  gap: 12px;
  transition: transform 0.4s ease;
  will-change: transform;
}

/* Slide */
.my-carousel__slide {
  flex: 0 0 calc((100% - 24px) / 3);
  max-width: calc((100% - 24px) / 3);
  position: relative;
  border-radius: 6px;
  overflow: hidden;
}

/* Imagen — tamaño reducido */
.my-carousel__slide img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.my-carousel__slide img:hover {
  transform: scale(1.03);
}

/* ========== CONTROLES PREV / NEXT ========== */
.my-carousel [data-prev],
.my-carousel [data-next] {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.my-carousel [data-prev]:hover,
.my-carousel [data-next]:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.my-carousel [data-prev] { left: 8px; }
.my-carousel [data-next] { right: 8px; }

/* ========== DOTS ========== */
.my-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.my-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #999;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, border-color 0.3s;
}

.my-carousel__dot.is-active,
.my-carousel__dot:hover {
  background: #82212e;
  border-color: #82212e;
}

/* ========== LIGHTBOX ========== */
.my-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.my-lightbox.is-open {
  display: flex;
}

.my-lightbox__img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  animation: lbFadeIn 0.25s ease;
}

@keyframes lbFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.my-lightbox__close {
  position: absolute;
  top: 20px;
  right: 25px;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  line-height: 1;
  z-index: 2;
  transition: transform 0.2s;
}

.my-lightbox__close:hover {
  transform: scale(1.2);
}

.my-lightbox__prev,
.my-lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 36px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  z-index: 2;
}

.my-lightbox__prev:hover,
.my-lightbox__next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.my-lightbox__prev { left: 20px; }
.my-lightbox__next { right: 20px; }

.my-lightbox__counter {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin-top: 15px;
  user-select: none;
}

/* ========== RESPONSIVE ========== */

/* Tablet: máximo 2 */
@media (max-width: 992px) {
  .my-carousel__slide {
    flex: 0 0 calc((100% - 12px) / 2);
    max-width: calc((100% - 12px) / 2);
  }

  .my-carousel__slide img {
    height: 200px;
  }
}

/* Móvil: 1 */
@media (max-width: 576px) {
  .my-carousel__slide {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .my-carousel__slide img {
    height: 180px;
  }

  .my-carousel [data-prev],
  .my-carousel [data-next] {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .my-lightbox__prev,
  .my-lightbox__next {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .my-lightbox__prev { left: 10px; }
  .my-lightbox__next { right: 10px; }
}