/* Calculator Styles */
.calculator-section {
    padding: 0;
    background: none;
}

.calculator-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 0;
    overflow: hidden;
}

/* Steps indicator */
.steps-indicator {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    border-bottom: none;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    right: -50%;
    width: 100%;
    height: 2px;
    background-color: #ced4da;
    z-index: 0;
}

.step.active {
    opacity: 1;
}

.step.active .step-number {
    background-color: #4CAF50;
    color: white;
}

.step.active:not(:last-child)::after {
    background-color: #4CAF50;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.2rem;
    z-index: 1;
    transition: all 0.3s ease;
}

.step-title {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Calculator steps */
.calculator-steps {
    position: relative;
    min-height: 400px;
}

.calculator-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.calculator-step.active {
    display: block;
}

.calculator-step-content {
    padding: 30px;
}

/* Load selection (Step 1) */
.load-selector {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.load-categories {
    width: 100%;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 0;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 2px solid transparent;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    color: #64748b;
    font-family: inherit;
}

.category-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
}

.category-btn.active {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.load-items-container {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.search-container {
    position: relative;
    margin-bottom: 15px;
}

.search-input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.load-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.load-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.load-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.load-item-info {
    flex: 1;
}

.load-item-info h4 {
    font-size: 0.9rem;
    margin: 0 0 5px 0;
}

.load-item-info p {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}

.add-load-btn {
    background: #4CAF50;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-load-btn:hover {
    background: #388e3c;
    transform: scale(1.1);
}

/* Selected loads list */
.selected-loads {
    margin-top: 30px;
}

/* Loads list items */
.loads-list {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
}
.loads-list:empty {
    display: none;
}
.load-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
    gap: 16px;
}
.load-list-item:last-child {
    border-bottom: none;
}
.load-list-item:nth-child(even) {
    background: rgba(248,250,252,0.6);
}
.load-list-item:hover {
    background: rgba(99,102,241,0.08);
}
.load-list-main {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 16px;
}
.load-list-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f172a;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.load-list-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: #64748b;
    background: #f8fafc;
    padding: 4px 10px;
    border-radius: 100px;
    white-space: nowrap;
}
.meta-chip i {
    font-size: 0.72rem;
    color: #6366f1;
}
.meta-chip.meta-total {
    background: rgba(99,102,241,0.08);
    color: #4f46e5;
    font-weight: 600;
}
.meta-chip.meta-total i {
    color: #4f46e5;
}
.load-list-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Total bar */
.loads-total-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-radius: 12px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
}
.loads-total-bar .total-label {
    font-size: 0.88rem;
    font-weight: 600;
    opacity: 0.9;
}
.loads-total-bar .total-value {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .loads-list {
        border: none;
        background: transparent;
        box-shadow: none;
        gap: 10px;
    }
    .load-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
    }
    .load-list-item:nth-child(even) { background: #fff; }
    .load-list-item:hover { background: #fff; }
    .load-list-main {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 10px;
    }
    .load-list-name {
        font-size: 0.95rem;
        white-space: normal;
        overflow: visible;
        width: 100%;
    }
    .load-list-meta {
        flex-wrap: wrap;
        width: 100%;
        gap: 6px;
    }
    .meta-chip {
        font-size: 0.8rem;
        padding: 3px 10px;
    }
    .load-list-actions {
        width: 100%;
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px solid #f1f5f9;
    }
    .loads-total-bar {
        margin-top: 14px;
        padding: 14px 16px;
    }
    .loads-total-bar .total-label { font-size: 0.85rem; }
    .loads-total-bar .total-value { font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .load-list-item {
        padding: 12px;
        gap: 10px;
    }
    .load-list-name {
        font-size: 0.9rem;
    }
    .meta-chip {
        font-size: 0.78rem;
        padding: 3px 8px;
    }
    .loads-total-bar {
        padding: 12px 14px;
    }
    .loads-total-bar .total-value {
        font-size: 1.05rem;
    }
}

.btn-icon {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    margin-right: 5px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    color: #343a40;
}

.edit-load:hover {
    color: #007bff;
}

.remove-load:hover {
    color: #dc3545;
}

.no-loads-message {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    border: 1px dashed #ced4da;
    border-radius: 8px;
    margin-top: 15px;
}

.no-loads-message i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* Custom load form */
.custom-load-form {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Calculate Requirements (Step 2) */
.requirement-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.requirement-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.icon-container {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.requirement-info {
    flex: 1;
}

.requirement-info h3 {
    font-size: 0.9rem;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.requirement-info p {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 700;
    color: #343a40;
}

.additional-requirements {
    background: #f8fafc;
    border-radius: 16px;
    padding: 28px;
    border: 1px solid #e2e8f0;
}

.help-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 20px;
}

/* Location card shown at top of Step 4 */
.calc-location-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
    transition: box-shadow 0.2s ease;
}
.calc-location-card:hover {
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.14);
}
.calc-location-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #6366f1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-top: 2px;
}
.calc-location-body {
    flex: 1;
    min-width: 0;
}
.calc-location-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 6px;
}
.calc-location-body .help-text {
    margin-bottom: 14px;
    color: #64748b;
}
.calc-location-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.calc-location-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 160px;
    min-width: 140px;
}
.calc-location-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.calc-location-field input {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s;
}
.calc-location-field input:focus {
    border-color: #6366f1;
    outline: none;
}
.calc-location-btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.calc-location-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.calc-location-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #e0e7ff;
    color: #4338ca;
}
.calc-location-chip .clear-chip {
    cursor: pointer;
    color: #4338ca;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.calc-location-chip .clear-chip:hover {
    opacity: 1;
}

