/* ==================== 360° VIRTUAL TOUR ==================== */

/* 360 Tour button on vehicle cards */
.tour-360-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.95) 0%, rgba(234, 179, 8, 0.85) 100%);
    color: #0f172a;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 5px 20px rgba(234, 179, 8, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.tour-360-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(234, 179, 8, 0.6);
    background: linear-gradient(135deg, #eab308 0%, #f59e0b 100%);
}

.tour-360-btn i {
    font-size: 1.25rem;
    animation: rotate360 3s linear infinite;
}

@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 360 Tour Modal */
.tour-360-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.97);
    backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.tour-360-modal.active {
    display: flex;
    opacity: 1;
}

/* Tour container */
.tour-360-container {
    position: relative;
    width: 95%;
    height: 90vh;
    max-width: 1400px;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.9),
                0 0 80px rgba(234, 179, 8, 0.5);
    border: 3px solid rgba(234, 179, 8, 0.6);
    transform: scale(0.9);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tour-360-modal.active .tour-360-container {
    transform: scale(1);
}

/* 360 Viewer (Pannellum integration) */
.tour-360-viewer {
    width: 100%;
    height: 100%;
    position: relative;
    background: #0f172a;
}

.tour-360-viewer canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Tour loading */
.tour-360-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.95);
    z-index: 100;
}

.tour-360-loading i {
    font-size: 4rem;
    color: #eab308;
    animation: spin 1.5s linear infinite;
    margin-bottom: 1.5rem;
}

.tour-360-loading p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    font-weight: 600;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Tour controls overlay */
.tour-360-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    padding: 1.25rem 2rem;
    border-radius: 16px;
    border: 2px solid rgba(234, 179, 8, 0.4);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    z-index: 50;
}

.tour-control-btn {
    width: 50px;
    height: 50px;
    background: rgba(234, 179, 8, 0.2);
    border: 2px solid rgba(234, 179, 8, 0.5);
    border-radius: 12px;
    color: #eab308;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tour-control-btn:hover {
    background: rgba(234, 179, 8, 0.4);
    border-color: #eab308;
    transform: translateY(-3px);
}

.tour-control-btn.active {
    background: #eab308;
    color: #0f172a;
}

/* Hotspot markers in 360 view */
.tour-hotspot {
    width: 40px;
    height: 40px;
    background: rgba(234, 179, 8, 0.9);
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulseHotspot 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.6);
}

.tour-hotspot:hover {
    transform: scale(1.3);
    animation: none;
}

.tour-hotspot i {
    color: #0f172a;
    font-size: 1rem;
}

@keyframes pulseHotspot {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(234, 179, 8, 0.6); }
    50% { transform: scale(1.15); box-shadow: 0 0 30px rgba(234, 179, 8, 0.8); }
}

/* Hotspot info popup */
.hotspot-info {
    position: absolute;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(15px);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 2px solid rgba(234, 179, 8, 0.5);
    min-width: 200px;
    max-width: 300px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 60;
}

.hotspot-info.visible {
    opacity: 1;
    transform: translateY(0);
}

.hotspot-info h4 {
    color: #eab308;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hotspot-info p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

/* Tour info header */
.tour-360-header {
    position: absolute;
    top: 30px;
    left: 30px;
    right: 100px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    border: 2px solid rgba(234, 179, 8, 0.4);
    z-index: 50;
}

.tour-360-header h3 {
    color: #eab308;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tour-360-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.5;
}

/* Close button */
.tour-360-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: rgba(15, 23, 42, 0.95);
    border: 2px solid rgba(234, 179, 8, 0.5);
    border-radius: 50%;
    color: #eab308;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 60;
}

.tour-360-close:hover {
    background: rgba(234, 179, 8, 0.2);
    border-color: #eab308;
    transform: rotate(90deg) scale(1.1);
}

/* Instructions overlay */
.tour-360-instructions {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    color: rgba(255, 255, 255, 0.9);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 0.875rem;
    border: 1px solid rgba(234, 179, 8, 0.3);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: fadeInstructions 5s ease-in-out 2s forwards;
}

.tour-360-instructions i {
    color: #eab308;
    font-size: 1.25rem;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .tour-360-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .tour-360-header {
        top: 15px;
        left: 15px;
        right: 80px;
        padding: 1rem 1.5rem;
    }
    
    .tour-360-header h3 {
        font-size: 1.25rem;
    }
    
    .tour-360-header p {
        font-size: 0.875rem;
    }
    
    .tour-360-close {
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .tour-360-controls {
        bottom: 20px;
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }
    
    .tour-control-btn {
        width: 45px;
        height: 45px;
        font-size: 1.125rem;
    }
    
    .tour-360-btn {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* Performance */
.tour-360-modal,
.tour-360-container,
.tour-360-viewer {
    will-change: opacity, transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

