/* === Progress bar & multi-step form styles === */
.progress-container {
    width: 100%;
    max-width: 800px;
    margin: 30px auto;
    padding: 20px 0;
}

.progress-line {
    position: relative;
    height: 4px;
    background: #e0e0e0;
    margin: 0 auto;
    width: 84%;
    border-radius: 2px;
}

.progress-step {
    position: absolute;
    top: -11px;
    width: 22px;
    height: 22px;
    background: #aaaaaa;
    border-radius: 50%;
    border: 3px solid white;
    transform: translateX(-50%);
    transition: background 0.25s, transform 0.25s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.progress-step.active {
    background: #b30000;
    transform: translateX(-50%) scale(1.18);
}

.progress-labels {
    width: 84%;
    margin: 14px auto 0 auto;
    position: relative;
    font-size: 13px;
    height: 40px;
}

/* Position each label to match the progress steps exactly */
.progress-labels > div {
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
    font-weight: 500;
    color: #555;
}

.progress-labels > div:nth-child(1) {
    left: 0%;
}

.progress-labels > div:nth-child(2) {
    left: 33.33%;
}

.progress-labels > div:nth-child(3) {
    left: 66.67%;
}

.progress-labels > div:nth-child(4) {
    left: 100%;
}

/* Multi-step form container */
#multiStepForm {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.form-step {
    display: none;
    margin-top: 24px;
    margin-bottom: 24px;
}

.form-step.active {
    display: block;
}

/* Center form content */
.form-step h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
}

.form-step h4 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #444;
    font-size: 18px;
    text-align: center;
}

/* Form controls - centered and constrained width */
.form-step .form-control,
.form-step select,
.form-step input[type="text"],
.form-step input[type="number"],
.form-step input[type="email"] {
    max-width: 400px;
    margin: 10px auto;
    display: block;
    padding: 10px 15px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-step .form-control:focus,
.form-step select:focus,
.form-step input:focus {
    border-color: #b30000;
    box-shadow: 0 0 0 0.2rem rgba(179, 0, 0, 0.1);
    outline: none;
}

/* Checkbox options styling */
.form-step > div {
    max-width: 500px;
    margin: 15px auto;
    text-align: center;
}

.form-step label.checkbox-inline {
    margin: 0 15px 10px 0;
    display: inline-block;
    font-weight: normal;
    cursor: pointer;
}

.form-step label.checkbox-inline input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

/* Step 1 - State selection centering */
#step-1 {
    text-align: center;
}

#step-1 select {
    margin: 20px auto;
}

/* Step 2 - Engine specs */
#step-2 label:not(.checkbox-inline) {
    display: block;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

/* Step 3 - Billing & Shipping side by side */
#step-3 .row {
    max-width: 900px;
    margin: 0 auto;
}

#step-3 .form-control,
#step-3 input {
    max-width: 100%;
    margin: 10px 0;
}

#step-3 h4 {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #b30000;
}

/* Form actions - centered buttons */
.form-actions {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
}

.next-btn,
.prev-btn,
#submitOrder {
    margin: 6px 8px;
    padding: 10px 30px;
    font-size: 16px;
    border-radius: 10px !important;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background-color: #b30000 !important;
    border-color: #b30000 !important;
}

.btn-primary:hover {
    background-color: #8b0000 !important;
    border-color: #8b0000 !important;
}

.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

.btn-secondary:hover {
    background-color: #545b62 !important;
    border-color: #545b62 !important;
}

.btn-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

.btn-success:hover {
    background-color: #218838 !important;
    border-color: #218838 !important;
}

/* keep existing table style available if needed elsewhere */
table,
th,
td {
    border: 1px solid black;
    border-collapse: collapse;
}

th,
td {
    padding: 5px;
    text-align: center;
}

/* validation error */
.input-error {
    border-color: #d9534f !important;
    box-shadow: 0 0 0 0.2rem rgba(217, 83, 79, 0.1);
}

.error-text {
    color: #d9534f;
    font-size: 0.9em;
    margin-top: 6px;
    text-align: center;
    font-weight: 500;
}

@media (max-width:767px) {
    .progress-line,
    .progress-labels {
        width: 96%;
    }

    #multiStepForm {
        padding: 15px;
    }

    .form-step .form-control,
    .form-step select,
    .form-step input {
        max-width: 100%;
    }

    #step-3 .col-md-6 {
        margin-bottom: 30px;
    }

    .next-btn,
    .prev-btn,
    #submitOrder {
        display: block;
        width: 100%;
        margin: 8px 0;
    }
}