.screw-builder-container {
    max-width: 1200px;
    margin: auto;
    padding: 60px 20px;

    * {
        font-family: "Manrope", Sans-serif;
    }
}

.builder-wrapper {
    display: flex;
    gap: 40px;

    @media (max-width: 767px) {
        flex-direction: column-reverse;
    }

}

.builder-options {

    flex: 2;
    min-height: 350px;

}

.builder-preview {

    flex: 1;
    text-align: center;

}

.builder-preview img {

    width: 350px;

}

.option-grid {

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;

    @media (max-width: 767px) {
        grid-template-columns: repeat(1, 1fr);
    }
}

.option-card {

    border: 1px solid #ddd;
    padding: 20px;

    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;

    display: flex;
    flex-direction: row;
    gap: 10px;

    .type-info {
        h5 {
            margin-top: 0;
            margin-bottom: 10px;
            font-weight: 700;
        }

        p {
            margin-bottom: 0;
        }
    }

}

.option-card:hover {

    border-color: var(--e-global-color-primary);

}

.option-card.active {

    border-color: var(--e-global-color-primary);
    background: #f4ffe8;

}

.builder-progress {

    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;

    @media (max-width: 767px) {
        gap: 20px;
        overflow: auto;
    }

}

.progress-step {

    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.5;

    @media (max-width: 767px) {
        white-space: nowrap;
    }
}

.progress-step.active {

    opacity: 1;

}

.step-number {

    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;

}

.progress-step.active .step-number {

    background: var(--e-global-color-primary);
    color: #fff;

}

.step-label strong {

    display: block;
    font-size: 14px;

}

.step-label small {

    font-size: 12px;
    color: #777;

}

.builder-step {
    display: none;
}

.builder-step.active {
    display: block;
}

.step-controls {
    display: flex;
    justify-content: space-between;

    button {
        background: var(--e-global-color-primary) !important;
        border-color: var(--e-global-color-primary) !important;
        color: #fff !important;

        &:hover:not([disabled]) {
            background: #FFF !important;
            color: var(--e-global-color-primary) !important;
        }

        &[disabled] {
            opacity: 0.5;
            cursor: not-allowed;
        }
    }
}

.dimension-group {

    margin-bottom: 25px;

}

.dimension-label {

    display: block;
    margin-bottom: 10px;
    font-weight: 500;

}

.diameter-options {

    display: flex;
    gap: 14px;
    flex-wrap: wrap;

}

.diameter-btn {

    padding: 14px 24px;
    border-radius: 12px;
    border: 1px solid #dfe3e6;
    cursor: pointer;
    font-weight: 500;
    transition: 0.25s;

}

.diameter-btn.active {

    background: var(--e-global-color-primary);
    color: #fff;
    border-color: var(--e-global-color-primary);

}

.length-select {

    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #dfe3e6;
    font-size: 15px;

}

.thread-info {
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f1ffcf, #f2ffd2);
    border: 1px solid var(--e-global-color-primary);
    color: var(--e-global-color-primary);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 30px;
}

.summary-box {

    border: 1px solid #dfe3e6;
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 25px;

}

.summary-row {

    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;

}

.summary-row:last-child {

    border-bottom: none;

}

.quantity-section {

    margin-bottom: 20px;

    label {
        margin-bottom: 10px;
    }

}

#summary-quantity {

    width: 100%;
    padding: 14px;
    border-radius: 10px;
    border: 1px solid #dfe3e6;

}

#request-quote-btn {

    background: var(--e-global-color-primary);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    cursor: pointer;

}

.builder-preview {
    position: relative;

    .preview-type {
        position: absolute;
        inset: 0;
        display: grid;
        place-content: center;
        width: 350px;
        height: 350px;

        &.active {
            z-index: 2;
            background: #ededed;
        }

        .fullscreen-open {
            display: none !important;
        }
    }
}

.builder-preview .preview-type[data-preview-frame-wrap="true"] iframe,
.builder-preview .screw-preview-iframe {
    width: 350px;
    height: 350px;
    border: 0;
    background: #ededed;
    display: block;
}

.builder-preview .preview-type[data-preview-frame-wrap="true"] {
    position: absolute;
    inset: 0;
    width: 350px;
    height: 350px;
    display: grid;
    place-content: center;
}

.builder-preview .preview-type[data-preview-frame-wrap="true"].active {
    z-index: 2;
    background: #ededed;
}

