
/* ==========================================
   Product Gallery - Flipkart Style
   File: css/product-gallery.css
   ========================================== */

/* ===== Gallery Wrapper ===== */
.pg-wrap {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
}


/* ===== Product Gallery Wrapper ===== */
.pg-wrap {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
    max-width: 560px;
}

/* ===== Thumbnails (Left, Vertical) ===== */
.pg-thumbs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 56px;
    flex-shrink: 0;
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: none;
}

.pg-thumbs::-webkit-scrollbar {
    display: none;
}

/* ===== Individual Thumbnail ===== */
.pg-thumb {
    width: 56px;
    height: 56px;
    padding: 2px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0.7;
    transition: border-color 0.2s, opacity 0.2s;
}

/* Thumbnail Image */
.pg-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

/* Thumbnail Hover */
.pg-thumb:hover {
    opacity: 1;
    border-color: #bbb;
}

/* Active Thumbnail */
.pg-thumb.active {
    border-color: #ff5202;
    opacity: 1;
}

/* ===== Main Image Container ===== */
.pg-main {
    position: relative;
    flex: 1;
    min-width: 0;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

/* ===== Main Image Stage ===== */
.pg-stage {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: pointer;
    touch-action: pan-y;
}

/* Main Image */
.pg-stage img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.25s ease;
    user-select: none;
    -webkit-user-drag: none;
}

/* Image Fade Effect */
.pg-stage.fading img {
    opacity: 0;
}


/* ===== Navigation Arrows ===== */
.pg-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    color: #222;
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-50%);
    transition:
        opacity 0.2s,
        background 0.2s;
}

.pg-main:hover .pg-nav {
    opacity: 1;
}

.pg-nav:hover {
    background: #ff5202;
    color: #fff;
}

.pg-prev {
    left: 10px;
}

.pg-next {
    right: 10px;
}

/* ===== Image Counter ===== */
.pg-count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
}

/* ===== Fullscreen Lightbox ===== */
.pg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
}

.pg-lightbox.open {
    display: flex;
}

.pg-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
}

/* ===== Lightbox Buttons ===== */
.pg-lb-btn {
    position: absolute;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.pg-lb-btn:hover {
    background: #ff5202;
}

/* Lightbox Close Button */
.pg-lb-close {
    top: 18px;
    right: 18px;
}

/* Lightbox Previous Button */
.pg-lb-prev {
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
}

/* Lightbox Next Button */
.pg-lb-next {
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
}

/* ==========================================
   Responsive Design - Tablet & Mobile
   ========================================== */
@media (max-width: 767px) {

    /* Gallery Layout */
    .pg-wrap {
        flex-direction: column-reverse;
    }

    /* Horizontal Thumbnail Scroller */
    .pg-thumbs {
        flex-direction: row;
        width: 100%;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .pg-thumb {
        width: 56px;
        height: 56px;
    }

    /* Always Show Navigation Arrows */
    .pg-nav {
        width: 34px;
        height: 34px;
        opacity: 1;
    }

    /* Mobile Image Interaction */
    .pg-stage {
        cursor: pointer;
    }
}




/* Naye changes */
.pg-wrap{margin:0 auto}
.pg-thumb img{object-fit:contain}
.pg-stage{background:#fff}
.pg-single .pg-nav,.pg-single .pg-count{display:none}
.pg-lightbox img{background:#fff;border-radius:6px}

