/* Product Configurator Styles */
.product-configurator {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Header and Progress Bar */
.configurator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.configurator-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #000 0%, #333 100%);
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 14.28%; /* 1/7 steps */
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-step.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 2rem;
    text-align: center;
}

/* Option Grid */
.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.option-box {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.option-box:hover {
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.option-box.selected {
    border-color: #000;
    background: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.option-box.selected::before {
    content: '✓';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 24px;
    height: 24px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.option-image {
    margin-bottom: 1rem;
}

.bike-svg {
    width: 80px;
    height: 48px;
    margin: 0 auto;
}

.option-box h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.5rem;
}

.option-box .price {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

/* Color Options */
.color-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-option:hover {
    border-color: #000;
    transform: translateY(-2px);
}

.color-option.selected {
    border-color: #000;
    background: #f8f8f8;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-swatch.black { background: #000; }
.color-swatch.blue { background: #0066cc; }
.color-swatch.red { background: #cc0000; }
.color-swatch.pink { background: #ff69b4; }
.color-swatch.green { background: #00cc00; }
.color-swatch.orange { background: #ff6600; }

.color-option span {
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

/* Configuration Options */
.config-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.config-option {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.config-option:hover {
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.config-option.selected {
    border-color: #000;
    background: #f8f8f8;
}

.config-option h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.5rem;
}

.config-option p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.config-option .pricing {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f8f8;
    border-radius: 8px;
}

.config-option .pricing p {
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.config-option .note {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

/* Motor and Battery Options */
.motor-options, .battery-options {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.motor-category, .battery-category {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 1.5rem;
}

.motor-category h4, .battery-category h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    font-style: italic;
}

.motor-option, .battery-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.motor-option:hover, .battery-option:hover {
    border-color: #000;
    background: #f0f0f0;
}

.motor-option.selected, .battery-option.selected {
    border-color: #000;
    background: #f0f0f0;
}

.motor-option span:first-child, .battery-option span:first-child {
    font-weight: 500;
    color: #333;
}

.motor-option .price, .battery-option .price {
    font-weight: 600;
    color: #000;
}

/* Configuration Summary */
.configuration-summary {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: #000;
    border-top: 2px solid #000;
    padding-top: 1rem;
    margin-top: 1rem;
}

.summary-item .label {
    font-weight: 500;
    color: #666;
}

.summary-item .value {
    font-weight: 600;
    color: #000;
}

/* Buttons */
.button-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
}

.scroll-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.scroll-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.scroll-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.scroll-btn.prev-step {
    background: #666;
}

.scroll-btn.prev-step:hover {
    background: #555;
}

.scroll-btn.checkout-btn {
    background: #000;
    font-size: 1.1rem;
    padding: 1.2rem 2.5rem;
}

/* Help Section */
.help-section {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.help-link {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
}

.help-link:hover {
    color: #000;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .product-configurator {
        padding: 1rem;
        margin: 1rem;
    }
    
    .configurator-header h2 {
        font-size: 2rem;
    }
    
    .option-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .color-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .config-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .button-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .scroll-btn {
        width: 100%;
        min-width: auto;
    }
    
    /* Mobile carousel for options */
    .option-grid {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
    }
    
    .option-grid > * {
        scroll-snap-align: start;
        min-width: 280px;
    }
    
    .color-options {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
    }
    
    .color-options > * {
        scroll-snap-align: start;
        min-width: 120px;
    }
}

/* Smooth transitions for all interactive elements */
* {
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* Loading states */
.loading {
    opacity: 0.7;
    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 #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus states for accessibility */
.scroll-btn:focus,
.option-box:focus,
.color-option:focus,
.config-option:focus,
.motor-option:focus,
.battery-option:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .product-configurator {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .scroll-btn {
        display: none;
    }
}
