/* Custom CSS for Car Configurator */

/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

/* Navigation Enhancements */
.navbar-brand {
    font-weight: 600;
    font-size: 1.4rem;
}

/* Configuration Sidebar */
.config-section {
    transition: all 0.3s ease;
}

.config-option {
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.config-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.config-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.1);
}

.config-option .option-price {
    font-weight: 600;
    color: var(--primary-color);
}

/* Color Swatches */
.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.color-swatch.selected {
    box-shadow: 0 0 0 3px var(--primary-color);
    transform: scale(1.1);
}

.color-swatch.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    font-size: 0.8rem;
}

/* Car Visualizer */
#carVisualizer {
    position: relative;
    overflow: hidden;
}

.car-image {
    max-width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

.car-image.fade-out {
    opacity: 0;
}

.car-image.fade-in {
    opacity: 1;
}

/* Image Controls */
#viewControls .btn {
    border-radius: 20px;
    font-weight: 500;
}

#imageNavigation .btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Price Display */
.price-highlight {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.price-from {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Cards Enhancements */
.card {
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-header {
    background-color: rgba(13, 110, 253, 0.05);
    border-bottom: 1px solid rgba(13, 110, 253, 0.1);
}

/* Specifications List */
.spec-list {
    list-style: none;
    padding: 0;
}

.spec-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
}

.spec-list li:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 500;
    color: var(--dark-color);
}

.spec-value {
    color: var(--secondary-color);
}

/* Features List */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.feature-list li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .col-lg-4 {
        position: relative;
        min-height: auto;
    }
    
    .sticky-top {
        position: relative !important;
        top: auto !important;
    }
}

@media (max-width: 767.98px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .color-swatch {
        width: 35px;
        height: 35px;
    }
    
    #imageNavigation .btn {
        width: 35px;
        height: 35px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in {
    animation: slideIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Toast Customizations */
.toast {
    backdrop-filter: blur(10px);
}

.toast-success {
    background-color: rgba(25, 135, 84, 0.9);
    color: white;
}

.toast-error {
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
}

.toast-info {
    background-color: rgba(13, 202, 240, 0.9);
    color: white;
}

/* Video Feature Enhancements */
.feature-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.feature-list li:last-child {
    border-bottom: none;
}

.btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    border-radius: 0.2rem;
}

.video-play-btn {
    transition: all 0.2s ease;
}

.video-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Video Modal Enhancements */
#featureVideoModal .modal-content {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.175);
}

#featureVideoModal video {
    border-radius: 0.5rem;
}

/* Loading state for videos */
video::-webkit-media-controls-start-playback-button {
    display: none!important;
    -webkit-appearance: none;
}