/* =====================================================
   OWL CAROUSEL - BASE
===================================================== */
.owl-carousel {
  display: none;
  width: 100%;
  position: relative;
  z-index: 1;
}

.owl-carousel.owl-loaded {
  display: block;
}

.owl-carousel .owl-stage-outer {
  position: relative;
  overflow: hidden;
  -webkit-transform: translate3d(0,0,0);
}

.owl-carousel .owl-stage {
  display: flex;
  align-items: stretch;
}

.owl-carousel .owl-item {
  display: flex;
  justify-content: center;
  align-items: center; /* CENTRADO */
}

.owl-carousel .owl-item img {
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain; /* ❌ No recortar imágenes */
}

/* DOTS */
.owl-carousel .owl-dot {
  cursor: pointer;
  user-select: none;
  background-color: transparent;
  width: 10px;
  height: 10px;
  border: 2px solid #ccc;
  border-radius: 50%;
  margin: 0 5px;
  transition: .2s;
}

.owl-carousel .owl-dot.active,
.owl-carousel .owl-dot:hover {
  background-color: #ccc;
}

/* =====================================================
   LIGHTGALLERY / IMG OVERLAY
===================================================== */
.img-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.img-overlay img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.img-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  z-index: 100000;
}

/* =====================================================
   GALLERY WRAP - GRID
===================================================== */
.gallery-wrap {
  display: grid;
  grid-template-columns: 420px 520px; /* Izquierda = info, derecha = carousel */
  gap: 32px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;
  padding: 40px 20px;
}

/* COLUMNA IZQUIERDA */
.gallery-wrap-inner:first-child {
  display: flex;
  flex-direction: column;
  align-items: center; 
  text-align: center;
  gap: 22px;
}

/* COLUMNA DERECHA */
.gallery-wrap-inner:last-child {
  display: flex;
  justify-content: center;
}

/* TÍTULO */
.gallery-wrap-inner h4 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: .4px;
}

/* DOTS PERSONALIZADOS */
[class*="dots-custom-"] {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  justify-content: center;
}

[class*="dots-custom-"] .owl-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,.65);
  border: 2px solid rgba(255,255,255,.45);
  cursor: pointer;
  position: relative;
}

[class*="dots-custom-"] .owl-dot::after {
  content: "";
  width: 9px;
  height: 9px;
  background: #ffac62;
  border-radius: 50%;
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: 0;
}

[class*="dots-custom-"] .owl-dot.active {
  border-color: #ffac62;
  box-shadow: 0 0 14px rgba(255,172,98,.9);
}

[class*="dots-custom-"] .owl-dot.active::after {
  opacity: 1;
}

/* =====================================================
   ITEM GALERÍA - IMAGENES
===================================================== */
.gallery-item.gallery-square {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
  line-height: 0;
}

.gallery-item.gallery-square figure {
  width: 100%;
  aspect-ratio: 1 / 1; 
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.gallery-item.gallery-square img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ❌ No recorta */
  display: block;
  transition: transform .3s ease;
}

@media (max-width: 767px) {
  .gallery-item.gallery-square:hover img {
    transform: scale(1.05);
  }
}

/* CAPTION */
.gallery-item .caption {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease;
  border-radius: 16px;
}

.gallery-item:hover .caption {
  opacity: 1;
}

.gallery-item .caption span {
  font-size: 30px;
  color: #fff;
}

/* =====================================================
   BOTÓN "VOLVER A LA GALERÍA"
===================================================== */
.back-to-gallery {
  text-decoration: none !important;
  color: #fff;
  margin-top: 26px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(6px);
  transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
}

.back-to-gallery .icon {
  font-size: 18px;
  transition: transform .3s ease;
}

.back-to-gallery:hover {
  background: rgba(255,255,255,.16);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

.back-to-gallery:hover .icon {
  transform: translateX(-6px);
}

.back-to-gallery:active {
  transform: scale(.96);
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 991px) {
  .gallery-wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 767px) {
  .owl-gallery,
  .gallery-item.gallery-square {
    max-width: 320px;
  }
  
  .gallery-wrap-inner:first-child {
    gap: 16px;
  }

  .gallery-wrap-inner h4 {
    font-size: 22px;
  }

  .back-to-gallery {
    padding: 9px 16px;
    font-size: 13px;
    margin-top: 18px;
  }
}

/* =====================================================
   ANIMACIÓN OWL
===================================================== */
.owl-carousel .owl-item {
  opacity: 0;
  transform: scale(.96) translateY(10px);
  transition: opacity .45s ease, transform .45s ease;
}

.owl-carousel .owl-item.active {
  opacity: 1;
  transform: scale(1) translateY(0);
}