.custom-popup {
    position: fixed;
    top: 30px;
    right: 30px;
    background: #111;
    color: #fff;
    padding: 16px 22px;
    border-radius: 12px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 9999;
}

.custom-popup.show {
    transform: translateX(0);
    opacity: 1;
}

.custom-popup.success {
    background: #16a34a;
}

.custom-popup.error {
    background: #dc2626;
}

.popup-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.popup-icon {
    font-size: 20px;
    animation: pop 0.3s ease;
}

.customer-fields {
    margin-top: 20px;
    display: grid;
    gap: 12px;
    margin-bottom: 20px;

    @media (min-width: 767px) {
        grid-template-columns: repeat(2, 1fr);
    }
}

.disabled-step {
    pointer-events: none;
    opacity: 0.5;
}

.recess-info-box {
    display: none;
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.recess-info-box.show {
    display: block;
}

.customer-fields .field {
    display: flex;
    flex-direction: column;
}

.customer-fields label {
    font-size: 13px;
    margin-bottom: 4px;
    color: #555;
}

.customer-fields input {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    outline: none;
}

.customer-fields input:focus {
    border-color: #3b82f6;
}

@keyframes pop {
    0% {
        transform: scale(0);
    }

    100% {
        transform: scale(1);
    }
}

/* Zinc */
.option-card[data-value="zinc"] {
    border: 2px solid #c0c0c0;
    background: linear-gradient(135deg, #f5f5f5, #dcdcdc);
}

/* Gold */
.option-card[data-value="gold"] {
    border: 2px solid #d4af37;
    background: linear-gradient(135deg, #fff5cc, #d4af37);
}

/* Chrome */
.option-card[data-value="chrome"] {
    border: 2px solid #a9a9a9;
    background: linear-gradient(135deg, #f0f0f0, #bcbcbc);
}

/* Black */
.option-card[data-value="black"] {
    border: 2px solid #222;
    background: linear-gradient(135deg, #444, #000);
    color: #fff;
}

/* Waxed */
.option-card[data-value="waxed"] {
    border: 2px solid #c2a878;
    background: linear-gradient(135deg, #f5deb3, #c2a878);
}

/* Rose Gold */
.option-card[data-value="rose-gold"] {
    border: 2px solid #b76e79;
    /* classic rose gold tone */
    background: linear-gradient(135deg, #fbe4e6, #b76e79);
}

/* Gold/Brass */
.option-card[data-value="gold/brass"] {
    border: 2px solid #b8860b;
    background: linear-gradient(135deg, #fff8dc, #d4a017);
}

/* Chrome/Nickel */
.option-card[data-value="chrome/nickel"] {
    border: 2px solid #a8a9ad;
    background: linear-gradient(135deg, #e8e8e8, #a8a9ad, #d4d4d4);
}

/* Antique */
.option-card[data-value="antique"] {
    border: 2px solid #8b6914;
    background: linear-gradient(135deg, #d4b896, #8b6914, #c4a882);
    color: #fff;
}

.option-card.active {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.field.custom-quantity {
    grid-column: span 2;
}

.b2b-modal {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.b2b-modal-content {
    background: #fff;
    padding: 30px 35px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow: auto;
    border-radius: 14px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    z-index: 2;

    &::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    &::-webkit-scrollbar-track {
        background: #f4f6f8;
        border-radius: 10px;
    }

    &::-webkit-scrollbar-thumb {
        background: #c1c7cd;
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    &::-webkit-scrollbar-thumb:hover {
        background: #9aa4ad;
    }

    & {
        scrollbar-width: thin;
        scrollbar-color: #c1c7cd #f4f6f8;
    }
}

.b2b-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.b2b-modal-title {
    font-family: "Manrope", Sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #1D1D1D;
    text-align: center;
}

.b2b-alert {
    background-color: #fff6e5;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    font-family: "Manrope", Sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #8a6d1d;
    margin-bottom: 25px;
    border: 1px solid #f3d9a4;
}

.b2b-close-btn {
    position: absolute;
    top: 10px;
    z-index: 999;
    right: 10px;
    padding: 0px 0 5px;
    width: 40px;
    height: 40px;
    display: grid;
    place-content: center;
    border-radius: 100px;
    font-size: 24px;
    background: var(--e-global-color-primary) !important;
    color: #fff;
    font-weight: 700;
    border-color: var(--e-global-color-primary);
    transition: .3s;

    &:hover{
        transform: rotate(90deg);
    }
}