/* =====================================================
   Pasan Gallery — Inline Carousel (FB/IG ad style)
   ===================================================== */

.psg-carousel { margin: 2rem 0; position: relative; }
.psg-heading {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    text-align: center;
}
.psg-empty {
    padding: 1.5rem;
    border: 1px dashed #ccc;
    border-radius: 8px;
    color: #888;
    text-align: center;
    font-size: 0.9rem;
}

/* ---------- VIEWPORT + ARROWS ---------- */
.psg-carousel-viewport {
    position: relative;
}

.psg-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 4px;
    scrollbar-width: none; /* Firefox */
}
.psg-track::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.psg-slide {
    flex: 0 0 calc((100% - (var(--psg-perview) - 1) * 16px) / var(--psg-perview));
    scroll-snap-align: start;
    border-radius: 14px;
    overflow: hidden;
    background: transparent;
    position: relative;
    font-size: 0;
    line-height: 0;
}
.psg-slide img,
.psg-slide video {
    width: 100%;
    aspect-ratio: var(--psg-ratio, 4 / 5);
    object-fit: cover;
    display: block;
    background: #000;
    border-radius: 14px;
}

/* Arrows */
.psg-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #111;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    transition: transform 0.2s, box-shadow 0.2s;
}
.psg-arrow:hover { transform: translateY(-50%) scale(1.08); box-shadow: 0 6px 22px rgba(0,0,0,0.25); }
.psg-arrow[hidden] { display: none; }
.psg-arrow-prev { left: -14px; }
.psg-arrow-next { right: -14px; }

/* Dots */
.psg-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 1.2rem;
}
.psg-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.psg-dot.active {
    background: var(--g1, #F9004D);
    transform: scale(1.3);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .psg-slide { flex-basis: calc((100% - 16px) / 2); } /* 2 per view on tablet */
    .psg-arrow-prev { left: 4px; }
    .psg-arrow-next { right: 4px; }
}
@media (max-width: 560px) {
    .psg-slide { flex-basis: 82%; } /* peek next card, like IG */
    .psg-track { gap: 12px; }
    .psg-arrow { display: none !important; } /* swipe only on mobile */
}

/* ---------- Grid thumbnail sharpness safeguard ---------- */
.psg-grid img, .psgg-item img { image-rendering: auto; }
