/* Touch Gesture Styles for Product Gallery */

.gallery-swipe-container {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.main-product-image {
    transition: opacity 150ms ease-in-out;
    cursor: grab;
    touch-action: pan-y pinch-zoom;
}

.main-product-image:active {
    cursor: grabbing;
}

/* Swipe Indicators */
.swipe-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 8px;
}

.swipe-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    border: none;
    cursor: pointer;
    transition: all 200ms ease;
    padding: 0;
}

.swipe-dot:hover {
    background-color: #999;
    transform: scale(1.2);
}

.swipe-dot.active {
    background-color: #333;
    width: 12px;
    height: 12px;
}

.swipe-dot:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Mobile Touch Active Styles */
.mobile-touch-active .main-product-image {
    -webkit-tap-highlight-color: transparent;
}

.mobile-touch-active .product-thumb {
    -webkit-tap-highlight-color: transparent;
}

/* Pinch Zoom Support */
.pinch-zoom-enabled .main-product-image {
    transform-origin: center center;
    transition: transform 100ms ease-out;
}

/* Thumbnail Active State */
.product-thumb.active {
    border: 2px solid #007bff;
    opacity: 1;
}

.product-thumb {
    opacity: 0.7;
    transition: opacity 200ms ease, border 200ms ease;
}

.product-thumb:hover {
    opacity: 1;
}

/* Accessibility Features */
.main-product-image:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .swipe-indicator {
        margin-top: 12px;
    }
    
    .main-product-image {
        max-width: 100%;
        height: auto;
    }
    
    .gallery-swipe-container {
        overflow: hidden;
    }
}

/* Animation Classes */
@keyframes swipeLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes swipeRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.swipe-animation-left {
    animation: swipeLeft 300ms ease-out forwards;
}

.swipe-animation-right {
    animation: swipeRight 300ms ease-out forwards;
}