/* Recommended Solutions (Step 3) */
.recommendation-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.recommendation-card.ideal {
    border: 2px solid #4CAF50;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.2);
}

.recommendation-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.recommendation-badge.visible {
    opacity: 1;
    transform: translateY(0);
}

.recommendation-badge i {
    margin-right: 5px;
}

.recommendation-image {
    width: 200px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.recommendation-image img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.recommendation-content {
    flex: 1;
    padding: 20px;
}

.recommendation-content h3 {
    margin: 0 0 15px 0;
}

.recommendation-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.recommendation-specs li {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.recommendation-specs li i {
    margin-right: 5px;
    color: #6c757d;
}

.recommendation-match {
    font-size: 0.9rem;
    margin-bottom: 15px;
    padding: 8px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

/* No match container */
.no-match-message {
    text-align: center;
    padding: 30px;
    margin-bottom: 20px;
}

.no-match-message i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 15px;
    display: block;
}

.contact-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

/* Accessories suggestion */
.accessories-suggestion {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.accessories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.accessory-card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.2s ease;
}

.accessory-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.accessory-checkbox {
    position: absolute;
    top: 10px;
    right: 10px;
}

.accessory-checkbox input {
    display: none;
}

.accessory-checkbox label {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ced4da;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.accessory-checkbox input:checked + label {
    background: #4CAF50;
    border-color: #4CAF50;
}

.accessory-checkbox input:checked + label::after {
    content: '✓';
    position: absolute;
    color: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
}

.accessory-image {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.accessory-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.accessory-content h4 {
    font-size: 0.9rem;
    margin: 0 0 10px 0;
}

.accessory-price {
    font-weight: 600;
    margin: 0;
    color: #343a40;
}

/* Additional calculators */
.additional-calculators {
    margin-top: 30px;
}

.calculator-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.calculator-options button {
    flex: 1;
    min-width: 150px;
}

.calculator-options i {
    margin-right: 5px;
}

/* Step navigation */
.step-navigation {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
}

/* Form styles */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.form-group {
    padding: 0 10px;
    margin-bottom: 15px;
    flex: 1;
    min-width: 0;
}

label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
}

textarea {
    resize: vertical;
}

.form-help {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
    display: block;
}

/* Button styles */
.btn {
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn i {
    margin-right: 5px;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #388e3c;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-outline {
    background: transparent;
    border: 1px solid #ced4da;
    color: #343a40;
}

.btn-outline:hover {
    background: #f8f9fa;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideDown 0.3s ease;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.5rem;
    color: #adb5bd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close:hover {
    color: #343a40;
}

/* Notification styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    max-width: 350px;
}

.notification {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

.notification.success {
    border-left: 4px solid #4CAF50;
}

.notification.error {
    border-left: 4px solid #dc3545;
}

.notification.info {
    border-left: 4px solid #007bff;
}

.notification i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.notification.success i {
    color: #4CAF50;
}

.notification.error i {
    color: #dc3545;
}

.notification.info i {
    color: #007bff;
}

.notification p {
    margin: 0;
    font-size: 0.9rem;
}

.notification.fade-out {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Cart Button Styles */
.add-to-cart-btn {
    transition: all 0.3s ease;
}

.add-to-cart-btn.added {
    background-color: #2ecc71;
    border-color: #27ae60;
}

#view-cart-button {
    display: flex;
    align-items: center;
    gap: 8px;
}

#view-cart-button i {
    margin-right: 4px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .load-selector {
        flex-direction: column;
    }

    .load-categories {
        width: 100%;
        display: flex;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }

    .category-btn {
        padding: 8px 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .recommendation-card {
        flex-direction: column;
    }

    .recommendation-image {
        width: 100%;
    }

    .step-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .step-navigation button,
    .step-navigation a {
        width: 100%;
    }

    .requirement-card {
        padding: 15px;
    }

    .icon-container {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* ========== WIRING & DISTANCES SECTION ========== */
.wiring-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}
.wiring-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}
.wire-calc-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.wire-calc-card h3 {
    font-size: 15px;
    font-weight: 700;
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wire-calc-table {
    width: 100%;
    border-collapse: collapse;
}
.wire-calc-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.wire-calc-table td {
    padding: 10px 16px;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}
.wire-calc-table tr:last-child td { border-bottom: none; }

/* ========== BOM SECTION ========== */
.bom-section { margin-top: 20px; }
.bom-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bom-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}
.bom-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.bom-table td {
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
}
.bom-table tr:last-child td { border-bottom: none; }
.bom-table .bom-category {
    background: #f5f3ff;
    font-weight: 700;
    color: #7c3aed;
    font-size: 13px;
}
.bom-total-row td {
    font-weight: 700;
    font-size: 15px;
    border-top: 2px solid #e2e8f0;
    background: #f8fafc;
}

/* ========== WHOLESALER CARDS ========== */
.wholesaler-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wholesaler-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.wholesaler-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}
.wholesaler-card:hover { border-color: #7c3aed; box-shadow: 0 4px 12px rgba(124,58,237,0.1); }
.wholesaler-card.selected { border-color: #7c3aed; background: #faf5ff; }
.wholesaler-card.selected::after {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    color: #7c3aed;
    font-size: 22px;
}
.ws-name { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.ws-location { font-size: 12px; color: #64748b; margin-bottom: 8px; display: flex; align-items: center; gap: 4px; }
.ws-price { font-size: 22px; font-weight: 700; color: #059669; margin: 10px 0; }
.ws-meta { display: flex; gap: 16px; font-size: 12px; color: #64748b; }
.ws-meta span { display: flex; align-items: center; gap: 4px; }
.ws-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}
.ws-badge.nearest { background: #ecfdf5; color: #059669; }
.ws-badge.verified { background: #eff6ff; color: #2563eb; }

/* ========== INSTALLER SECTION ========== */
.installer-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.installer-quote-card {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 20px;
    margin-top: 12px;
}
.installer-name { font-size: 16px; font-weight: 700; }
.installer-rating { color: #f59e0b; font-size: 14px; margin: 4px 0; }
.installer-price { font-size: 24px; font-weight: 700; color: #059669; margin: 8px 0; }
.installer-details { font-size: 13px; color: #64748b; margin-top: 8px; }
.installer-details span { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.installer-btn-row { margin-top: 12px; display: flex; gap: 8px; }

/* ========== INTERACTIVE BOM CARD LIST ========== */
.bom-card-list { display: flex; flex-direction: column; gap: 2px; }
.bom-cat-header {
    background: #f1f5f9;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}
.bom-cat-items { display: flex; flex-direction: column; }
.bom-item-row {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-left: 4px solid #e2e8f0;
    background: #fff;
    transition: all 0.2s;
    gap: 12px;
}
.bom-item-row:hover { background: #f8fafc; }
.bom-item-row.bom-selected { border-left-color: #059669; background: #f0fdf4; }
.bom-item-row.bom-rejected { border-left-color: #dc2626; background: #fef2f2; opacity: 0.65; }
.bom-item-row.bom-pending { border-left-color: #f59e0b; }
.bom-item-status { font-size: 18px; flex-shrink: 0; }
.bom-item-info { flex: 1; min-width: 0; }
.bom-item-name { font-size: 14px; font-weight: 600; color: #1e293b; word-break: break-word; }
.bom-item-qty { font-size: 12px; color: #64748b; margin-top: 2px; }
.bom-item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.bom-btn {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.bom-btn-add { background: #059669; color: #fff; }
.bom-btn-add:hover { background: #047857; }
.bom-btn-reject { background: #fff; color: #dc2626; border: 1px solid #fecaca; }
.bom-btn-reject:hover { background: #fef2f2; }

/* ========== INVERTER SELECTION CARDS ========== */
.inverter-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.inverter-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
}
.inverter-card:hover { border-color: #93c5fd; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.inverter-card.selected { border-color: #059669; box-shadow: 0 0 0 3px rgba(5,150,105,0.15); }
.inverter-card-img { height: 160px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #f8fafc; }
.inverter-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.inverter-card-content { padding: 16px; }
.inverter-card-content h4 { font-size: 15px; font-weight: 700; margin: 0 0 10px; color: #1e293b; }
.inverter-specs { list-style: none; padding: 0; margin: 0 0 10px; }
.inverter-specs li { font-size: 13px; color: #475569; padding: 3px 0; display: flex; align-items: center; gap: 6px; }
.inverter-match { font-size: 12px; color: #64748b; margin-bottom: 12px; font-style: italic; }
.select-inv-btn { width: 100%; }

/* ========== WHOLESALER MATERIALS ========== */
.ws-materials {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
}
.ws-materials ul { list-style: none; padding: 0; margin: 6px 0 0; }
.ws-materials ul li {
    padding: 3px 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
}
.ws-missing-header { color: #92400e !important; font-weight: 600; margin-top: 6px !important; }
.ws-missing-item { color: #dc2626 !important; padding-left: 8px !important; }
.wholesaler-card.ws-has-all { border-left: 4px solid #059669; }
.select-ws-btn { margin-top: 12px; width: 100%; }

/* ========== INSTALLER CARDS ========== */
.installer-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}
.installer-card-item {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.installer-card-item:hover { border-color: #93c5fd; }
.installer-card-item.selected { border-color: #059669; background: #f0fdf4; }
.installer-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.select-inst-btn { margin-top: 10px; width: 100%; }

/* ========== INFO ICONS &amp; POPUPS ========== */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    font-size: 12px;
    cursor: pointer;
    margin-left: 4px;
    transition: all 0.2s;
    vertical-align: middle;
}
.info-icon:hover { background: #0284c7; color: #fff; }

.info-popup {
    position: absolute;
    z-index: 1000;
    min-width: 280px;
    max-width: 400px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.info-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    color: #1e293b;
}
.info-popup-close {
    cursor: pointer;
    font-size: 20px;
    color: #94a3b8;
    font-weight: 700;
    line-height: 1;
}
.info-popup-close:hover { color: #ef4444; }
.info-popup-body {
    padding: 12px 14px;
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
}
.info-popup-body p { margin: 0 0 8px; }
.info-popup-body p:last-child { margin-bottom: 0; }

/* ========== PARALLELING SUGGESTION UI ========== */
.parallel-section {
    background: #fff7ed;
    border: 2px solid #fdba74;
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 16px;
}
.parallel-section h4 {
    font-size: 16px;
    color: #c2410c;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.parallel-section p {
    font-size: 13px;
    color: #7c2d12;
    margin: 0 0 16px;
    line-height: 1.6;
}
.parallel-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.parallel-buttons .btn { font-size: 13px; }
.parallel-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}
.parallel-badge.hybrid { background: #dcfce7; color: #166534; }
.parallel-badge.parallel { background: #f3e8ff; color: #6b21a8; }

/* ============================================================
   Sourcing Notice Banner
   ============================================================ */
.sourcing-notice-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.sourcing-notice-full {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.sourcing-notice-icon {
    width: 44px;
    height: 44px;
    background: #fef3c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: #d97706;
}
.sourcing-notice-full .sourcing-notice-icon {
    background: #e2e8f0;
    color: #64748b;
}
.sourcing-notice-body {
    flex: 1;
    min-width: 200px;
}
.sourcing-notice-body h4 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
    line-height: 1.4;
}
.sourcing-notice-full .sourcing-notice-body h4 {
    color: #334155;
}
.sourcing-notice-body p {
    margin: 0 0 6px;
    font-size: 13px;
    color: #78350f;
    line-height: 1.6;
}
.sourcing-notice-full .sourcing-notice-body p {
    color: #475569;
}
.sourcing-missing-list {
    margin: 6px 0 0 0;
    padding: 0 0 0 18px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.9;
}
.sourcing-notice-full .sourcing-missing-list {
    color: #64748b;
}
.sourcing-notice-cta {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-top: 4px;
}
.btn-warning {
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-warning:hover { background: #d97706; }

/* ========== PRODUCT SELECTION (Battery & Panel Cards) ========== */
.product-selection-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
}
.product-selection-section h3 {
    font-size: 18px;
    color: #1e293b;
    margin: 0 0 4px;
}
.product-selection-section .step-description {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}
.product-selection-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.product-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
}
.product-card:hover { border-color: #93c5fd; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.product-card.selected { border-color: #059669; box-shadow: 0 0 0 3px rgba(5,150,105,0.15); }
.product-card.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: #059669;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 2;
}
.product-card-img {
    height: 160px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    position: relative;
}
.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
}
.product-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #f59e0b;
    color: #1e293b;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}
.product-card-content { padding: 16px; }
.product-card-content h4 { font-size: 15px; font-weight: 700; margin: 0 0 8px; color: #1e293b; }
.product-card-specs { list-style: none; padding: 0; margin: 0 0 10px; }
.product-card-specs li {
    font-size: 13px;
    color: #475569;
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.product-card-specs li i { color: #3b82f6; width: 14px; text-align: center; }
.product-card-calc { font-size: 12px; color: #059669; margin-bottom: 12px; font-weight: 600; }
.select-product-btn { width: 100%; }

.product-selection-cards .loading-container {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
}
.no-items-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: #64748b;
    font-size: 14px;
}

/* ====================================================================
   MULTI-WHOLESALER SELECTION STYLES
   ==================================================================== */

/* Wholesaler filter bar - clean, minimal, pill-style */
.ws-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    position: relative;
}

/* Large, friendly search box */
.ws-search-box {
    position: relative;
    flex: 1 1 240px;
    min-width: 180px;
}
.ws-search-box > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}
.ws-search-box input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 40px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #ffffff;
    font-size: 14px;
    color: #1e293b;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.ws-search-box input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}
.ws-search-box input::placeholder {
    color: #94a3b8;
}

/* Filter options group */
.ws-filter-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Location dropdown trigger pill */
.ws-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #ffffff;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
    white-space: nowrap;
}
.ws-filter-pill:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}
.ws-filter-pill.active {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}
.ws-filter-pill > i:first-child {
    color: #6366f1;
}
.ws-pill-chevron {
    font-size: 10px;
    color: #94a3b8;
    margin-left: 2px;
}

/* Availability pills */
.ws-availability-pills {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 20px;
}
.ws-availability-pills .ws-pill {
    height: 32px;
    padding: 0 14px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.ws-availability-pills .ws-pill:hover:not(.active) {
    color: #475569;
    background: #e2e8f0;
}
.ws-availability-pills .ws-pill.active {
    background: #ffffff;
    color: #6366f1;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* Location dropdown panel */
.ws-location-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 100;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    min-width: 320px;
    animation: dropdownIn 0.18s ease;
}
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ws-location-fields {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
.ws-location-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}
.ws-location-field label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ws-location-field select {
    width: 100%;
    height: 36px;
    padding: 0 28px 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 13px;
    color: #334155;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}
.ws-location-field select:focus {
    outline: none;
    border-color: #6366f1;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.10);
}
.ws-location-clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 36px;
    padding: 0 12px;
    border: none;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.ws-location-clear:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Wholesaler card with checkbox */
.wholesaler-card.multi-select {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}
.wholesaler-card.multi-select.selected {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}
.ws-checkbox {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 24px;
    height: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.wholesaler-card.multi-select.selected .ws-checkbox {
    background: #6366f1;
    border-color: #6366f1;
}
.ws-checkbox::after {
    content: '✓';
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.2s;
}
.wholesaler-card.multi-select.selected .ws-checkbox::after {
    opacity: 1;
}
.ws-coverage-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
}
.ws-coverage-badge.full {
    background: #dcfce7;
    color: #166534;
}
.ws-coverage-badge.partial {
    background: #fef3c7;
    color: #92400e;
}
.ws-adds-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #ede9fe;
    color: #5b21b6;
    margin-left: 6px;
}

/* Show more wholesalers button */
.ws-show-more-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 16px;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.ws-show-more-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #334155;
}
.ws-show-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.ws-show-more-btn.loading {
    opacity: 0.7;
}

/* BOM Coverage Tracker */
.coverage-tracker {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    border: 2px solid #e2e8f0;
}
.coverage-tracker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.coverage-tracker-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}
.coverage-pct {
    font-size: 24px;
    font-weight: 800;
    color: #6366f1;
}
.coverage-bar-container {
    background: #e2e8f0;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}
.coverage-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}
.coverage-bar-fill.low {
    background: linear-gradient(90deg, #ef4444, #f97316);
}
.coverage-bar-fill.mid {
    background: linear-gradient(90deg, #f59e0b, #eab308);
}
.coverage-items-list {
    max-height: 300px;
    overflow-y: auto;
}
.coverage-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 14px;
}
.coverage-item.covered {
    background: #f0fdf4;
    color: #166534;
}
.coverage-item.covered i {
    color: #22c55e;
}
.coverage-item.missing {
    background: #fef2f2;
    color: #991b1b;
}
.coverage-item.missing i {
    color: #ef4444;
}
.coverage-item.covered-by {
    font-size: 12px;
    color: #64748b;
    margin-left: 24px;
}

/* Missing Items Panel */
.missing-items-panel {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
}
.missing-items-panel h4 {
    color: #92400e;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.missing-items-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
.missing-items-list li {
    padding: 8px 12px;
    border-left: 3px solid #ef4444;
    background: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: #7c2d12;
}
.missing-items-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.missing-items-actions .btn-request {
    padding: 10px 20px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.missing-items-actions .btn-request:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}
.missing-items-actions .btn-skip {
    padding: 10px 20px;
    background: #fff;
    color: #64748b;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.missing-items-actions .btn-skip:hover {
    border-color: #94a3b8;
    color: #334155;
}

/* BOM Skipped Item */
.bom-item-row.bom-skipped {
    opacity: 0.5;
    text-decoration: line-through;
    background: #fef2f2;
}
.bom-item-row.bom-skipped .bom-item-name {
    text-decoration: line-through;
}
.bom-skip-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #fecaca;
    color: #991b1b;
    margin-left: 8px;
}
.bom-undo-skip {
    background: none;
    border: none;
    color: #6366f1;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 8px;
}
.bom-undo-skip:hover {
    color: #4f46e5;
}

/* Installer Skip Button */
.installer-skip-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.installer-skip-btn:hover {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}
.installer-skip-btn.skipped {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

/* Wholesaler selection error */
.ws-selection-error {
    display: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 12px 16px;
    color: #991b1b;
    font-size: 14px;
    margin-top: 12px;
    text-align: center;
}

/* ========== RESPONSIVE BREAKPOINTS FOR STEP 4 ========== */
@media (max-width: 1024px) {
    .wholesaler-cards {
        grid-template-columns: 1fr;
    }
    .product-selection-cards {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    .inverter-cards {
        grid-template-columns: 1fr;
    }
    .coverage-tracker {
        padding: 16px;
    }
    .missing-items-panel {
        padding: 16px;
    }
    .ws-filter-bar {
        gap: 10px;
    }
    .ws-search-box,
    .ws-filter-options {
        flex: 1 1 100%;
        min-width: 100%;
    }
    .ws-search-box input {
        height: 42px;
    }
    .ws-filter-options {
        justify-content: space-between;
    }
    .ws-availability-pills .ws-pill {
        flex: 1 1 auto;
    }
    .ws-location-dropdown {
        left: 0;
        right: 0;
        min-width: unset;
        width: 100%;
    }
    .ws-location-fields {
        flex-direction: column;
        align-items: stretch;
    }
    .ws-location-clear {
        justify-content: center;
    }
    .bom-item-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    .bom-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .parallel-buttons {
        flex-direction: column;
    }
    .sourcing-notice-banner {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .wholesaler-cards {
        grid-template-columns: 1fr;
    }
    .product-selection-cards {
        grid-template-columns: 1fr;
    }
    .inverter-cards {
        grid-template-columns: 1fr;
    }
    .bom-item-row {
        padding: 10px 12px;
    }
    .bom-item-name {
        font-size: 13px;
    }
    .coverage-tracker-header h3 {
        font-size: 15px;
    }
    .coverage-pct {
        font-size: 20px;
    }
    .missing-items-panel {
        padding: 14px;
    }
    .calc-location-card {
        flex-direction: column;
        gap: 14px;
        padding: 18px;
    }
    .calc-location-icon {
        margin: 0 auto;
    }
    .ws-filter-options {
        width: 100%;
    }
    .ws-filter-pill {
        flex: 1 1 auto;
        justify-content: center;
    }
    .ws-availability-pills {
        flex: 1 1 auto;
    }
    .installer-cards-list {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .product-selection-cards {
        grid-template-columns: 1fr;
    }
    .product-card-content {
        padding: 12px;
    }
    .inverter-card-content {
        padding: 12px;
    }
    .wholesaler-card {
        padding: 14px;
    }
    .ws-meta {
        flex-direction: column;
        gap: 4px;
    }
    .coverage-tracker {
        padding: 12px;
    }
    .bom-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    .parallel-section {
        padding: 14px;
    }
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus-visible styles for interactive elements */
button:focus-visible,
.category-btn:focus-visible,
.load-item:focus-visible,
.inverter-card:focus-visible,
.wholesaler-card:focus-visible,
.product-card:focus-visible,
.installer-card-item:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Better contrast for small text */
.ws-location,
.ws-meta,
.bom-item-qty,
.inverter-match,
.product-card-calc,
.coverage-item.covered-by {
    color: #475569;
}

/* ========== RESPONSIVE FIXES ========== */

/* Prevent grid blowout on main layout */
.calc-main-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
}
@media (max-width: 1200px) {
    .calc-main-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
    }
}
@media (max-width: 1024px) {
    .calc-main-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Ensure grid/flex children can shrink */
.calculator-section, .cost-sidebar {
    min-width: 0;
}

/* Wire calc table: proper horizontal scroll */
#wire-calc-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
}
#wire-calc-table table {
    width: max-content;
    min-width: 100%;
}

/* Wiring diagram: always scrollable if needed */
.wiring-diagram-container {
    overflow-x: auto;
}
.wiring-diagram-svg {
    max-width: 100%;
    height: auto;
}

/* Images should never overflow */
.calculator-step-content img,
.calculator-step-content svg {
    max-width: 100%;
    height: auto;
}

/* Selected loads: safe overflow handling */
.calculator-step-content .selected-loads {
    overflow-x: auto;
}

/* BOM text wrapping */
.bom-item-name {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Product card text wrapping */
.product-card-content h4,
.inverter-card-content h4,
.ws-name {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Step navigation: stack on small screens */
@media (max-width: 640px) {
    .step-navigation {
        flex-direction: column !important;
        gap: 10px;
    }
    .step-navigation .btn,
    .step-navigation button {
        width: 100% !important;
    }
}

/* Modal safety: never exceed viewport */
.modal-content {
    max-width: calc(100vw - 32px);
    margin-left: auto;
    margin-right: auto;
}

/* Touch targets minimum 44px */
.category-btn, .add-load-btn, .btn-icon, .bom-btn {
    min-height: 44px;
    min-width: 44px;
}

/* General word wrapping */
.calculator-step-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Table cell text wrapping inside scroll container */
.wire-calc-table th,
.wire-calc-table td {
    white-space: nowrap;
}
