/* ===== 3D CAR EXPLORER ===== */

/* Car Showcase 3D */
.car-showcase-3d {
    margin: 3rem 0;
    perspective: 1000px;
    position: relative;
}

.showcase-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.car-model-3d {
    position: relative;
    width: 300px;
    height: 200px;
    transform-style: preserve-3d;
    animation: float3D 6s ease-in-out infinite;
    cursor: grab;
    transition: transform 0.3s ease;
}

.car-model-3d:active {
    cursor: grabbing;
}

@keyframes float3D {
    0%, 100% { transform: translateY(0px) rotateY(0deg); }
    50% { transform: translateY(-10px) rotateY(5deg); }
}

.car-body-3d {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 80px;
    background: linear-gradient(135deg, #1a1a1a, #333, #1a1a1a);
    border-radius: 20px 20px 10px 10px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 2px 10px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.car-body-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), transparent);
    border-radius: 20px 20px 0 0;
}

.car-body-3d::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 20px;
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.3), transparent, rgba(0, 255, 136, 0.3));
    border-radius: 10px;
    animation: headlightGlow 2s ease-in-out infinite alternate;
}

@keyframes headlightGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.8; }
}

.car-wheels-3d {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 40px;
    display: flex;
    justify-content: space-between;
}

.car-wheels-3d::before,
.car-wheels-3d::after {
    content: '';
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #333, #000);
    border-radius: 50%;
    border: 3px solid #666;
    animation: wheelSpin 3s linear infinite;
}

@keyframes wheelSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.car-lights-3d {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 20px;
    display: flex;
    justify-content: space-between;
}

.car-lights-3d::before,
.car-lights-3d::after {
    content: '';
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, #00ff88, #00cc6a);
    border-radius: 50%;
    box-shadow: 0 0 20px #00ff88;
    animation: lightBlink 1.5s ease-in-out infinite;
}

@keyframes lightBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Showcase Controls */
.showcase-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.2), transparent);
    transition: left 0.5s ease;
}

.control-btn:hover::before {
    left: 100%;
}

.control-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

.control-btn.active {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    border-color: #00ff88;
    color: #000;
    font-weight: 600;
}

/* Interactive States */
.car-model-3d.rotating {
    animation: rotate3D 4s linear infinite;
}

@keyframes rotate3D {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.car-model-3d.zoomed {
    transform: scale(1.5);
}

.car-model-3d.lighting-active .car-lights-3d::before,
.car-model-3d.lighting-active .car-lights-3d::after {
    animation: lightBlink 0.5s ease-in-out infinite;
    box-shadow: 0 0 30px #00ff88, 0 0 60px #00ff88;
}

/* Enhanced Car Cards for Explorer */
.cars-grid .car-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.car-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.car-card:hover::before {
    left: 100%;
}

.car-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.2);
    border-color: rgba(0, 255, 136, 0.3);
}

.car-card .car-image {
    transition: transform 0.6s ease;
}

.car-card:hover .car-image {
    transform: scale(1.1);
}

/* 3D Hover Effects */
.car-card.hover-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.car-card.hover-3d:hover {
    transform: rotateX(5deg) rotateY(5deg) translateZ(20px);
}

/* Loading Animation for Car Cards */
.car-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.car-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #00ff88;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .car-model-3d {
        width: 250px;
        height: 150px;
    }
    
    .car-body-3d {
        width: 160px;
        height: 60px;
    }
    
    .showcase-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 200px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .car-model-3d {
        width: 200px;
        height: 120px;
    }
    
    .car-body-3d {
        width: 130px;
        height: 50px;
    }
    
    .car-wheels-3d {
        width: 140px;
        height: 30px;
    }
    
    .car-wheels-3d::before,
    .car-wheels-3d::after {
        width: 25px;
        height: 25px;
    }
}
