/* 
 * Product Gallery Styles
 * Bulletproof Engineering Architecture (Single Carousel)
 */

/* =========================================================
   1. Base Architecture
   ========================================================= */
.swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
    height: 100%;
    align-items: stretch;
}

/* Bulletproof Slide Layout */
.product-main-slider .swiper-slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
}

/* =========================================================
   2. Unified Slider Layout
   ========================================================= */
.cp-main-slider {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    background: #f9f9f9; /* Slider Background */
}

@media (max-width: 991px) {
    .cp-main-slider {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        border-radius: 0;
    }
}

@media (min-width: 992px) {
    .cp-main-slider {
        border: 1px solid rgba(0, 0, 0, 0.06);
    }
}

/* Bulletproof Image Positioning: Absolute fill with fallback visibility */
.gallery-main-img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 5 !important;
}

/* =========================================================
   3. Navigation Arrows (Optimized for Mobile)
   ========================================================= */
.cp-gallery-prev, .cp-gallery-next {
    width: 28px !important;
    height: 28px !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 12px !important;
    color: var(--primary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15) !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(4px) !important;
    z-index: 20 !important;
    margin-top: -14px !important;
}

.cp-gallery-prev:hover, .cp-gallery-next:hover {
    background: rgba(253, 253, 253, 0.9) !important;
}

.cp-gallery-prev::after, .cp-gallery-next::after {
    display: none !important;
}

.cp-gallery-prev svg, .cp-gallery-next svg {
    width: 14px !important;
    height: 14px !important;
}

.cp-gallery-prev { left: 15px !important; }
.cp-gallery-next { right: 15px !important; }

@media (max-width: 768px) {
    .cp-gallery-prev, .cp-gallery-next {
        width: 24px !important;
        height: 24px !important;
        border-radius: 38% !important;
        margin-top: -12px !important;
    }
    .cp-gallery-prev svg, .cp-gallery-next svg {
        width: 12px !important;
        height: 12px !important;
    }
    .cp-gallery-prev { left: 8px !important; }
    .cp-gallery-next { right: 8px !important; }
}

/* =========================================================
   4. Pagination Dots
   ========================================================= */
.product-slider-dots {
    bottom: 20px !important;
    z-index: 20 !important;
}

.swiper-pagination-bullet {
    background: rgba(255,255,255,0.6) !important;
    opacity: 1 !important;
    width: 7px !important;
    height: 7px !important;
    transition: 0.3s !important;
    margin: 0 4px !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
}

.swiper-pagination-bullet-active {
    background: #ffffff !important;
    transform: scale(1.1) !important;
}
