/* ========== ABC CUSTOM SLIDER (CSS COMPLETO) ========== */

/* Contenitore */
.abc-slider { position: relative; margin: 25px auto; max-width: 100%; text-align: center; }

/* Viewport: maschera */
.abc-viewport { position: relative; overflow: hidden; width: 100%; }

/* Track: riga orizzontale di slide che si sposta */
.abc-slider-track { display: flex; transition: transform .45s ease; will-change: transform; }

/* Ogni slide occupa 100% e CENTRA il contenuto */
.abc-slide-link {
  flex: 0 0 100%;
  display: flex;
  align-items: center;      /* centro verticale */
  justify-content: center;  /* centro orizzontale */
  text-align: center;       /* sicurezza per temi “aggressivi” */
}

/* Immagine della slide (UN SOLO BLOCCO, niente duplicati) */
.abc-slide-img {
  max-width: 100%;
  max-height: 500px;
  width: auto;              /* importante per centratura reale */
  height: auto;
  object-fit: contain;      /* non taglia l’immagine */
  background: transparent;  /* oppure #fff se vuoi bianco */
  border-radius: 8px;
  display: block;
  transition: opacity 0.3s ease;
}

/* Frecce overlay */
.abc-slider .abc-nav {
  position: absolute; top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  display: flex; justify-content: space-between; align-items: center;
  pointer-events: none; z-index: 5; padding: 0 6px;
}
.abc-slider .abc-nav button {
  pointer-events: all; border: 0; background: rgba(0,0,0,0.5); color: #fff;
  width: 48px; height: 48px; border-radius: 50%;
  font-size: 26px; line-height: 48px; cursor: pointer; transition: background 0.2s ease;
}
.abc-slider .abc-nav button:hover { background: rgba(0,0,0,0.7); }

/* Didascalia + riga nera 1px */
.abc-slider-caption { margin-top: 10px; color: #444; }
.abc-slider-caption hr { width: 100%; border: 0; border-top: 1px solid #000; margin: 8px 0 10px; }
.abc-slider-caption p { margin: 0; font-size: 15px; }

/* Hover */
.abc-slider:hover .abc-slide-img { opacity: 0.93; }

/* Responsive */
@media (max-width: 768px) {
  .abc-slide-img { max-height: 360px; }
  .abc-slider .abc-nav button { width: 40px; height: 40px; font-size: 22px; line-height: 40px; }
}
@media (max-width: 480px) {
  .abc-slide-img { max-height: 260px; }
}

/* ===================================================== */
/*   CENTRATURA NEL POPUP/GALLERY (qualunque sia)        */
/*   Copriamo Fancybox 3, Fancybox 2 e il fallback.      */
/* ===================================================== */

/* Fancybox 3 (container moderno) */
.fancybox-container .fancybox-slide--image {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}
.fancybox-container .fancybox-image {
  margin: 0 auto !important;
  display: block !important;
  max-width: 100%;
  height: auto;
}

/* Fancybox 2 (classi legacy) */
.fancybox-opened .fancybox-skin,
.fancybox-opened .fancybox-inner {
  text-align: center !important;
}
.fancybox-opened .fancybox-inner img {
  display: inline-block !important;
  margin: 0 auto !important;
  max-width: 100%;
  height: auto;
}

/* Fallback lightbox del modulo (se non c'è Fancybox) */
#abc-lightbox {
  /* il JS lo imposta a display:flex quando si apre */
  align-items: center !important;
  justify-content: center !important;
}
#abc-lightbox img {
  display: block;
  margin: 0 auto;
  max-width: 90%;
  height: auto;
}
