/**
 * Professional Product Gallery with Swiper.js
 * Clean, modern design without conflicts
 */

/* Main Gallery Container */
.product-gallery-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Swiper */
.product-gallery-main {
    width: 100%;
    margin-bottom: 16px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.product-gallery-main .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.product-gallery-main .swiper-slide img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Thumbnails Swiper */
.product-gallery-thumbs {
    width: 100%;
    padding: 8px 0;
}

.product-gallery-thumbs .swiper-slide {
    width: 80px !important;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    background: #f9fafb;
    opacity: 0.6;
}

.product-gallery-thumbs .swiper-slide:hover {
    opacity: 1;
    border-color: #ff6600;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(255, 102, 0, 0.3);
}

.product-gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: #ff6600;
    box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.1);
}

.product-gallery-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Swiper Navigation Buttons */
.swiper-button-next,
.swiper-button-prev {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    color: white !important;
    transition: all 0.3s ease;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px;
    font-weight: bold;
    font-family: 'swiper-icons';
}

/* Ensure arrows display correctly */
.swiper-button-prev::after {
    content: '‹';
    font-size: 32px;
    line-height: 1;
}

.swiper-button-next::after {
    content: '›';
    font-size: 32px;
    line-height: 1;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(255, 102, 0, 0.9);
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(255, 102, 0, 0.3);
}

/* Swiper Pagination */
.swiper-pagination {
    bottom: 12px !important;
}

.swiper-pagination-fraction {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    width: auto !important;
    left: 50% !important;
    transform: translateX(-50%);
}

/* Zoom Icon Indicator */
.zoom-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-gallery-main:hover .zoom-indicator {
    opacity: 1;
}

/* Loading Indicator */
.loading-indicator {
    display: none !important;
}

/* Responsive Design - Mobile Optimized */
@media (max-width: 768px) {
    .product-gallery-container {
        max-width: 100%;
        margin: 0;
    }

    .product-gallery-main {
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .product-gallery-main .swiper-slide {
        min-height: 280px;
    }

    .product-gallery-main .swiper-slide img {
        max-height: 320px;
    }

    .product-gallery-thumbs {
        padding: 6px 0;
    }

    .product-gallery-thumbs .swiper-slide {
        width: 60px !important;
        height: 60px;
        border-radius: 8px;
        border-width: 2px;
    }

    /* Bigger touch targets for mobile */
    .swiper-button-next,
    .swiper-button-prev {
        width: 40px;
        height: 40px;
    }

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 28px;
    }

    /* Hide zoom indicator on mobile */
    .zoom-indicator {
        display: none;
    }

    /* Better pagination on mobile */
    .swiper-pagination-fraction {
        font-size: 11px;
        padding: 4px 10px;
    }
}

@media (max-width: 480px) {
    .product-gallery-main {
        border-radius: 8px;
    }

    .product-gallery-main .swiper-slide {
        min-height: 240px;
    }

    .product-gallery-main .swiper-slide img {
        max-height: 260px;
    }

    .product-gallery-thumbs .swiper-slide {
        width: 50px !important;
        height: 50px;
        border-radius: 6px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 36px;
        height: 36px;
    }

    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 24px;
    }

    /* Smaller pagination on very small screens */
    .swiper-pagination-fraction {
        font-size: 10px;
        padding: 3px 8px;
    }
}

/* Landscape mode optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .product-gallery-main .swiper-slide {
        min-height: 200px;
    }

    .product-gallery-main .swiper-slide img {
        max-height: 220px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-gallery-container {
    animation: fadeIn 0.6s ease-out;
}

/* Hover Effects */
.product-gallery-main .swiper-slide img:hover {
    transform: scale(1.02);
}

/* Swiper Zoom */
.swiper-slide-zoomed .swiper-zoom-container img {
    cursor: zoom-out !important;
}

/* Fix for Swiper CSS conflicts */
.swiper {
    margin-left: auto;
    margin-right: auto;
}
