/* ============================================================
   LS PeepSo Carousel
   ============================================================ */

/* Wrapper creato dal JS attorno alla galleria multipla */
.ls-psc {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    /* aspect ratio fisso, stile feed social. Cambia se vuoi. */
    aspect-ratio: 1 / 1;
    touch-action: pan-y;
}

/* Track scorrevole con scroll-snap (swipe nativo su mobile) */
.ls-psc__track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;       /* Firefox */
}
.ls-psc__track::-webkit-scrollbar {
    display: none;               /* WebKit */
}

/* Ogni slide */
.ls-psc__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
}
/* L'<a> item di PeepSo dentro la slide: annulla float/padding-top inline
   e forzalo a riempire tutta la slide. */
.ls-psc__slide .ps-media-grid-item {
    display: block !important;
    position: absolute !important;
    top: 0;
    left: 0;
    float: none !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* I wrapper interni (padding + fitwidth) riempiono l'item */
.ls-psc__slide .ps-media-grid-padding,
.ls-psc__slide .ps-media-grid-fitwidth {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* L'immagine vera riempie il box con crop */
.ls-psc__slide .ps-media-grid-fitwidth img,
.ls-psc__slide img.ps-js-fitted {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Frecce */
.ls-psc__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 20px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    z-index: 3;
    padding: 0;
    transition: background 0.2s, opacity 0.2s;
    opacity: 0.85;
}
.ls-psc__arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    opacity: 1;
}
.ls-psc__arrow--prev { left: 8px; }
.ls-psc__arrow--next { right: 8px; }

/* Nascondi frecce quando ai bordi (classe gestita dal JS) */
.ls-psc__arrow[hidden] { display: none; }

/* Dots */
.ls-psc__dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 3;
    pointer-events: none;
}
.ls-psc__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: background 0.2s, transform 0.2s;
}
.ls-psc__dot--active {
    background: #fff;
    transform: scale(1.25);
}

/* Contatore (es. 1/4) in alto a destra */
.ls-psc__counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 12px;
    z-index: 3;
    pointer-events: none;
}

/* Su mobile nascondiamo le frecce e lasciamo lo swipe */
@media (max-width: 768px) {
    .ls-psc__arrow { display: none; }
}
