/**
 * 360° Product View Styles
 */

.view360-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.view360-canvas {
    width: 100%;
    height: auto;
    display: block;
    cursor: grab;
}

.view360-canvas:active {
    cursor: grabbing;
}

/* Loading Indicator */
.view360-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 100;
}

.view360-loader .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.view360-loader p {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
}

.progress-bar {
    width: 80%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #fff;
    transition: width 0.3s ease;
}

/* Control Buttons */
.view360-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.view360-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.view360-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.view360-btn.active {
    background: #667eea;
    color: #fff;
}

/* Hint Overlay */
.view360-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    animation: fadeOut 3s ease forwards;
    z-index: 5;
}

/* Frame Indicator */
.view360-frame-count {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

/* Fullscreen Mode */
.view360-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    z-index: 9999;
}

.view360-container.fullscreen .view360-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Fullscreen Button */
.btn-fullscreen {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.btn-fullscreen:hover {
    background: #fff;
    transform: scale(1.1);
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .view360-container {
        max-width: 100%;
        border-radius: 10px;
    }

    .view360-controls {
        bottom: 10px;
        gap: 6px;
    }

    .view360-btn {
        padding: 8px 15px;
        font-size: 12px;
    }

    .btn-fullscreen {
        width: 35px;
        height: 35px;
        top: 10px;
        left: 10px;
    }
}

/* Product Page Integration */
.product-360-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 10px;
}

.product-tryon-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    margin-top: 15px;
}

.product-tryon-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.product-tryon-button:active {
    transform: translateY(0);
}