/**
 * viewer.css
 * Shared styles for the 360 Product Viewer. One copy, loaded by every
 * viewer.php instance regardless of which product is showing - do not
 * duplicate this per-product.
 */

.product-viewer {
            position: relative;
            width: auto;
            height: auto;
            max-width: 100%;
            max-height: 90vh;
            margin: 0 auto;
            background: #fff;
            border-radius: 8px;
            overflow: hidden;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        }

        .viewer-container {
            position: relative;
            width: 100%;
            height: 100%;
            cursor: grab;
            overflow: hidden;
        }

        .viewer-container.dragging {
            cursor: grabbing;
        }

        .images-holder {
            position: absolute;
            width: 100%;
            height: 100%;
            background: #fff;
        }

        .viewer-image {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: contain;
            visibility: hidden;
            pointer-events: none;
            background: #fff;
            transition: none;
            will-change: visibility;
        }

        .viewer-image.active {
            visibility: visible;
            pointer-events: auto;
        }

        .loading-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 16px;
            z-index: 10;
        }

        .loading-overlay.hidden {
            display: none;
        }

        .controls-panel {
            position: absolute;
            bottom: 15px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(102, 102, 102, 0.9);
            padding: 8px 16px;
            border-radius: 25px;
            display: flex;
            align-items: center;
            gap: 12px;
            backdrop-filter: blur(10px);
            transition: opacity 0.3s ease;
        }

        .controls-panel:hover {
            background: rgba(102, 102, 102, 0.95);
        }

        .control-btn {
            background: none;
            border: none;
            color: #fff;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 14px;
        }

        .control-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.1);
        }

        .control-btn:active {
            transform: scale(0.95);
        }

        .control-btn.active {
            background: rgba(255, 255, 255, 0.3);
        }

        .zoom-controls {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .zoom-slider {
            width: 60px;
            height: 4px;
            background: rgba(0, 0, 0, 0.4);
            border-radius: 2px;
            position: relative;
            cursor: pointer;
        }

        .zoom-slider-track {
            height: 100%;
            background: #fff;
            border-radius: 2px;
            width: 0%;
            transition: width 0.1s ease;
        }

        .zoom-slider-handle {
            position: absolute;
            top: -6px;
            width: 16px;
            height: 16px;
            background: #fff;
            border-radius: 50%;
            cursor: grab;
            transition: transform 0.1s ease;
            left: 0%;
            transform: translateX(-50%);
        }

        .zoom-slider-handle:hover {
            transform: translateX(-50%) scale(1.2);
        }

        .zoom-slider-handle.dragging {
            cursor: grabbing;
        }

        .viewer-image.zoomed {
            cursor: move;
            transform-origin: center;
        }

        .rotation-indicator {
            display: none;
        }

        @media (max-width: 680px) {
            .product-viewer {
                width: 95vw;
                height: auto;
            }
        }
