/* 1. Theme Variables & Base Styles */
:root {
    --primary-blue: #004AAD;
    --accent-orange: #FF6B00;
    --neutral-light: #F3F4F6;
    --neutral-medium: #E5E7EB;
    --text-color: #1F2937; /* Dark Gray for text */
}

.configurator-wrapper {
    /* Removed redundant body styles from here, only container styles remain */
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 1rem 0 1rem; /* Added padding here for mobile spacing */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Apply smooth transitions to all elements */
* {
    transition: all 0.3s ease;
}

.configurator-header {
    background-color: var(--primary-blue);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
    margin-left: -1rem; /* Counteract wrapper padding if needed, adjust based on theme */
    margin-right: -1rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 512px;
    margin-left: auto;
    margin-right: auto;
}

.header-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
}

.header-subtitle {
    font-size: 0.875rem;
    color: #BFDBFE;
}

/* 2. Main Content & Step Container */
.configurator-main {
    flex-grow: 1;
    padding-top: 1rem; /* Padding top for separation */
    width: 100%;
}

.step-container {
    min-height: 50vh;
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--primary-blue);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

/* 3. Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    text-align: center;
}

.step-indicator {
    width: 25%; /* Changed from 33.333% to 25% for 4 steps */
    padding: 0.5rem 0.2rem;
    font-size: 0.75rem; /* Reduced size slightly for 4 steps */
    border-radius: 9999px;
    font-weight: 500;
    background-color: var(--neutral-medium);
    color: #9CA3AF;
    margin: 0 2px;
}

.step-indicator.active-step {
    background-color: var(--accent-orange);
    color: white;
}

.step-indicator.completed-step {
    background-color: var(--primary-blue);
    color: white;
}

/* 4. Inputs (Step 1) */
.input-group {
    display: flex;
    margin-bottom: 2rem;
    gap: 0.75rem;
}

.input-wrapper {
    flex: 1;
}

.input-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4B5563;
}

.input-field-group {
    margin-top: 0.25rem;
    display: flex;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.input-field {
    flex: 1;
    display: block;
    width: 100%;
    border: 1px solid #D1D5DB;
    padding: 0.5rem 1rem;
    font-size: 1.125rem;
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.5);
}

.input-unit {
    display: inline-flex;
    align-items: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border: 1px solid #D1D5DB;
    border-left: 0;
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    background-color: var(--neutral-medium);
    color: #6B7280;
    font-size: 1.125rem;
    font-weight: bold;
}

/* 5. Option Cards */
.card-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
/* Ensure single-column layouts (Steps 2, 3, 4) still work */
.card-options.single-column {
    grid-template-columns: 1fr;
}

.option-card {
    cursor: pointer;
    padding: 0.75rem;
    border: 2px solid var(--neutral-medium);
    border-radius: 0.75rem;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    height: 10rem;
}

.option-card:hover {
    border-color: var(--accent-orange);
}

.option-card.card-small {
    height: 5rem;
}

.option-card.card-medium {
    height: 6rem;
}

.card-selected {
    border-color: var(--accent-orange) !important;
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.5);
}

.card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
}

.card-title {
    font-size: 0.875rem;
    font-weight: bold;
    color: var(--text-color);
}

.card-subtitle {
    font-size: 0.75rem;
    color: #4B5563;
    margin-top: 0.25rem;
}

.card-footer-text {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4B5563;
}

.card-image {
    border-radius: 0.25rem;
    width: 4rem;
    height: 2.5rem;
    object-fit: cover;
}

/* 6. Color Cards (Step 2) */
.color-options {
    display: flex;
    overflow-x: auto;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
}

.color-card {
    cursor: pointer;
    flex-shrink: 0;
    width: 6rem;
    height: 7rem;
    padding: 0.25rem;
    border: 2px solid #D1D5DB;
    border-radius: 0.75rem;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.color-card:hover {
    border-color: var(--accent-orange);
}

.color-code {
    font-size: 0.75rem;
    color: #4B5563;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.color-name {
    font-size: 0.875rem;
    color: var(--text-color);
    font-weight: bold;
    line-height: 1.25;
}

.color-swatch {
    width: 100%;
    height: 2.5rem;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* 7. Footer & Buttons */
.configurator-footer {
    background-color: white;
    border-top: 1px solid #E5E7EB;
    padding: 1rem;
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-top: auto; /* Push to bottom */
}

.footer-content {
    max-width: 512px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.price-label {
    font-size: 0.75rem;
    color: #4B5563;
}

.total-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-orange);
}

.navigation-buttons {
    display: flex;
    gap: 0.75rem;
}

.nav-btn {
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: none;
}

#prev-btn {
    background-color: var(--neutral-medium);
    color: #4B5563;
}

#prev-btn:hover:not(:disabled) {
    background-color: #D1D5DB;
}

#next-btn {
    background-color: var(--accent-orange);
    color: white;
    font-weight: bold;
    box-shadow: 0 10px 15px -3px rgba(255, 107, 0, 0.2), 0 4px 6px -2px rgba(255, 107, 0, 0.1);
}

#next-btn:hover:not(:disabled) {
    background-color: #C55500;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.info-box {
    padding: 1rem;
    background-color: var(--neutral-light);
    border-radius: 0.5rem;
}

.info-box p {
    font-size: 0.875rem;
    color: #4B5563;
}

.footer-info {
    text-align: center;
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 0.5rem;
}

/* Additional Step 4/Form styles */
#quote-form div {
    margin-bottom: 1rem;
}
#quote-form input {
    border: 1px solid #D1D5DB;
    padding: 0.5rem;
    border-radius: 0.5rem;
    width: 100%;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    /* Match the input field focus style */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#quote-form input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.5);
}

header.configurator-header {
    display: none;
}
.configurator-wrapper {
    padding: 0;
}