.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.popup {
    background: #F3F4F6;
    padding: 50px;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
    animation: fadeIn 0.3s ease;
    overflow: auto;
    max-height: 90%;
}

.popup-overlay-large {
    .popup {
        max-width: 960px;
        height: auto;
    }
}

@keyframes fadeIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-header {
    font-size: 1.25em;
    margin-bottom: 10px;
    font-weight: bold;

    .popup-title {
        font-family: Public Sans;
        font-weight: 700;
        font-size: 24px;
        color: var(--primary-color);
        line-height: 36px;
        text-align: center;
        vertical-align: middle;
    }
}

.popup-content {

    .popup-text {
        font-family: Public Sans;
        font-weight: 400;
        font-size: 16px;
        color: var(--primary-color);
        line-height: 20px;
        text-align: center;
        vertical-align: middle;
        margin-bottom: 36px;
    }
}

.popup-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 85%;
    margin: 0 auto;
    margin-top: 40px;
    width: 175px;
}

.popup-btn {
    flex: 50%;
    border: none;
    padding: 15px 20px;
    cursor: pointer;

    &-cancel {
        background-color: #ccc;
    }

    &-accept {
        background-color: #28a745;
        color: white;
    }
}

.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: var(--primary-color);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: transform 0.2s ease;

    &:hover {
        transform: scale(1.1);
    }

    &::before {
        content: '×';
        font-weight: 300;
    }
}

.popup-product-list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.popup-product {
    display: flex;
    flex-direction: column;

    .popup-product-details {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: center;
        width: 284px;
        height: 450px;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0px 4px 20px 0px #0000001A;
        background: #FFFFFF;
        margin-bottom: 25px;

        span {
            font-family: Public Sans;
            font-weight: 400;
            font-style: normal;
            font-size: 14px;
            line-height: 16px;
            letter-spacing: 0%;
            vertical-align: middle;
            color: var(--primary-color);
            margin-bottom: 10px;
            display: inline-block;
            width: 100%;
        }

        h5 {
            font-family: Public Sans;
            font-weight: 700;
            font-style: bold;
            font-size: 16px;
            line-height: 18px;
            letter-spacing: 0%;
            vertical-align: middle;
            color: var(--primary-color);
            margin-bottom: 10px;
        }

        p {
            font-family: Public Sans;
            font-weight: 500;
            font-style: medium;
            font-size: 24px;
            line-height: 28px;
            letter-spacing: 0%;
            vertical-align: middle;
            color: var(--primary-color);
            margin-bottom: 10px;

            a {
                font-family: Public Sans;
                font-weight: 500;
                font-size: 24px;
                line-height: 28px;
                color: var(--primary-color);
                text-decoration: none;
            }
        }

        .stock {
            font-family: Public Sans;
            font-weight: 400;
            font-style: normal;
            font-size: 14px;
            line-height: 16px;
            letter-spacing: 0%;
            vertical-align: middle;
        }
    }
}

.popup-product-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 215px;
    margin-bottom: 10px;
    border-radius: 14px;
    overflow: hidden;

    .popup-product-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.popup-product-info {
    flex: 1;
}

.stock.en-stock {
    color: green;
}

.stock.sin-stock {
    color: red;
}

.popup-product-select {
    width: 100%;
    border: none;
    cursor: pointer;
}

.popup-product-select:disabled {
    background: #aaa;
    cursor: not-allowed;
}

// Estilos para indicadores de cambios en productos
.container-review {
    position: relative;
    transition: all 0.3s ease;

    &.product-replaced {
        border: 3px solid #28a745;
        border-radius: 8px;
        background-color: rgba(40, 167, 69, 0.05);

        &::after {
            content: 'REEMPLAZADO';
            position: absolute;
            top: 10px;
            right: 10px;
            background-color: #28a745;
            color: white;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: bold;
            z-index: 10;
        }
    }

    &.product-excluded {
        border: 3px solid #dc3545;
        border-radius: 8px;
        background-color: rgba(220, 53, 69, 0.05);
        opacity: 0.7;

        &::after {
            content: 'EXCLUIDO';
            position: absolute;
            top: 10px;
            right: 10px;
            background-color: #dc3545;
            color: white;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: bold;
            z-index: 10;
        }
    }
}

// Estilos para items en la lista de carga
.item-list {
    position: relative;
    transition: all 0.3s ease;

    &.product-replaced {
        border-left: 4px solid #28a745;
        background-color: rgba(40, 167, 69, 0.05);

        .part-number::after {
            content: ' ✓';
            color: #28a745;
            font-weight: bold;
            margin-left: 5px;
        }
    }

    &.product-excluded {
        border-left: 4px solid #dc3545;
        background-color: rgba(220, 53, 69, 0.05);
        opacity: 0.6;
        text-decoration: line-through;

        .part-number::after {
            content: ' ✗';
            color: #dc3545;
            font-weight: bold;
            margin-left: 5px;
        }
    }
}

@media screen and (max-width:1024px) {
    .popup-product-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 40px;
    }
}