/* Customer Layout */
body {
    font-family: 'Source Sans Pro', sans-serif;
    background-color: #f8f9fa;
}

.main-content {
    min-height: calc(100vh - 140px);
}

/* Configurator */
.configurator-container {
    display: flex;
    gap: 20px;
    min-height: 600px;
}

.configurator-main {
    flex: 0 0 60%;
    max-width: 60%;
    min-width: 0;
}

.configurator-sidebar {
    flex: 0 0 40%;
    max-width: 40%;
}

/* When preview is hidden, sidebar is just price breakdown */
.configurator-container.no-preview .configurator-sidebar {
    flex: 0 0 300px;
    max-width: 300px;
}
.configurator-container.no-preview .configurator-main {
    flex: 1;
    max-width: none;
}

/* Step Progress Bar */
.step-progress {
    display: flex;
    margin-bottom: 25px;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.step-progress li {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    font-size: 0.8rem;
    color: #999;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 80px;
    white-space: nowrap;
}

.step-progress li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 60%;
    transform: translateY(-50%);
    background: #e0e0e0;
}

.step-progress li.active {
    color: #0077b6;
    font-weight: 700;
    background: rgba(0, 119, 182, 0.05);
}

.step-progress li.completed {
    color: #28a745;
}

.step-progress li.completed::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 4px;
    font-size: 0.75rem;
}

.step-progress li:hover {
    background: rgba(0,0,0,0.02);
}

.step-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.step-progress li.active .step-number {
    background: #0077b6;
    color: #fff;
}

.step-progress li.completed .step-number {
    background: #28a745;
    color: #fff;
}

/* Option Cards */
.option-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.option-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.option-card:hover {
    border-color: #0077b6;
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.15);
    transform: translateY(-2px);
}

.option-card.selected {
    border-color: #0077b6;
    background: rgba(0, 119, 182, 0.03);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.2);
}

.option-card.selected::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 8px;
    color: #0077b6;
    font-size: 1.2rem;
}

.option-card-image {
    width: 100%;
    height: 100px;
    object-fit: contain;
    margin-bottom: 10px;
}

.option-card-placeholder {
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    color: #ccc;
    font-size: 2rem;
}

.option-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #333;
}

.option-card-price {
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 600;
}

.option-card-info {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #17a2b8;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.option-card-info:hover {
    background: #138496;
}

/* Input Step */
.input-step-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 0;
}

.input-step-container .form-control-lg {
    font-size: 2rem;
    text-align: center;
    padding: 15px;
}

/* Cable Preview */
.cable-preview-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

.cable-preview-box {
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 20px 10px;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 15px;
    overflow: hidden;
}

.preview-section {
    text-align: center;
    flex-shrink: 0;
}

.preview-section img {
    max-height: 60px;
    max-width: 80px;
    object-fit: contain;
}

.preview-center {
    flex: 1;
    position: relative;
}

.preview-cable-line {
    height: 4px;
    background: #666;
    border-radius: 2px;
    width: 100%;
    min-width: 60px;
}

.preview-label {
    font-size: 0.7rem;
    color: #666;
    margin-top: 5px;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-placeholder {
    width: 60px;
    height: 60px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 1.5rem;
}

/* Price Summary */
.price-summary {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.price-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
}

.price-line:last-child {
    border-bottom: none;
}

.price-total {
    display: flex;
    justify-content: space-between;
    padding: 10px 0 0;
    margin-top: 8px;
    border-top: 2px solid #333;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Navigation Buttons */
.configurator-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Summary Table */
.summary-table td {
    padding: 8px 12px;
}

.summary-table .step-name {
    color: #666;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 991px) {
    .configurator-container {
        flex-direction: column-reverse;
    }
    .configurator-sidebar {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .configurator-main {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .cable-preview-container {
        position: static;
    }
    .option-cards {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 576px) {
    .step-progress {
        font-size: 0.7rem;
    }
    .step-progress li {
        padding: 8px 4px;
        min-width: 60px;
    }
    .option-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
