/* 2sit Mobile Product Gallery Widget Styles */

.tosit-mobile-product-gallery {
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* Hide on desktop - show only on mobile */
@media (min-width: 769px) {
    .tosit-mobile-product-gallery {
        display: none !important;
    }
}

/* Main Image Container */
.tosit-mobile-gallery-main {
    width: 100%;
    position: relative;
    overflow: hidden;
    aspect-ratio: 689 / 516;
    min-height: 350px;
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Images */
.tosit-mobile-gallery-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    object-fit: contain;
    object-position: center center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    max-height: 350px;
}

.tosit-mobile-gallery-image.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* Navigation Arrows */
.tosit-mobile-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: currentColor;
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 1;
    visibility: visible;
    padding: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.tosit-mobile-gallery-arrow:hover, .tosit-mobile-gallery-arrow:active{
    background: white;
    outline: none;
    border: none;
}


.tosit-mobile-gallery-arrow.prev {
    right: 10px;
    transform-origin: center;
    transform: scale(-1, 1);
}

.tosit-mobile-gallery-arrow.next {
    left: 10px;
    transform-origin: center;
    transform: scale(-1, 1);
}

.tosit-mobile-gallery-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}


.tosit-mobile-gallery-arrow svg {
    width: 24px;
    height: 24px;
    stroke: black;
}

/* Navigation Dots */
.tosit-mobile-gallery-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tosit-mobile-gallery-dots::-webkit-scrollbar {
    display: none;
}

.tosit-mobile-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.tosit-mobile-gallery-dot.active {
    background: #ffcb00;
    width: 10px;
    height: 10px;
}

.tosit-mobile-gallery-dot:hover {
    background: rgba(255, 203, 0, 0.6);
}

/* Variation dot styling */
.tosit-mobile-gallery-dot.variation-dot {
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.tosit-mobile-gallery-dot.variation-dot.active {
    border-color: #ffcb00;
}

/* Preview Mode (Editor) */
.tosit-mobile-product-gallery.preview {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    color: #6c757d;
    font-style: italic;
}

/* Small Screens (< 480px) */
@media (max-width: 480px) {
    .tosit-mobile-gallery-arrow {
        width: 36px;
        height: 36px;
    }
    
    .tosit-mobile-gallery-arrow svg {
        width: 20px;
        height: 20px;
    }
    
    .tosit-mobile-gallery-dots {
        bottom: 10px;
        gap: 6px;
        padding: 6px 10px;
    }
    
    .tosit-mobile-gallery-dot {
        width: 7px;
        height: 7px;
    }
    
    .tosit-mobile-gallery-dot.active {
        width: 9px;
        height: 9px;
    }
}

/* Accessibility */
.tosit-mobile-gallery-dot:focus {
    outline: 2px solid #ffcb00;
    outline-offset: 2px;
}

.tosit-mobile-gallery-arrow:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .tosit-mobile-gallery-image,
    .tosit-mobile-gallery-dot {
        transition: none;
    }
}

